diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/JobServiceClient.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/JobServiceClient.java index 4484658f1ce4..bfe3e6fc7cb3 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/JobServiceClient.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/JobServiceClient.java @@ -2329,6 +2329,973 @@ public final void cancelHyperparameterTuningJob(CancelHyperparameterTuningJobReq return stub.cancelHyperparameterTuningJobCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a NasJob + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   NasJob nasJob = NasJob.newBuilder().build();
+   *   NasJob response = jobServiceClient.createNasJob(parent, nasJob);
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location to create the NasJob in. Format: + * `projects/{project}/locations/{location}` + * @param nasJob Required. The NasJob to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final NasJob createNasJob(LocationName parent, NasJob nasJob) { + CreateNasJobRequest request = + CreateNasJobRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setNasJob(nasJob) + .build(); + return createNasJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a NasJob + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   NasJob nasJob = NasJob.newBuilder().build();
+   *   NasJob response = jobServiceClient.createNasJob(parent, nasJob);
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location to create the NasJob in. Format: + * `projects/{project}/locations/{location}` + * @param nasJob Required. The NasJob to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final NasJob createNasJob(String parent, NasJob nasJob) { + CreateNasJobRequest request = + CreateNasJobRequest.newBuilder().setParent(parent).setNasJob(nasJob).build(); + return createNasJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a NasJob + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   CreateNasJobRequest request =
+   *       CreateNasJobRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setNasJob(NasJob.newBuilder().build())
+   *           .build();
+   *   NasJob response = jobServiceClient.createNasJob(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 NasJob createNasJob(CreateNasJobRequest request) { + return createNasJobCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a NasJob + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   CreateNasJobRequest request =
+   *       CreateNasJobRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setNasJob(NasJob.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = jobServiceClient.createNasJobCallable().futureCall(request);
+   *   // Do something.
+   *   NasJob response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createNasJobCallable() { + return stub.createNasJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a NasJob + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   NasJobName name = NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]");
+   *   NasJob response = jobServiceClient.getNasJob(name);
+   * }
+   * }
+ * + * @param name Required. The name of the NasJob resource. Format: + * `projects/{project}/locations/{location}/nasJobs/{nas_job}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final NasJob getNasJob(NasJobName name) { + GetNasJobRequest request = + GetNasJobRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getNasJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a NasJob + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   String name = NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString();
+   *   NasJob response = jobServiceClient.getNasJob(name);
+   * }
+   * }
+ * + * @param name Required. The name of the NasJob resource. Format: + * `projects/{project}/locations/{location}/nasJobs/{nas_job}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final NasJob getNasJob(String name) { + GetNasJobRequest request = GetNasJobRequest.newBuilder().setName(name).build(); + return getNasJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a NasJob + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   GetNasJobRequest request =
+   *       GetNasJobRequest.newBuilder()
+   *           .setName(NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString())
+   *           .build();
+   *   NasJob response = jobServiceClient.getNasJob(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 NasJob getNasJob(GetNasJobRequest request) { + return getNasJobCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a NasJob + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   GetNasJobRequest request =
+   *       GetNasJobRequest.newBuilder()
+   *           .setName(NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString())
+   *           .build();
+   *   ApiFuture future = jobServiceClient.getNasJobCallable().futureCall(request);
+   *   // Do something.
+   *   NasJob response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getNasJobCallable() { + return stub.getNasJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists NasJobs 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 (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (NasJob element : jobServiceClient.listNasJobs(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location to list the NasJobs from. Format: + * `projects/{project}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListNasJobsPagedResponse listNasJobs(LocationName parent) { + ListNasJobsRequest request = + ListNasJobsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listNasJobs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists NasJobs 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 (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (NasJob element : jobServiceClient.listNasJobs(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location to list the NasJobs from. Format: + * `projects/{project}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListNasJobsPagedResponse listNasJobs(String parent) { + ListNasJobsRequest request = ListNasJobsRequest.newBuilder().setParent(parent).build(); + return listNasJobs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists NasJobs 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 (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   ListNasJobsRequest request =
+   *       ListNasJobsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setReadMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   for (NasJob element : jobServiceClient.listNasJobs(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 ListNasJobsPagedResponse listNasJobs(ListNasJobsRequest request) { + return listNasJobsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists NasJobs 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 (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   ListNasJobsRequest request =
+   *       ListNasJobsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setReadMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = jobServiceClient.listNasJobsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (NasJob element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listNasJobsPagedCallable() { + return stub.listNasJobsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists NasJobs 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 (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   ListNasJobsRequest request =
+   *       ListNasJobsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setReadMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   while (true) {
+   *     ListNasJobsResponse response = jobServiceClient.listNasJobsCallable().call(request);
+   *     for (NasJob element : response.getNasJobsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listNasJobsCallable() { + return stub.listNasJobsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a NasJob. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   NasJobName name = NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]");
+   *   jobServiceClient.deleteNasJobAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the NasJob resource to be deleted. Format: + * `projects/{project}/locations/{location}/nasJobs/{nas_job}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteNasJobAsync(NasJobName name) { + DeleteNasJobRequest request = + DeleteNasJobRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteNasJobAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a NasJob. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   String name = NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString();
+   *   jobServiceClient.deleteNasJobAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the NasJob resource to be deleted. Format: + * `projects/{project}/locations/{location}/nasJobs/{nas_job}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteNasJobAsync(String name) { + DeleteNasJobRequest request = DeleteNasJobRequest.newBuilder().setName(name).build(); + return deleteNasJobAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a NasJob. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   DeleteNasJobRequest request =
+   *       DeleteNasJobRequest.newBuilder()
+   *           .setName(NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString())
+   *           .build();
+   *   jobServiceClient.deleteNasJobAsync(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 deleteNasJobAsync( + DeleteNasJobRequest request) { + return deleteNasJobOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a NasJob. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   DeleteNasJobRequest request =
+   *       DeleteNasJobRequest.newBuilder()
+   *           .setName(NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString())
+   *           .build();
+   *   OperationFuture future =
+   *       jobServiceClient.deleteNasJobOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteNasJobOperationCallable() { + return stub.deleteNasJobOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a NasJob. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   DeleteNasJobRequest request =
+   *       DeleteNasJobRequest.newBuilder()
+   *           .setName(NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString())
+   *           .build();
+   *   ApiFuture future = jobServiceClient.deleteNasJobCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteNasJobCallable() { + return stub.deleteNasJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Cancels a NasJob. Starts asynchronous cancellation on the NasJob. The server makes a best + * effort to cancel the job, but success is not guaranteed. Clients can use + * [JobService.GetNasJob][google.cloud.aiplatform.v1.JobService.GetNasJob] or other methods to + * check whether the cancellation succeeded or whether the job completed despite cancellation. On + * successful cancellation, the NasJob is not deleted; instead it becomes a job with a + * [NasJob.error][google.cloud.aiplatform.v1.NasJob.error] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and + * [NasJob.state][google.cloud.aiplatform.v1.NasJob.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 (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   NasJobName name = NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]");
+   *   jobServiceClient.cancelNasJob(name);
+   * }
+   * }
+ * + * @param name Required. The name of the NasJob to cancel. Format: + * `projects/{project}/locations/{location}/nasJobs/{nas_job}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void cancelNasJob(NasJobName name) { + CancelNasJobRequest request = + CancelNasJobRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + cancelNasJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Cancels a NasJob. Starts asynchronous cancellation on the NasJob. The server makes a best + * effort to cancel the job, but success is not guaranteed. Clients can use + * [JobService.GetNasJob][google.cloud.aiplatform.v1.JobService.GetNasJob] or other methods to + * check whether the cancellation succeeded or whether the job completed despite cancellation. On + * successful cancellation, the NasJob is not deleted; instead it becomes a job with a + * [NasJob.error][google.cloud.aiplatform.v1.NasJob.error] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and + * [NasJob.state][google.cloud.aiplatform.v1.NasJob.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 (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   String name = NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString();
+   *   jobServiceClient.cancelNasJob(name);
+   * }
+   * }
+ * + * @param name Required. The name of the NasJob to cancel. Format: + * `projects/{project}/locations/{location}/nasJobs/{nas_job}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void cancelNasJob(String name) { + CancelNasJobRequest request = CancelNasJobRequest.newBuilder().setName(name).build(); + cancelNasJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Cancels a NasJob. Starts asynchronous cancellation on the NasJob. The server makes a best + * effort to cancel the job, but success is not guaranteed. Clients can use + * [JobService.GetNasJob][google.cloud.aiplatform.v1.JobService.GetNasJob] or other methods to + * check whether the cancellation succeeded or whether the job completed despite cancellation. On + * successful cancellation, the NasJob is not deleted; instead it becomes a job with a + * [NasJob.error][google.cloud.aiplatform.v1.NasJob.error] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and + * [NasJob.state][google.cloud.aiplatform.v1.NasJob.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 (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   CancelNasJobRequest request =
+   *       CancelNasJobRequest.newBuilder()
+   *           .setName(NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString())
+   *           .build();
+   *   jobServiceClient.cancelNasJob(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 cancelNasJob(CancelNasJobRequest request) { + cancelNasJobCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Cancels a NasJob. Starts asynchronous cancellation on the NasJob. The server makes a best + * effort to cancel the job, but success is not guaranteed. Clients can use + * [JobService.GetNasJob][google.cloud.aiplatform.v1.JobService.GetNasJob] or other methods to + * check whether the cancellation succeeded or whether the job completed despite cancellation. On + * successful cancellation, the NasJob is not deleted; instead it becomes a job with a + * [NasJob.error][google.cloud.aiplatform.v1.NasJob.error] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and + * [NasJob.state][google.cloud.aiplatform.v1.NasJob.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 (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   CancelNasJobRequest request =
+   *       CancelNasJobRequest.newBuilder()
+   *           .setName(NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString())
+   *           .build();
+   *   ApiFuture future = jobServiceClient.cancelNasJobCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable cancelNasJobCallable() { + return stub.cancelNasJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a NasTrialDetail. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   NasTrialDetailName name =
+   *       NasTrialDetailName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]", "[NAS_TRIAL_DETAIL]");
+   *   NasTrialDetail response = jobServiceClient.getNasTrialDetail(name);
+   * }
+   * }
+ * + * @param name Required. The name of the NasTrialDetail resource. Format: + * `projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final NasTrialDetail getNasTrialDetail(NasTrialDetailName name) { + GetNasTrialDetailRequest request = + GetNasTrialDetailRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getNasTrialDetail(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a NasTrialDetail. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   String name =
+   *       NasTrialDetailName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]", "[NAS_TRIAL_DETAIL]")
+   *           .toString();
+   *   NasTrialDetail response = jobServiceClient.getNasTrialDetail(name);
+   * }
+   * }
+ * + * @param name Required. The name of the NasTrialDetail resource. Format: + * `projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final NasTrialDetail getNasTrialDetail(String name) { + GetNasTrialDetailRequest request = GetNasTrialDetailRequest.newBuilder().setName(name).build(); + return getNasTrialDetail(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a NasTrialDetail. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   GetNasTrialDetailRequest request =
+   *       GetNasTrialDetailRequest.newBuilder()
+   *           .setName(
+   *               NasTrialDetailName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[NAS_JOB]", "[NAS_TRIAL_DETAIL]")
+   *                   .toString())
+   *           .build();
+   *   NasTrialDetail response = jobServiceClient.getNasTrialDetail(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 NasTrialDetail getNasTrialDetail(GetNasTrialDetailRequest request) { + return getNasTrialDetailCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a NasTrialDetail. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   GetNasTrialDetailRequest request =
+   *       GetNasTrialDetailRequest.newBuilder()
+   *           .setName(
+   *               NasTrialDetailName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[NAS_JOB]", "[NAS_TRIAL_DETAIL]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       jobServiceClient.getNasTrialDetailCallable().futureCall(request);
+   *   // Do something.
+   *   NasTrialDetail response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getNasTrialDetailCallable() { + return stub.getNasTrialDetailCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List top NasTrialDetails of a NasJob. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   NasJobName parent = NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]");
+   *   for (NasTrialDetail element : jobServiceClient.listNasTrialDetails(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The name of the NasJob resource. Format: + * `projects/{project}/locations/{location}/nasJobs/{nas_job}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListNasTrialDetailsPagedResponse listNasTrialDetails(NasJobName parent) { + ListNasTrialDetailsRequest request = + ListNasTrialDetailsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listNasTrialDetails(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List top NasTrialDetails of a NasJob. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   String parent = NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString();
+   *   for (NasTrialDetail element : jobServiceClient.listNasTrialDetails(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The name of the NasJob resource. Format: + * `projects/{project}/locations/{location}/nasJobs/{nas_job}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListNasTrialDetailsPagedResponse listNasTrialDetails(String parent) { + ListNasTrialDetailsRequest request = + ListNasTrialDetailsRequest.newBuilder().setParent(parent).build(); + return listNasTrialDetails(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List top NasTrialDetails of a NasJob. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   ListNasTrialDetailsRequest request =
+   *       ListNasTrialDetailsRequest.newBuilder()
+   *           .setParent(NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (NasTrialDetail element : jobServiceClient.listNasTrialDetails(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 ListNasTrialDetailsPagedResponse listNasTrialDetails( + ListNasTrialDetailsRequest request) { + return listNasTrialDetailsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List top NasTrialDetails of a NasJob. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   ListNasTrialDetailsRequest request =
+   *       ListNasTrialDetailsRequest.newBuilder()
+   *           .setParent(NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       jobServiceClient.listNasTrialDetailsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (NasTrialDetail element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listNasTrialDetailsPagedCallable() { + return stub.listNasTrialDetailsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List top NasTrialDetails of a NasJob. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   ListNasTrialDetailsRequest request =
+   *       ListNasTrialDetailsRequest.newBuilder()
+   *           .setParent(NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListNasTrialDetailsResponse response =
+   *         jobServiceClient.listNasTrialDetailsCallable().call(request);
+   *     for (NasTrialDetail element : response.getNasTrialDetailsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listNasTrialDetailsCallable() { + return stub.listNasTrialDetailsCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a BatchPredictionJob. A BatchPredictionJob once created will right away be attempted to @@ -4995,6 +5962,163 @@ protected ListHyperparameterTuningJobsFixedSizeCollection createCollection( } } + public static class ListNasJobsPagedResponse + extends AbstractPagedListResponse< + ListNasJobsRequest, + ListNasJobsResponse, + NasJob, + ListNasJobsPage, + ListNasJobsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListNasJobsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListNasJobsPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListNasJobsPagedResponse(ListNasJobsPage page) { + super(page, ListNasJobsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListNasJobsPage + extends AbstractPage { + + private ListNasJobsPage( + PageContext context, + ListNasJobsResponse response) { + super(context, response); + } + + private static ListNasJobsPage createEmptyPage() { + return new ListNasJobsPage(null, null); + } + + @Override + protected ListNasJobsPage createPage( + PageContext context, + ListNasJobsResponse response) { + return new ListNasJobsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListNasJobsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListNasJobsRequest, + ListNasJobsResponse, + NasJob, + ListNasJobsPage, + ListNasJobsFixedSizeCollection> { + + private ListNasJobsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListNasJobsFixedSizeCollection createEmptyCollection() { + return new ListNasJobsFixedSizeCollection(null, 0); + } + + @Override + protected ListNasJobsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListNasJobsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListNasTrialDetailsPagedResponse + extends AbstractPagedListResponse< + ListNasTrialDetailsRequest, + ListNasTrialDetailsResponse, + NasTrialDetail, + ListNasTrialDetailsPage, + ListNasTrialDetailsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListNasTrialDetailsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListNasTrialDetailsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListNasTrialDetailsPagedResponse(ListNasTrialDetailsPage page) { + super(page, ListNasTrialDetailsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListNasTrialDetailsPage + extends AbstractPage< + ListNasTrialDetailsRequest, + ListNasTrialDetailsResponse, + NasTrialDetail, + ListNasTrialDetailsPage> { + + private ListNasTrialDetailsPage( + PageContext + context, + ListNasTrialDetailsResponse response) { + super(context, response); + } + + private static ListNasTrialDetailsPage createEmptyPage() { + return new ListNasTrialDetailsPage(null, null); + } + + @Override + protected ListNasTrialDetailsPage createPage( + PageContext + context, + ListNasTrialDetailsResponse response) { + return new ListNasTrialDetailsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListNasTrialDetailsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListNasTrialDetailsRequest, + ListNasTrialDetailsResponse, + NasTrialDetail, + ListNasTrialDetailsPage, + ListNasTrialDetailsFixedSizeCollection> { + + private ListNasTrialDetailsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListNasTrialDetailsFixedSizeCollection createEmptyCollection() { + return new ListNasTrialDetailsFixedSizeCollection(null, 0); + } + + @Override + protected ListNasTrialDetailsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListNasTrialDetailsFixedSizeCollection(pages, collectionSize); + } + } + public static class ListBatchPredictionJobsPagedResponse extends AbstractPagedListResponse< ListBatchPredictionJobsRequest, diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/JobServiceSettings.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/JobServiceSettings.java index 21ca2b7f04f3..047ef2785385 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/JobServiceSettings.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/JobServiceSettings.java @@ -22,6 +22,8 @@ import static com.google.cloud.aiplatform.v1.JobServiceClient.ListHyperparameterTuningJobsPagedResponse; import static com.google.cloud.aiplatform.v1.JobServiceClient.ListLocationsPagedResponse; import static com.google.cloud.aiplatform.v1.JobServiceClient.ListModelDeploymentMonitoringJobsPagedResponse; +import static com.google.cloud.aiplatform.v1.JobServiceClient.ListNasJobsPagedResponse; +import static com.google.cloud.aiplatform.v1.JobServiceClient.ListNasTrialDetailsPagedResponse; import static com.google.cloud.aiplatform.v1.JobServiceClient.SearchModelDeploymentMonitoringStatsAnomaliesPagedResponse; import com.google.api.core.ApiFunction; @@ -202,6 +204,50 @@ public UnaryCallSettings cancelDataLabeling return ((JobServiceStubSettings) getStubSettings()).cancelHyperparameterTuningJobSettings(); } + /** Returns the object with the settings used for calls to createNasJob. */ + public UnaryCallSettings createNasJobSettings() { + return ((JobServiceStubSettings) getStubSettings()).createNasJobSettings(); + } + + /** Returns the object with the settings used for calls to getNasJob. */ + public UnaryCallSettings getNasJobSettings() { + return ((JobServiceStubSettings) getStubSettings()).getNasJobSettings(); + } + + /** Returns the object with the settings used for calls to listNasJobs. */ + public PagedCallSettings + listNasJobsSettings() { + return ((JobServiceStubSettings) getStubSettings()).listNasJobsSettings(); + } + + /** Returns the object with the settings used for calls to deleteNasJob. */ + public UnaryCallSettings deleteNasJobSettings() { + return ((JobServiceStubSettings) getStubSettings()).deleteNasJobSettings(); + } + + /** Returns the object with the settings used for calls to deleteNasJob. */ + public OperationCallSettings + deleteNasJobOperationSettings() { + return ((JobServiceStubSettings) getStubSettings()).deleteNasJobOperationSettings(); + } + + /** Returns the object with the settings used for calls to cancelNasJob. */ + public UnaryCallSettings cancelNasJobSettings() { + return ((JobServiceStubSettings) getStubSettings()).cancelNasJobSettings(); + } + + /** Returns the object with the settings used for calls to getNasTrialDetail. */ + public UnaryCallSettings getNasTrialDetailSettings() { + return ((JobServiceStubSettings) getStubSettings()).getNasTrialDetailSettings(); + } + + /** Returns the object with the settings used for calls to listNasTrialDetails. */ + public PagedCallSettings< + ListNasTrialDetailsRequest, ListNasTrialDetailsResponse, ListNasTrialDetailsPagedResponse> + listNasTrialDetailsSettings() { + return ((JobServiceStubSettings) getStubSettings()).listNasTrialDetailsSettings(); + } + /** Returns the object with the settings used for calls to createBatchPredictionJob. */ public UnaryCallSettings createBatchPredictionJobSettings() { @@ -557,6 +603,54 @@ public UnaryCallSettings.Builder cancelCustomJobS return getStubSettingsBuilder().cancelHyperparameterTuningJobSettings(); } + /** Returns the builder for the settings used for calls to createNasJob. */ + public UnaryCallSettings.Builder createNasJobSettings() { + return getStubSettingsBuilder().createNasJobSettings(); + } + + /** Returns the builder for the settings used for calls to getNasJob. */ + public UnaryCallSettings.Builder getNasJobSettings() { + return getStubSettingsBuilder().getNasJobSettings(); + } + + /** Returns the builder for the settings used for calls to listNasJobs. */ + public PagedCallSettings.Builder< + ListNasJobsRequest, ListNasJobsResponse, ListNasJobsPagedResponse> + listNasJobsSettings() { + return getStubSettingsBuilder().listNasJobsSettings(); + } + + /** Returns the builder for the settings used for calls to deleteNasJob. */ + public UnaryCallSettings.Builder deleteNasJobSettings() { + return getStubSettingsBuilder().deleteNasJobSettings(); + } + + /** Returns the builder for the settings used for calls to deleteNasJob. */ + public OperationCallSettings.Builder + deleteNasJobOperationSettings() { + return getStubSettingsBuilder().deleteNasJobOperationSettings(); + } + + /** Returns the builder for the settings used for calls to cancelNasJob. */ + public UnaryCallSettings.Builder cancelNasJobSettings() { + return getStubSettingsBuilder().cancelNasJobSettings(); + } + + /** Returns the builder for the settings used for calls to getNasTrialDetail. */ + public UnaryCallSettings.Builder + getNasTrialDetailSettings() { + return getStubSettingsBuilder().getNasTrialDetailSettings(); + } + + /** Returns the builder for the settings used for calls to listNasTrialDetails. */ + public PagedCallSettings.Builder< + ListNasTrialDetailsRequest, + ListNasTrialDetailsResponse, + ListNasTrialDetailsPagedResponse> + listNasTrialDetailsSettings() { + return getStubSettingsBuilder().listNasTrialDetailsSettings(); + } + /** Returns the builder for the settings used for calls to createBatchPredictionJob. */ public UnaryCallSettings.Builder createBatchPredictionJobSettings() { diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/ModelServiceClient.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/ModelServiceClient.java index e553f7bc8194..57ac4ab1778a 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/ModelServiceClient.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/ModelServiceClient.java @@ -1550,6 +1550,255 @@ public final UnaryCallable exportModelCallable() return stub.exportModelCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Copies an already existing Vertex AI Model into the specified Location. The source Model must + * exist in the same Project. When copying custom Models, the users themselves are responsible for + * [Model.metadata][google.cloud.aiplatform.v1.Model.metadata] content to be region-agnostic, as + * well as making sure that any resources (e.g. files) it depends on remain accessible. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   ModelName sourceModel = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
+   *   CopyModelResponse response = modelServiceClient.copyModelAsync(parent, sourceModel).get();
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location into which to copy the Model. Format: + * `projects/{project}/locations/{location}` + * @param sourceModel Required. The resource name of the Model to copy. That Model must be in the + * same Project. Format: `projects/{project}/locations/{location}/models/{model}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture copyModelAsync( + LocationName parent, ModelName sourceModel) { + CopyModelRequest request = + CopyModelRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setSourceModel(sourceModel == null ? null : sourceModel.toString()) + .build(); + return copyModelAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Copies an already existing Vertex AI Model into the specified Location. The source Model must + * exist in the same Project. When copying custom Models, the users themselves are responsible for + * [Model.metadata][google.cloud.aiplatform.v1.Model.metadata] content to be region-agnostic, as + * well as making sure that any resources (e.g. files) it depends on remain accessible. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   String sourceModel = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString();
+   *   CopyModelResponse response = modelServiceClient.copyModelAsync(parent, sourceModel).get();
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location into which to copy the Model. Format: + * `projects/{project}/locations/{location}` + * @param sourceModel Required. The resource name of the Model to copy. That Model must be in the + * same Project. Format: `projects/{project}/locations/{location}/models/{model}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture copyModelAsync( + LocationName parent, String sourceModel) { + CopyModelRequest request = + CopyModelRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setSourceModel(sourceModel) + .build(); + return copyModelAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Copies an already existing Vertex AI Model into the specified Location. The source Model must + * exist in the same Project. When copying custom Models, the users themselves are responsible for + * [Model.metadata][google.cloud.aiplatform.v1.Model.metadata] content to be region-agnostic, as + * well as making sure that any resources (e.g. files) it depends on remain accessible. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   ModelName sourceModel = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
+   *   CopyModelResponse response = modelServiceClient.copyModelAsync(parent, sourceModel).get();
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location into which to copy the Model. Format: + * `projects/{project}/locations/{location}` + * @param sourceModel Required. The resource name of the Model to copy. That Model must be in the + * same Project. Format: `projects/{project}/locations/{location}/models/{model}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture copyModelAsync( + String parent, ModelName sourceModel) { + CopyModelRequest request = + CopyModelRequest.newBuilder() + .setParent(parent) + .setSourceModel(sourceModel == null ? null : sourceModel.toString()) + .build(); + return copyModelAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Copies an already existing Vertex AI Model into the specified Location. The source Model must + * exist in the same Project. When copying custom Models, the users themselves are responsible for + * [Model.metadata][google.cloud.aiplatform.v1.Model.metadata] content to be region-agnostic, as + * well as making sure that any resources (e.g. files) it depends on remain accessible. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   String sourceModel = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString();
+   *   CopyModelResponse response = modelServiceClient.copyModelAsync(parent, sourceModel).get();
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location into which to copy the Model. Format: + * `projects/{project}/locations/{location}` + * @param sourceModel Required. The resource name of the Model to copy. That Model must be in the + * same Project. Format: `projects/{project}/locations/{location}/models/{model}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture copyModelAsync( + String parent, String sourceModel) { + CopyModelRequest request = + CopyModelRequest.newBuilder().setParent(parent).setSourceModel(sourceModel).build(); + return copyModelAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Copies an already existing Vertex AI Model into the specified Location. The source Model must + * exist in the same Project. When copying custom Models, the users themselves are responsible for + * [Model.metadata][google.cloud.aiplatform.v1.Model.metadata] content to be region-agnostic, as + * well as making sure that any resources (e.g. files) it depends on remain accessible. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   CopyModelRequest request =
+   *       CopyModelRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setSourceModel(ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString())
+   *           .setEncryptionSpec(EncryptionSpec.newBuilder().build())
+   *           .build();
+   *   CopyModelResponse response = modelServiceClient.copyModelAsync(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 copyModelAsync( + CopyModelRequest request) { + return copyModelOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Copies an already existing Vertex AI Model into the specified Location. The source Model must + * exist in the same Project. When copying custom Models, the users themselves are responsible for + * [Model.metadata][google.cloud.aiplatform.v1.Model.metadata] content to be region-agnostic, as + * well as making sure that any resources (e.g. files) it depends on remain accessible. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   CopyModelRequest request =
+   *       CopyModelRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setSourceModel(ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString())
+   *           .setEncryptionSpec(EncryptionSpec.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       modelServiceClient.copyModelOperationCallable().futureCall(request);
+   *   // Do something.
+   *   CopyModelResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + copyModelOperationCallable() { + return stub.copyModelOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Copies an already existing Vertex AI Model into the specified Location. The source Model must + * exist in the same Project. When copying custom Models, the users themselves are responsible for + * [Model.metadata][google.cloud.aiplatform.v1.Model.metadata] content to be region-agnostic, as + * well as making sure that any resources (e.g. files) it depends on remain accessible. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   CopyModelRequest request =
+   *       CopyModelRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setSourceModel(ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString())
+   *           .setEncryptionSpec(EncryptionSpec.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = modelServiceClient.copyModelCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable copyModelCallable() { + return stub.copyModelCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Imports an externally generated ModelEvaluation. diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/ModelServiceSettings.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/ModelServiceSettings.java index 466ac8dd5c9c..2b71b7d13ea1 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/ModelServiceSettings.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/ModelServiceSettings.java @@ -163,6 +163,17 @@ public UnaryCallSettings exportModelSettings() { return ((ModelServiceStubSettings) getStubSettings()).exportModelOperationSettings(); } + /** Returns the object with the settings used for calls to copyModel. */ + public UnaryCallSettings copyModelSettings() { + return ((ModelServiceStubSettings) getStubSettings()).copyModelSettings(); + } + + /** Returns the object with the settings used for calls to copyModel. */ + public OperationCallSettings + copyModelOperationSettings() { + return ((ModelServiceStubSettings) getStubSettings()).copyModelOperationSettings(); + } + /** Returns the object with the settings used for calls to importModelEvaluation. */ public UnaryCallSettings importModelEvaluationSettings() { @@ -407,6 +418,18 @@ public UnaryCallSettings.Builder exportModelSetti return getStubSettingsBuilder().exportModelOperationSettings(); } + /** Returns the builder for the settings used for calls to copyModel. */ + public UnaryCallSettings.Builder copyModelSettings() { + return getStubSettingsBuilder().copyModelSettings(); + } + + /** Returns the builder for the settings used for calls to copyModel. */ + public OperationCallSettings.Builder< + CopyModelRequest, CopyModelResponse, CopyModelOperationMetadata> + copyModelOperationSettings() { + return getStubSettingsBuilder().copyModelOperationSettings(); + } + /** Returns the builder for the settings used for calls to importModelEvaluation. */ public UnaryCallSettings.Builder importModelEvaluationSettings() { 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 89c0faaa7c61..1ed45476ee9a 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 @@ -337,6 +337,9 @@ "CancelHyperparameterTuningJob": { "methods": ["cancelHyperparameterTuningJob", "cancelHyperparameterTuningJob", "cancelHyperparameterTuningJob", "cancelHyperparameterTuningJobCallable"] }, + "CancelNasJob": { + "methods": ["cancelNasJob", "cancelNasJob", "cancelNasJob", "cancelNasJobCallable"] + }, "CreateBatchPredictionJob": { "methods": ["createBatchPredictionJob", "createBatchPredictionJob", "createBatchPredictionJob", "createBatchPredictionJobCallable"] }, @@ -352,6 +355,9 @@ "CreateModelDeploymentMonitoringJob": { "methods": ["createModelDeploymentMonitoringJob", "createModelDeploymentMonitoringJob", "createModelDeploymentMonitoringJob", "createModelDeploymentMonitoringJobCallable"] }, + "CreateNasJob": { + "methods": ["createNasJob", "createNasJob", "createNasJob", "createNasJobCallable"] + }, "DeleteBatchPredictionJob": { "methods": ["deleteBatchPredictionJobAsync", "deleteBatchPredictionJobAsync", "deleteBatchPredictionJobAsync", "deleteBatchPredictionJobOperationCallable", "deleteBatchPredictionJobCallable"] }, @@ -367,6 +373,9 @@ "DeleteModelDeploymentMonitoringJob": { "methods": ["deleteModelDeploymentMonitoringJobAsync", "deleteModelDeploymentMonitoringJobAsync", "deleteModelDeploymentMonitoringJobAsync", "deleteModelDeploymentMonitoringJobOperationCallable", "deleteModelDeploymentMonitoringJobCallable"] }, + "DeleteNasJob": { + "methods": ["deleteNasJobAsync", "deleteNasJobAsync", "deleteNasJobAsync", "deleteNasJobOperationCallable", "deleteNasJobCallable"] + }, "GetBatchPredictionJob": { "methods": ["getBatchPredictionJob", "getBatchPredictionJob", "getBatchPredictionJob", "getBatchPredictionJobCallable"] }, @@ -388,6 +397,12 @@ "GetModelDeploymentMonitoringJob": { "methods": ["getModelDeploymentMonitoringJob", "getModelDeploymentMonitoringJob", "getModelDeploymentMonitoringJob", "getModelDeploymentMonitoringJobCallable"] }, + "GetNasJob": { + "methods": ["getNasJob", "getNasJob", "getNasJob", "getNasJobCallable"] + }, + "GetNasTrialDetail": { + "methods": ["getNasTrialDetail", "getNasTrialDetail", "getNasTrialDetail", "getNasTrialDetailCallable"] + }, "ListBatchPredictionJobs": { "methods": ["listBatchPredictionJobs", "listBatchPredictionJobs", "listBatchPredictionJobs", "listBatchPredictionJobsPagedCallable", "listBatchPredictionJobsCallable"] }, @@ -406,6 +421,12 @@ "ListModelDeploymentMonitoringJobs": { "methods": ["listModelDeploymentMonitoringJobs", "listModelDeploymentMonitoringJobs", "listModelDeploymentMonitoringJobs", "listModelDeploymentMonitoringJobsPagedCallable", "listModelDeploymentMonitoringJobsCallable"] }, + "ListNasJobs": { + "methods": ["listNasJobs", "listNasJobs", "listNasJobs", "listNasJobsPagedCallable", "listNasJobsCallable"] + }, + "ListNasTrialDetails": { + "methods": ["listNasTrialDetails", "listNasTrialDetails", "listNasTrialDetails", "listNasTrialDetailsPagedCallable", "listNasTrialDetailsCallable"] + }, "PauseModelDeploymentMonitoringJob": { "methods": ["pauseModelDeploymentMonitoringJob", "pauseModelDeploymentMonitoringJob", "pauseModelDeploymentMonitoringJob", "pauseModelDeploymentMonitoringJobCallable"] }, @@ -586,6 +607,9 @@ "BatchImportModelEvaluationSlices": { "methods": ["batchImportModelEvaluationSlices", "batchImportModelEvaluationSlices", "batchImportModelEvaluationSlices", "batchImportModelEvaluationSlicesCallable"] }, + "CopyModel": { + "methods": ["copyModelAsync", "copyModelAsync", "copyModelAsync", "copyModelAsync", "copyModelAsync", "copyModelOperationCallable", "copyModelCallable"] + }, "DeleteModel": { "methods": ["deleteModelAsync", "deleteModelAsync", "deleteModelAsync", "deleteModelOperationCallable", "deleteModelCallable"] }, diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcJobServiceStub.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcJobServiceStub.java index c9891404dac8..fc5859e23472 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcJobServiceStub.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcJobServiceStub.java @@ -22,6 +22,8 @@ import static com.google.cloud.aiplatform.v1.JobServiceClient.ListHyperparameterTuningJobsPagedResponse; import static com.google.cloud.aiplatform.v1.JobServiceClient.ListLocationsPagedResponse; import static com.google.cloud.aiplatform.v1.JobServiceClient.ListModelDeploymentMonitoringJobsPagedResponse; +import static com.google.cloud.aiplatform.v1.JobServiceClient.ListNasJobsPagedResponse; +import static com.google.cloud.aiplatform.v1.JobServiceClient.ListNasTrialDetailsPagedResponse; import static com.google.cloud.aiplatform.v1.JobServiceClient.SearchModelDeploymentMonitoringStatsAnomaliesPagedResponse; import com.google.api.gax.core.BackgroundResource; @@ -36,11 +38,13 @@ import com.google.cloud.aiplatform.v1.CancelCustomJobRequest; import com.google.cloud.aiplatform.v1.CancelDataLabelingJobRequest; import com.google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest; +import com.google.cloud.aiplatform.v1.CancelNasJobRequest; import com.google.cloud.aiplatform.v1.CreateBatchPredictionJobRequest; import com.google.cloud.aiplatform.v1.CreateCustomJobRequest; import com.google.cloud.aiplatform.v1.CreateDataLabelingJobRequest; import com.google.cloud.aiplatform.v1.CreateHyperparameterTuningJobRequest; import com.google.cloud.aiplatform.v1.CreateModelDeploymentMonitoringJobRequest; +import com.google.cloud.aiplatform.v1.CreateNasJobRequest; import com.google.cloud.aiplatform.v1.CustomJob; import com.google.cloud.aiplatform.v1.DataLabelingJob; import com.google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequest; @@ -48,12 +52,15 @@ import com.google.cloud.aiplatform.v1.DeleteDataLabelingJobRequest; import com.google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequest; import com.google.cloud.aiplatform.v1.DeleteModelDeploymentMonitoringJobRequest; +import com.google.cloud.aiplatform.v1.DeleteNasJobRequest; import com.google.cloud.aiplatform.v1.DeleteOperationMetadata; import com.google.cloud.aiplatform.v1.GetBatchPredictionJobRequest; import com.google.cloud.aiplatform.v1.GetCustomJobRequest; import com.google.cloud.aiplatform.v1.GetDataLabelingJobRequest; import com.google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequest; import com.google.cloud.aiplatform.v1.GetModelDeploymentMonitoringJobRequest; +import com.google.cloud.aiplatform.v1.GetNasJobRequest; +import com.google.cloud.aiplatform.v1.GetNasTrialDetailRequest; import com.google.cloud.aiplatform.v1.HyperparameterTuningJob; import com.google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest; import com.google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse; @@ -65,7 +72,13 @@ import com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse; import com.google.cloud.aiplatform.v1.ListModelDeploymentMonitoringJobsRequest; import com.google.cloud.aiplatform.v1.ListModelDeploymentMonitoringJobsResponse; +import com.google.cloud.aiplatform.v1.ListNasJobsRequest; +import com.google.cloud.aiplatform.v1.ListNasJobsResponse; +import com.google.cloud.aiplatform.v1.ListNasTrialDetailsRequest; +import com.google.cloud.aiplatform.v1.ListNasTrialDetailsResponse; import com.google.cloud.aiplatform.v1.ModelDeploymentMonitoringJob; +import com.google.cloud.aiplatform.v1.NasJob; +import com.google.cloud.aiplatform.v1.NasTrialDetail; import com.google.cloud.aiplatform.v1.PauseModelDeploymentMonitoringJobRequest; import com.google.cloud.aiplatform.v1.ResumeModelDeploymentMonitoringJobRequest; import com.google.cloud.aiplatform.v1.SearchModelDeploymentMonitoringStatsAnomaliesRequest; @@ -262,6 +275,70 @@ public class GrpcJobServiceStub extends JobServiceStub { .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) .build(); + private static final MethodDescriptor createNasJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.JobService/CreateNasJob") + .setRequestMarshaller(ProtoUtils.marshaller(CreateNasJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(NasJob.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getNasJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.JobService/GetNasJob") + .setRequestMarshaller(ProtoUtils.marshaller(GetNasJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(NasJob.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listNasJobsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.JobService/ListNasJobs") + .setRequestMarshaller(ProtoUtils.marshaller(ListNasJobsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListNasJobsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteNasJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.JobService/DeleteNasJob") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteNasJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor cancelNasJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.JobService/CancelNasJob") + .setRequestMarshaller(ProtoUtils.marshaller(CancelNasJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getNasTrialDetailMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.JobService/GetNasTrialDetail") + .setRequestMarshaller( + ProtoUtils.marshaller(GetNasTrialDetailRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(NasTrialDetail.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listNasTrialDetailsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.JobService/ListNasTrialDetails") + .setRequestMarshaller( + ProtoUtils.marshaller(ListNasTrialDetailsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListNasTrialDetailsResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor createBatchPredictionJobMethodDescriptor = MethodDescriptor.newBuilder() @@ -514,6 +591,20 @@ public class GrpcJobServiceStub extends JobServiceStub { deleteHyperparameterTuningJobOperationCallable; private final UnaryCallable cancelHyperparameterTuningJobCallable; + private final UnaryCallable createNasJobCallable; + private final UnaryCallable getNasJobCallable; + private final UnaryCallable listNasJobsCallable; + private final UnaryCallable + listNasJobsPagedCallable; + private final UnaryCallable deleteNasJobCallable; + private final OperationCallable + deleteNasJobOperationCallable; + private final UnaryCallable cancelNasJobCallable; + private final UnaryCallable getNasTrialDetailCallable; + private final UnaryCallable + listNasTrialDetailsCallable; + private final UnaryCallable + listNasTrialDetailsPagedCallable; private final UnaryCallable createBatchPredictionJobCallable; private final UnaryCallable @@ -778,6 +869,77 @@ protected GrpcJobServiceStub( return params.build(); }) .build(); + GrpcCallSettings createNasJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createNasJobMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings getNasJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getNasJobMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings listNasJobsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listNasJobsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteNasJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteNasJobMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings cancelNasJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(cancelNasJobMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings getNasTrialDetailTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getNasTrialDetailMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + listNasTrialDetailsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listNasTrialDetailsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); GrpcCallSettings createBatchPredictionJobTransportSettings = GrpcCallSettings.newBuilder() @@ -1086,6 +1248,45 @@ protected GrpcJobServiceStub( cancelHyperparameterTuningJobTransportSettings, settings.cancelHyperparameterTuningJobSettings(), clientContext); + this.createNasJobCallable = + callableFactory.createUnaryCallable( + createNasJobTransportSettings, settings.createNasJobSettings(), clientContext); + this.getNasJobCallable = + callableFactory.createUnaryCallable( + getNasJobTransportSettings, settings.getNasJobSettings(), clientContext); + this.listNasJobsCallable = + callableFactory.createUnaryCallable( + listNasJobsTransportSettings, settings.listNasJobsSettings(), clientContext); + this.listNasJobsPagedCallable = + callableFactory.createPagedCallable( + listNasJobsTransportSettings, settings.listNasJobsSettings(), clientContext); + this.deleteNasJobCallable = + callableFactory.createUnaryCallable( + deleteNasJobTransportSettings, settings.deleteNasJobSettings(), clientContext); + this.deleteNasJobOperationCallable = + callableFactory.createOperationCallable( + deleteNasJobTransportSettings, + settings.deleteNasJobOperationSettings(), + clientContext, + operationsStub); + this.cancelNasJobCallable = + callableFactory.createUnaryCallable( + cancelNasJobTransportSettings, settings.cancelNasJobSettings(), clientContext); + this.getNasTrialDetailCallable = + callableFactory.createUnaryCallable( + getNasTrialDetailTransportSettings, + settings.getNasTrialDetailSettings(), + clientContext); + this.listNasTrialDetailsCallable = + callableFactory.createUnaryCallable( + listNasTrialDetailsTransportSettings, + settings.listNasTrialDetailsSettings(), + clientContext); + this.listNasTrialDetailsPagedCallable = + callableFactory.createPagedCallable( + listNasTrialDetailsTransportSettings, + settings.listNasTrialDetailsSettings(), + clientContext); this.createBatchPredictionJobCallable = callableFactory.createUnaryCallable( createBatchPredictionJobTransportSettings, @@ -1332,6 +1533,59 @@ public UnaryCallable cancelDataLabelingJobC return cancelHyperparameterTuningJobCallable; } + @Override + public UnaryCallable createNasJobCallable() { + return createNasJobCallable; + } + + @Override + public UnaryCallable getNasJobCallable() { + return getNasJobCallable; + } + + @Override + public UnaryCallable listNasJobsCallable() { + return listNasJobsCallable; + } + + @Override + public UnaryCallable listNasJobsPagedCallable() { + return listNasJobsPagedCallable; + } + + @Override + public UnaryCallable deleteNasJobCallable() { + return deleteNasJobCallable; + } + + @Override + public OperationCallable + deleteNasJobOperationCallable() { + return deleteNasJobOperationCallable; + } + + @Override + public UnaryCallable cancelNasJobCallable() { + return cancelNasJobCallable; + } + + @Override + public UnaryCallable getNasTrialDetailCallable() { + return getNasTrialDetailCallable; + } + + @Override + public UnaryCallable + listNasTrialDetailsCallable() { + return listNasTrialDetailsCallable; + } + + @Override + public UnaryCallable + listNasTrialDetailsPagedCallable() { + return listNasTrialDetailsPagedCallable; + } + @Override public UnaryCallable createBatchPredictionJobCallable() { diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcModelServiceStub.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcModelServiceStub.java index 53fa1a68b58f..73780bb43157 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcModelServiceStub.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/GrpcModelServiceStub.java @@ -31,6 +31,9 @@ import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesRequest; import com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesResponse; +import com.google.cloud.aiplatform.v1.CopyModelOperationMetadata; +import com.google.cloud.aiplatform.v1.CopyModelRequest; +import com.google.cloud.aiplatform.v1.CopyModelResponse; import com.google.cloud.aiplatform.v1.DeleteModelRequest; import com.google.cloud.aiplatform.v1.DeleteModelVersionRequest; import com.google.cloud.aiplatform.v1.DeleteOperationMetadata; @@ -164,6 +167,14 @@ public class GrpcModelServiceStub extends ModelServiceStub { .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); + private static final MethodDescriptor copyModelMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.ModelService/CopyModel") + .setRequestMarshaller(ProtoUtils.marshaller(CopyModelRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private static final MethodDescriptor importModelEvaluationMethodDescriptor = MethodDescriptor.newBuilder() @@ -306,6 +317,9 @@ public class GrpcModelServiceStub extends ModelServiceStub { private final OperationCallable< ExportModelRequest, ExportModelResponse, ExportModelOperationMetadata> exportModelOperationCallable; + private final UnaryCallable copyModelCallable; + private final OperationCallable + copyModelOperationCallable; private final UnaryCallable importModelEvaluationCallable; private final UnaryCallable< @@ -466,6 +480,16 @@ protected GrpcModelServiceStub( return params.build(); }) .build(); + GrpcCallSettings copyModelTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(copyModelMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); GrpcCallSettings importModelEvaluationTransportSettings = GrpcCallSettings.newBuilder() @@ -653,6 +677,15 @@ protected GrpcModelServiceStub( settings.exportModelOperationSettings(), clientContext, operationsStub); + this.copyModelCallable = + callableFactory.createUnaryCallable( + copyModelTransportSettings, settings.copyModelSettings(), clientContext); + this.copyModelOperationCallable = + callableFactory.createOperationCallable( + copyModelTransportSettings, + settings.copyModelOperationSettings(), + clientContext, + operationsStub); this.importModelEvaluationCallable = callableFactory.createUnaryCallable( importModelEvaluationTransportSettings, @@ -803,6 +836,17 @@ public UnaryCallable exportModelCallable() { return exportModelOperationCallable; } + @Override + public UnaryCallable copyModelCallable() { + return copyModelCallable; + } + + @Override + public OperationCallable + copyModelOperationCallable() { + return copyModelOperationCallable; + } + @Override public UnaryCallable importModelEvaluationCallable() { diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/JobServiceStub.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/JobServiceStub.java index ebe4351f944b..2132620dd9f0 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/JobServiceStub.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/JobServiceStub.java @@ -22,6 +22,8 @@ import static com.google.cloud.aiplatform.v1.JobServiceClient.ListHyperparameterTuningJobsPagedResponse; import static com.google.cloud.aiplatform.v1.JobServiceClient.ListLocationsPagedResponse; import static com.google.cloud.aiplatform.v1.JobServiceClient.ListModelDeploymentMonitoringJobsPagedResponse; +import static com.google.cloud.aiplatform.v1.JobServiceClient.ListNasJobsPagedResponse; +import static com.google.cloud.aiplatform.v1.JobServiceClient.ListNasTrialDetailsPagedResponse; import static com.google.cloud.aiplatform.v1.JobServiceClient.SearchModelDeploymentMonitoringStatsAnomaliesPagedResponse; import com.google.api.gax.core.BackgroundResource; @@ -32,11 +34,13 @@ import com.google.cloud.aiplatform.v1.CancelCustomJobRequest; import com.google.cloud.aiplatform.v1.CancelDataLabelingJobRequest; import com.google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest; +import com.google.cloud.aiplatform.v1.CancelNasJobRequest; import com.google.cloud.aiplatform.v1.CreateBatchPredictionJobRequest; import com.google.cloud.aiplatform.v1.CreateCustomJobRequest; import com.google.cloud.aiplatform.v1.CreateDataLabelingJobRequest; import com.google.cloud.aiplatform.v1.CreateHyperparameterTuningJobRequest; import com.google.cloud.aiplatform.v1.CreateModelDeploymentMonitoringJobRequest; +import com.google.cloud.aiplatform.v1.CreateNasJobRequest; import com.google.cloud.aiplatform.v1.CustomJob; import com.google.cloud.aiplatform.v1.DataLabelingJob; import com.google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequest; @@ -44,12 +48,15 @@ import com.google.cloud.aiplatform.v1.DeleteDataLabelingJobRequest; import com.google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequest; import com.google.cloud.aiplatform.v1.DeleteModelDeploymentMonitoringJobRequest; +import com.google.cloud.aiplatform.v1.DeleteNasJobRequest; import com.google.cloud.aiplatform.v1.DeleteOperationMetadata; import com.google.cloud.aiplatform.v1.GetBatchPredictionJobRequest; import com.google.cloud.aiplatform.v1.GetCustomJobRequest; import com.google.cloud.aiplatform.v1.GetDataLabelingJobRequest; import com.google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequest; import com.google.cloud.aiplatform.v1.GetModelDeploymentMonitoringJobRequest; +import com.google.cloud.aiplatform.v1.GetNasJobRequest; +import com.google.cloud.aiplatform.v1.GetNasTrialDetailRequest; import com.google.cloud.aiplatform.v1.HyperparameterTuningJob; import com.google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest; import com.google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse; @@ -61,7 +68,13 @@ import com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse; import com.google.cloud.aiplatform.v1.ListModelDeploymentMonitoringJobsRequest; import com.google.cloud.aiplatform.v1.ListModelDeploymentMonitoringJobsResponse; +import com.google.cloud.aiplatform.v1.ListNasJobsRequest; +import com.google.cloud.aiplatform.v1.ListNasJobsResponse; +import com.google.cloud.aiplatform.v1.ListNasTrialDetailsRequest; +import com.google.cloud.aiplatform.v1.ListNasTrialDetailsResponse; import com.google.cloud.aiplatform.v1.ModelDeploymentMonitoringJob; +import com.google.cloud.aiplatform.v1.NasJob; +import com.google.cloud.aiplatform.v1.NasTrialDetail; import com.google.cloud.aiplatform.v1.PauseModelDeploymentMonitoringJobRequest; import com.google.cloud.aiplatform.v1.ResumeModelDeploymentMonitoringJobRequest; import com.google.cloud.aiplatform.v1.SearchModelDeploymentMonitoringStatsAnomaliesRequest; @@ -201,6 +214,49 @@ public UnaryCallable cancelDataLabelingJobC "Not implemented: cancelHyperparameterTuningJobCallable()"); } + public UnaryCallable createNasJobCallable() { + throw new UnsupportedOperationException("Not implemented: createNasJobCallable()"); + } + + public UnaryCallable getNasJobCallable() { + throw new UnsupportedOperationException("Not implemented: getNasJobCallable()"); + } + + public UnaryCallable listNasJobsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listNasJobsPagedCallable()"); + } + + public UnaryCallable listNasJobsCallable() { + throw new UnsupportedOperationException("Not implemented: listNasJobsCallable()"); + } + + public OperationCallable + deleteNasJobOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteNasJobOperationCallable()"); + } + + public UnaryCallable deleteNasJobCallable() { + throw new UnsupportedOperationException("Not implemented: deleteNasJobCallable()"); + } + + public UnaryCallable cancelNasJobCallable() { + throw new UnsupportedOperationException("Not implemented: cancelNasJobCallable()"); + } + + public UnaryCallable getNasTrialDetailCallable() { + throw new UnsupportedOperationException("Not implemented: getNasTrialDetailCallable()"); + } + + public UnaryCallable + listNasTrialDetailsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listNasTrialDetailsPagedCallable()"); + } + + public UnaryCallable + listNasTrialDetailsCallable() { + throw new UnsupportedOperationException("Not implemented: listNasTrialDetailsCallable()"); + } + public UnaryCallable createBatchPredictionJobCallable() { throw new UnsupportedOperationException("Not implemented: createBatchPredictionJobCallable()"); diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/JobServiceStubSettings.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/JobServiceStubSettings.java index 573ddd32b35a..4fb8872ec704 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/JobServiceStubSettings.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/JobServiceStubSettings.java @@ -22,6 +22,8 @@ import static com.google.cloud.aiplatform.v1.JobServiceClient.ListHyperparameterTuningJobsPagedResponse; import static com.google.cloud.aiplatform.v1.JobServiceClient.ListLocationsPagedResponse; import static com.google.cloud.aiplatform.v1.JobServiceClient.ListModelDeploymentMonitoringJobsPagedResponse; +import static com.google.cloud.aiplatform.v1.JobServiceClient.ListNasJobsPagedResponse; +import static com.google.cloud.aiplatform.v1.JobServiceClient.ListNasTrialDetailsPagedResponse; import static com.google.cloud.aiplatform.v1.JobServiceClient.SearchModelDeploymentMonitoringStatsAnomaliesPagedResponse; import com.google.api.core.ApiFunction; @@ -55,11 +57,13 @@ import com.google.cloud.aiplatform.v1.CancelCustomJobRequest; import com.google.cloud.aiplatform.v1.CancelDataLabelingJobRequest; import com.google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest; +import com.google.cloud.aiplatform.v1.CancelNasJobRequest; import com.google.cloud.aiplatform.v1.CreateBatchPredictionJobRequest; import com.google.cloud.aiplatform.v1.CreateCustomJobRequest; import com.google.cloud.aiplatform.v1.CreateDataLabelingJobRequest; import com.google.cloud.aiplatform.v1.CreateHyperparameterTuningJobRequest; import com.google.cloud.aiplatform.v1.CreateModelDeploymentMonitoringJobRequest; +import com.google.cloud.aiplatform.v1.CreateNasJobRequest; import com.google.cloud.aiplatform.v1.CustomJob; import com.google.cloud.aiplatform.v1.DataLabelingJob; import com.google.cloud.aiplatform.v1.DeleteBatchPredictionJobRequest; @@ -67,12 +71,15 @@ import com.google.cloud.aiplatform.v1.DeleteDataLabelingJobRequest; import com.google.cloud.aiplatform.v1.DeleteHyperparameterTuningJobRequest; import com.google.cloud.aiplatform.v1.DeleteModelDeploymentMonitoringJobRequest; +import com.google.cloud.aiplatform.v1.DeleteNasJobRequest; import com.google.cloud.aiplatform.v1.DeleteOperationMetadata; import com.google.cloud.aiplatform.v1.GetBatchPredictionJobRequest; import com.google.cloud.aiplatform.v1.GetCustomJobRequest; import com.google.cloud.aiplatform.v1.GetDataLabelingJobRequest; import com.google.cloud.aiplatform.v1.GetHyperparameterTuningJobRequest; import com.google.cloud.aiplatform.v1.GetModelDeploymentMonitoringJobRequest; +import com.google.cloud.aiplatform.v1.GetNasJobRequest; +import com.google.cloud.aiplatform.v1.GetNasTrialDetailRequest; import com.google.cloud.aiplatform.v1.HyperparameterTuningJob; import com.google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest; import com.google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse; @@ -84,8 +91,14 @@ import com.google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse; import com.google.cloud.aiplatform.v1.ListModelDeploymentMonitoringJobsRequest; import com.google.cloud.aiplatform.v1.ListModelDeploymentMonitoringJobsResponse; +import com.google.cloud.aiplatform.v1.ListNasJobsRequest; +import com.google.cloud.aiplatform.v1.ListNasJobsResponse; +import com.google.cloud.aiplatform.v1.ListNasTrialDetailsRequest; +import com.google.cloud.aiplatform.v1.ListNasTrialDetailsResponse; import com.google.cloud.aiplatform.v1.ModelDeploymentMonitoringJob; import com.google.cloud.aiplatform.v1.ModelMonitoringStatsAnomalies; +import com.google.cloud.aiplatform.v1.NasJob; +import com.google.cloud.aiplatform.v1.NasTrialDetail; import com.google.cloud.aiplatform.v1.PauseModelDeploymentMonitoringJobRequest; import com.google.cloud.aiplatform.v1.ResumeModelDeploymentMonitoringJobRequest; import com.google.cloud.aiplatform.v1.SearchModelDeploymentMonitoringStatsAnomaliesRequest; @@ -152,7 +165,10 @@ public class JobServiceStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + ImmutableList.builder() + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/cloud-platform.read-only") + .build(); private final UnaryCallSettings createCustomJobSettings; private final UnaryCallSettings getCustomJobSettings; @@ -194,6 +210,19 @@ public class JobServiceStubSettings extends StubSettings deleteHyperparameterTuningJobOperationSettings; private final UnaryCallSettings cancelHyperparameterTuningJobSettings; + private final UnaryCallSettings createNasJobSettings; + private final UnaryCallSettings getNasJobSettings; + private final PagedCallSettings + listNasJobsSettings; + private final UnaryCallSettings deleteNasJobSettings; + private final OperationCallSettings + deleteNasJobOperationSettings; + private final UnaryCallSettings cancelNasJobSettings; + private final UnaryCallSettings + getNasTrialDetailSettings; + private final PagedCallSettings< + ListNasTrialDetailsRequest, ListNasTrialDetailsResponse, ListNasTrialDetailsPagedResponse> + listNasTrialDetailsSettings; private final UnaryCallSettings createBatchPredictionJobSettings; private final UnaryCallSettings @@ -378,6 +407,82 @@ public Iterable extractResources( } }; + private static final PagedListDescriptor + LIST_NAS_JOBS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListNasJobsRequest injectToken(ListNasJobsRequest payload, String token) { + return ListNasJobsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListNasJobsRequest injectPageSize(ListNasJobsRequest payload, int pageSize) { + return ListNasJobsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListNasJobsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListNasJobsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListNasJobsResponse payload) { + return payload.getNasJobsList() == null + ? ImmutableList.of() + : payload.getNasJobsList(); + } + }; + + private static final PagedListDescriptor< + ListNasTrialDetailsRequest, ListNasTrialDetailsResponse, NasTrialDetail> + LIST_NAS_TRIAL_DETAILS_PAGE_STR_DESC = + new PagedListDescriptor< + ListNasTrialDetailsRequest, ListNasTrialDetailsResponse, NasTrialDetail>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListNasTrialDetailsRequest injectToken( + ListNasTrialDetailsRequest payload, String token) { + return ListNasTrialDetailsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListNasTrialDetailsRequest injectPageSize( + ListNasTrialDetailsRequest payload, int pageSize) { + return ListNasTrialDetailsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListNasTrialDetailsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListNasTrialDetailsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListNasTrialDetailsResponse payload) { + return payload.getNasTrialDetailsList() == null + ? ImmutableList.of() + : payload.getNasTrialDetailsList(); + } + }; + private static final PagedListDescriptor< ListBatchPredictionJobsRequest, ListBatchPredictionJobsResponse, BatchPredictionJob> LIST_BATCH_PREDICTION_JOBS_PAGE_STR_DESC = @@ -632,6 +737,44 @@ public ApiFuture getFuturePagedRespon } }; + private static final PagedListResponseFactory< + ListNasJobsRequest, ListNasJobsResponse, ListNasJobsPagedResponse> + LIST_NAS_JOBS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListNasJobsRequest, ListNasJobsResponse, ListNasJobsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListNasJobsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_NAS_JOBS_PAGE_STR_DESC, request, context); + return ListNasJobsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListNasTrialDetailsRequest, ListNasTrialDetailsResponse, ListNasTrialDetailsPagedResponse> + LIST_NAS_TRIAL_DETAILS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListNasTrialDetailsRequest, + ListNasTrialDetailsResponse, + ListNasTrialDetailsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListNasTrialDetailsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_NAS_TRIAL_DETAILS_PAGE_STR_DESC, request, context); + return ListNasTrialDetailsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + private static final PagedListResponseFactory< ListBatchPredictionJobsRequest, ListBatchPredictionJobsResponse, @@ -854,6 +997,50 @@ public UnaryCallSettings cancelDataLabeling return cancelHyperparameterTuningJobSettings; } + /** Returns the object with the settings used for calls to createNasJob. */ + public UnaryCallSettings createNasJobSettings() { + return createNasJobSettings; + } + + /** Returns the object with the settings used for calls to getNasJob. */ + public UnaryCallSettings getNasJobSettings() { + return getNasJobSettings; + } + + /** Returns the object with the settings used for calls to listNasJobs. */ + public PagedCallSettings + listNasJobsSettings() { + return listNasJobsSettings; + } + + /** Returns the object with the settings used for calls to deleteNasJob. */ + public UnaryCallSettings deleteNasJobSettings() { + return deleteNasJobSettings; + } + + /** Returns the object with the settings used for calls to deleteNasJob. */ + public OperationCallSettings + deleteNasJobOperationSettings() { + return deleteNasJobOperationSettings; + } + + /** Returns the object with the settings used for calls to cancelNasJob. */ + public UnaryCallSettings cancelNasJobSettings() { + return cancelNasJobSettings; + } + + /** Returns the object with the settings used for calls to getNasTrialDetail. */ + public UnaryCallSettings getNasTrialDetailSettings() { + return getNasTrialDetailSettings; + } + + /** Returns the object with the settings used for calls to listNasTrialDetails. */ + public PagedCallSettings< + ListNasTrialDetailsRequest, ListNasTrialDetailsResponse, ListNasTrialDetailsPagedResponse> + listNasTrialDetailsSettings() { + return listNasTrialDetailsSettings; + } + /** Returns the object with the settings used for calls to createBatchPredictionJob. */ public UnaryCallSettings createBatchPredictionJobSettings() { @@ -1093,6 +1280,14 @@ protected JobServiceStubSettings(Builder settingsBuilder) throws IOException { settingsBuilder.deleteHyperparameterTuningJobOperationSettings().build(); cancelHyperparameterTuningJobSettings = settingsBuilder.cancelHyperparameterTuningJobSettings().build(); + createNasJobSettings = settingsBuilder.createNasJobSettings().build(); + getNasJobSettings = settingsBuilder.getNasJobSettings().build(); + listNasJobsSettings = settingsBuilder.listNasJobsSettings().build(); + deleteNasJobSettings = settingsBuilder.deleteNasJobSettings().build(); + deleteNasJobOperationSettings = settingsBuilder.deleteNasJobOperationSettings().build(); + cancelNasJobSettings = settingsBuilder.cancelNasJobSettings().build(); + getNasTrialDetailSettings = settingsBuilder.getNasTrialDetailSettings().build(); + listNasTrialDetailsSettings = settingsBuilder.listNasTrialDetailsSettings().build(); createBatchPredictionJobSettings = settingsBuilder.createBatchPredictionJobSettings().build(); getBatchPredictionJobSettings = settingsBuilder.getBatchPredictionJobSettings().build(); listBatchPredictionJobsSettings = settingsBuilder.listBatchPredictionJobsSettings().build(); @@ -1176,6 +1371,22 @@ public static class Builder extends StubSettings.Builder cancelHyperparameterTuningJobSettings; + private final UnaryCallSettings.Builder createNasJobSettings; + private final UnaryCallSettings.Builder getNasJobSettings; + private final PagedCallSettings.Builder< + ListNasJobsRequest, ListNasJobsResponse, ListNasJobsPagedResponse> + listNasJobsSettings; + private final UnaryCallSettings.Builder deleteNasJobSettings; + private final OperationCallSettings.Builder + deleteNasJobOperationSettings; + private final UnaryCallSettings.Builder cancelNasJobSettings; + private final UnaryCallSettings.Builder + getNasTrialDetailSettings; + private final PagedCallSettings.Builder< + ListNasTrialDetailsRequest, + ListNasTrialDetailsResponse, + ListNasTrialDetailsPagedResponse> + listNasTrialDetailsSettings; private final UnaryCallSettings.Builder createBatchPredictionJobSettings; private final UnaryCallSettings.Builder @@ -1279,6 +1490,15 @@ protected Builder(ClientContext clientContext) { deleteHyperparameterTuningJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); deleteHyperparameterTuningJobOperationSettings = OperationCallSettings.newBuilder(); cancelHyperparameterTuningJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createNasJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getNasJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listNasJobsSettings = PagedCallSettings.newBuilder(LIST_NAS_JOBS_PAGE_STR_FACT); + deleteNasJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteNasJobOperationSettings = OperationCallSettings.newBuilder(); + cancelNasJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getNasTrialDetailSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listNasTrialDetailsSettings = + PagedCallSettings.newBuilder(LIST_NAS_TRIAL_DETAILS_PAGE_STR_FACT); createBatchPredictionJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); getBatchPredictionJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); listBatchPredictionJobsSettings = @@ -1322,6 +1542,13 @@ protected Builder(ClientContext clientContext) { listHyperparameterTuningJobsSettings, deleteHyperparameterTuningJobSettings, cancelHyperparameterTuningJobSettings, + createNasJobSettings, + getNasJobSettings, + listNasJobsSettings, + deleteNasJobSettings, + cancelNasJobSettings, + getNasTrialDetailSettings, + listNasTrialDetailsSettings, createBatchPredictionJobSettings, getBatchPredictionJobSettings, listBatchPredictionJobsSettings, @@ -1370,6 +1597,14 @@ protected Builder(JobServiceStubSettings settings) { settings.deleteHyperparameterTuningJobOperationSettings.toBuilder(); cancelHyperparameterTuningJobSettings = settings.cancelHyperparameterTuningJobSettings.toBuilder(); + createNasJobSettings = settings.createNasJobSettings.toBuilder(); + getNasJobSettings = settings.getNasJobSettings.toBuilder(); + listNasJobsSettings = settings.listNasJobsSettings.toBuilder(); + deleteNasJobSettings = settings.deleteNasJobSettings.toBuilder(); + deleteNasJobOperationSettings = settings.deleteNasJobOperationSettings.toBuilder(); + cancelNasJobSettings = settings.cancelNasJobSettings.toBuilder(); + getNasTrialDetailSettings = settings.getNasTrialDetailSettings.toBuilder(); + listNasTrialDetailsSettings = settings.listNasTrialDetailsSettings.toBuilder(); createBatchPredictionJobSettings = settings.createBatchPredictionJobSettings.toBuilder(); getBatchPredictionJobSettings = settings.getBatchPredictionJobSettings.toBuilder(); listBatchPredictionJobsSettings = settings.listBatchPredictionJobsSettings.toBuilder(); @@ -1420,6 +1655,13 @@ protected Builder(JobServiceStubSettings settings) { listHyperparameterTuningJobsSettings, deleteHyperparameterTuningJobSettings, cancelHyperparameterTuningJobSettings, + createNasJobSettings, + getNasJobSettings, + listNasJobsSettings, + deleteNasJobSettings, + cancelNasJobSettings, + getNasTrialDetailSettings, + listNasTrialDetailsSettings, createBatchPredictionJobSettings, getBatchPredictionJobSettings, listBatchPredictionJobsSettings, @@ -1529,6 +1771,41 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder + .createNasJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getNasJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listNasJobsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteNasJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .cancelNasJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getNasTrialDetailSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listNasTrialDetailsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder .createBatchPredictionJobSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) @@ -1692,6 +1969,30 @@ private static Builder initDefaults(Builder builder) { .setTotalTimeout(Duration.ofMillis(300000L)) .build())); + builder + .deleteNasJobOperationSettings() + .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 .deleteBatchPredictionJobOperationSettings() .setInitialCallSettings( @@ -1905,6 +2206,56 @@ public UnaryCallSettings.Builder cancelCustomJobS return cancelHyperparameterTuningJobSettings; } + /** Returns the builder for the settings used for calls to createNasJob. */ + public UnaryCallSettings.Builder createNasJobSettings() { + return createNasJobSettings; + } + + /** Returns the builder for the settings used for calls to getNasJob. */ + public UnaryCallSettings.Builder getNasJobSettings() { + return getNasJobSettings; + } + + /** Returns the builder for the settings used for calls to listNasJobs. */ + public PagedCallSettings.Builder< + ListNasJobsRequest, ListNasJobsResponse, ListNasJobsPagedResponse> + listNasJobsSettings() { + return listNasJobsSettings; + } + + /** Returns the builder for the settings used for calls to deleteNasJob. */ + public UnaryCallSettings.Builder deleteNasJobSettings() { + return deleteNasJobSettings; + } + + /** Returns the builder for the settings used for calls to deleteNasJob. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteNasJobOperationSettings() { + return deleteNasJobOperationSettings; + } + + /** Returns the builder for the settings used for calls to cancelNasJob. */ + public UnaryCallSettings.Builder cancelNasJobSettings() { + return cancelNasJobSettings; + } + + /** Returns the builder for the settings used for calls to getNasTrialDetail. */ + public UnaryCallSettings.Builder + getNasTrialDetailSettings() { + return getNasTrialDetailSettings; + } + + /** Returns the builder for the settings used for calls to listNasTrialDetails. */ + public PagedCallSettings.Builder< + ListNasTrialDetailsRequest, + ListNasTrialDetailsResponse, + ListNasTrialDetailsPagedResponse> + listNasTrialDetailsSettings() { + return listNasTrialDetailsSettings; + } + /** Returns the builder for the settings used for calls to createBatchPredictionJob. */ public UnaryCallSettings.Builder createBatchPredictionJobSettings() { diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/ModelServiceStub.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/ModelServiceStub.java index 8453778fa532..d167d99f51f0 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/ModelServiceStub.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/ModelServiceStub.java @@ -27,6 +27,9 @@ import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesRequest; import com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesResponse; +import com.google.cloud.aiplatform.v1.CopyModelOperationMetadata; +import com.google.cloud.aiplatform.v1.CopyModelRequest; +import com.google.cloud.aiplatform.v1.CopyModelResponse; import com.google.cloud.aiplatform.v1.DeleteModelRequest; import com.google.cloud.aiplatform.v1.DeleteModelVersionRequest; import com.google.cloud.aiplatform.v1.DeleteOperationMetadata; @@ -147,6 +150,15 @@ public UnaryCallable exportModelCallable() { throw new UnsupportedOperationException("Not implemented: exportModelCallable()"); } + public OperationCallable + copyModelOperationCallable() { + throw new UnsupportedOperationException("Not implemented: copyModelOperationCallable()"); + } + + public UnaryCallable copyModelCallable() { + throw new UnsupportedOperationException("Not implemented: copyModelCallable()"); + } + public UnaryCallable importModelEvaluationCallable() { throw new UnsupportedOperationException("Not implemented: importModelEvaluationCallable()"); diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/ModelServiceStubSettings.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/ModelServiceStubSettings.java index e9ec95f7b6b5..d6beff0face4 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/ModelServiceStubSettings.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/ModelServiceStubSettings.java @@ -50,6 +50,9 @@ import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesRequest; import com.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesResponse; +import com.google.cloud.aiplatform.v1.CopyModelOperationMetadata; +import com.google.cloud.aiplatform.v1.CopyModelRequest; +import com.google.cloud.aiplatform.v1.CopyModelResponse; import com.google.cloud.aiplatform.v1.DeleteModelRequest; import com.google.cloud.aiplatform.v1.DeleteModelVersionRequest; import com.google.cloud.aiplatform.v1.DeleteOperationMetadata; @@ -161,6 +164,10 @@ public class ModelServiceStubSettings extends StubSettings exportModelOperationSettings; + private final UnaryCallSettings copyModelSettings; + private final OperationCallSettings< + CopyModelRequest, CopyModelResponse, CopyModelOperationMetadata> + copyModelOperationSettings; private final UnaryCallSettings importModelEvaluationSettings; private final UnaryCallSettings< @@ -567,6 +574,17 @@ public UnaryCallSettings exportModelSettings() { return exportModelOperationSettings; } + /** Returns the object with the settings used for calls to copyModel. */ + public UnaryCallSettings copyModelSettings() { + return copyModelSettings; + } + + /** Returns the object with the settings used for calls to copyModel. */ + public OperationCallSettings + copyModelOperationSettings() { + return copyModelOperationSettings; + } + /** Returns the object with the settings used for calls to importModelEvaluation. */ public UnaryCallSettings importModelEvaluationSettings() { @@ -726,6 +744,8 @@ protected ModelServiceStubSettings(Builder settingsBuilder) throws IOException { mergeVersionAliasesSettings = settingsBuilder.mergeVersionAliasesSettings().build(); exportModelSettings = settingsBuilder.exportModelSettings().build(); exportModelOperationSettings = settingsBuilder.exportModelOperationSettings().build(); + copyModelSettings = settingsBuilder.copyModelSettings().build(); + copyModelOperationSettings = settingsBuilder.copyModelOperationSettings().build(); importModelEvaluationSettings = settingsBuilder.importModelEvaluationSettings().build(); batchImportModelEvaluationSlicesSettings = settingsBuilder.batchImportModelEvaluationSlicesSettings().build(); @@ -769,6 +789,10 @@ public static class Builder extends StubSettings.Builder exportModelOperationSettings; + private final UnaryCallSettings.Builder copyModelSettings; + private final OperationCallSettings.Builder< + CopyModelRequest, CopyModelResponse, CopyModelOperationMetadata> + copyModelOperationSettings; private final UnaryCallSettings.Builder importModelEvaluationSettings; private final UnaryCallSettings.Builder< @@ -836,6 +860,8 @@ protected Builder(ClientContext clientContext) { mergeVersionAliasesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); exportModelSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); exportModelOperationSettings = OperationCallSettings.newBuilder(); + copyModelSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + copyModelOperationSettings = OperationCallSettings.newBuilder(); importModelEvaluationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); batchImportModelEvaluationSlicesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); getModelEvaluationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -861,6 +887,7 @@ protected Builder(ClientContext clientContext) { deleteModelVersionSettings, mergeVersionAliasesSettings, exportModelSettings, + copyModelSettings, importModelEvaluationSettings, batchImportModelEvaluationSlicesSettings, getModelEvaluationSettings, @@ -892,6 +919,8 @@ protected Builder(ModelServiceStubSettings settings) { mergeVersionAliasesSettings = settings.mergeVersionAliasesSettings.toBuilder(); exportModelSettings = settings.exportModelSettings.toBuilder(); exportModelOperationSettings = settings.exportModelOperationSettings.toBuilder(); + copyModelSettings = settings.copyModelSettings.toBuilder(); + copyModelOperationSettings = settings.copyModelOperationSettings.toBuilder(); importModelEvaluationSettings = settings.importModelEvaluationSettings.toBuilder(); batchImportModelEvaluationSlicesSettings = settings.batchImportModelEvaluationSlicesSettings.toBuilder(); @@ -916,6 +945,7 @@ protected Builder(ModelServiceStubSettings settings) { deleteModelVersionSettings, mergeVersionAliasesSettings, exportModelSettings, + copyModelSettings, importModelEvaluationSettings, batchImportModelEvaluationSlicesSettings, getModelEvaluationSettings, @@ -988,6 +1018,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder + .copyModelSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder .importModelEvaluationSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) @@ -1138,6 +1173,30 @@ private static Builder initDefaults(Builder builder) { .setTotalTimeout(Duration.ofMillis(300000L)) .build())); + builder + .copyModelOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(CopyModelResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + CopyModelOperationMetadata.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; } @@ -1240,6 +1299,20 @@ public UnaryCallSettings.Builder exportModelSetti return exportModelOperationSettings; } + /** Returns the builder for the settings used for calls to copyModel. */ + public UnaryCallSettings.Builder copyModelSettings() { + return copyModelSettings; + } + + /** Returns the builder for the settings used for calls to copyModel. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + CopyModelRequest, CopyModelResponse, CopyModelOperationMetadata> + copyModelOperationSettings() { + return copyModelOperationSettings; + } + /** Returns the builder for the settings used for calls to importModelEvaluation. */ public UnaryCallSettings.Builder importModelEvaluationSettings() { diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/JobServiceClient.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/JobServiceClient.java index 41d65ca53971..75e04d6d5341 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/JobServiceClient.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/JobServiceClient.java @@ -2331,6 +2331,973 @@ public final void cancelHyperparameterTuningJob(CancelHyperparameterTuningJobReq return stub.cancelHyperparameterTuningJobCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a NasJob + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   NasJob nasJob = NasJob.newBuilder().build();
+   *   NasJob response = jobServiceClient.createNasJob(parent, nasJob);
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location to create the NasJob in. Format: + * `projects/{project}/locations/{location}` + * @param nasJob Required. The NasJob to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final NasJob createNasJob(LocationName parent, NasJob nasJob) { + CreateNasJobRequest request = + CreateNasJobRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setNasJob(nasJob) + .build(); + return createNasJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a NasJob + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   NasJob nasJob = NasJob.newBuilder().build();
+   *   NasJob response = jobServiceClient.createNasJob(parent, nasJob);
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location to create the NasJob in. Format: + * `projects/{project}/locations/{location}` + * @param nasJob Required. The NasJob to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final NasJob createNasJob(String parent, NasJob nasJob) { + CreateNasJobRequest request = + CreateNasJobRequest.newBuilder().setParent(parent).setNasJob(nasJob).build(); + return createNasJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a NasJob + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   CreateNasJobRequest request =
+   *       CreateNasJobRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setNasJob(NasJob.newBuilder().build())
+   *           .build();
+   *   NasJob response = jobServiceClient.createNasJob(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 NasJob createNasJob(CreateNasJobRequest request) { + return createNasJobCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a NasJob + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   CreateNasJobRequest request =
+   *       CreateNasJobRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setNasJob(NasJob.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = jobServiceClient.createNasJobCallable().futureCall(request);
+   *   // Do something.
+   *   NasJob response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createNasJobCallable() { + return stub.createNasJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a NasJob + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   NasJobName name = NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]");
+   *   NasJob response = jobServiceClient.getNasJob(name);
+   * }
+   * }
+ * + * @param name Required. The name of the NasJob resource. Format: + * `projects/{project}/locations/{location}/nasJobs/{nas_job}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final NasJob getNasJob(NasJobName name) { + GetNasJobRequest request = + GetNasJobRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getNasJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a NasJob + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   String name = NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString();
+   *   NasJob response = jobServiceClient.getNasJob(name);
+   * }
+   * }
+ * + * @param name Required. The name of the NasJob resource. Format: + * `projects/{project}/locations/{location}/nasJobs/{nas_job}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final NasJob getNasJob(String name) { + GetNasJobRequest request = GetNasJobRequest.newBuilder().setName(name).build(); + return getNasJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a NasJob + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   GetNasJobRequest request =
+   *       GetNasJobRequest.newBuilder()
+   *           .setName(NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString())
+   *           .build();
+   *   NasJob response = jobServiceClient.getNasJob(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 NasJob getNasJob(GetNasJobRequest request) { + return getNasJobCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a NasJob + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   GetNasJobRequest request =
+   *       GetNasJobRequest.newBuilder()
+   *           .setName(NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString())
+   *           .build();
+   *   ApiFuture future = jobServiceClient.getNasJobCallable().futureCall(request);
+   *   // Do something.
+   *   NasJob response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getNasJobCallable() { + return stub.getNasJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists NasJobs 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 (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (NasJob element : jobServiceClient.listNasJobs(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location to list the NasJobs from. Format: + * `projects/{project}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListNasJobsPagedResponse listNasJobs(LocationName parent) { + ListNasJobsRequest request = + ListNasJobsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listNasJobs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists NasJobs 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 (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (NasJob element : jobServiceClient.listNasJobs(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location to list the NasJobs from. Format: + * `projects/{project}/locations/{location}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListNasJobsPagedResponse listNasJobs(String parent) { + ListNasJobsRequest request = ListNasJobsRequest.newBuilder().setParent(parent).build(); + return listNasJobs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists NasJobs 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 (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   ListNasJobsRequest request =
+   *       ListNasJobsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setReadMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   for (NasJob element : jobServiceClient.listNasJobs(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 ListNasJobsPagedResponse listNasJobs(ListNasJobsRequest request) { + return listNasJobsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists NasJobs 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 (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   ListNasJobsRequest request =
+   *       ListNasJobsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setReadMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = jobServiceClient.listNasJobsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (NasJob element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listNasJobsPagedCallable() { + return stub.listNasJobsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists NasJobs 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 (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   ListNasJobsRequest request =
+   *       ListNasJobsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setReadMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   while (true) {
+   *     ListNasJobsResponse response = jobServiceClient.listNasJobsCallable().call(request);
+   *     for (NasJob element : response.getNasJobsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listNasJobsCallable() { + return stub.listNasJobsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a NasJob. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   NasJobName name = NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]");
+   *   jobServiceClient.deleteNasJobAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the NasJob resource to be deleted. Format: + * `projects/{project}/locations/{location}/nasJobs/{nas_job}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteNasJobAsync(NasJobName name) { + DeleteNasJobRequest request = + DeleteNasJobRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return deleteNasJobAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a NasJob. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   String name = NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString();
+   *   jobServiceClient.deleteNasJobAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The name of the NasJob resource to be deleted. Format: + * `projects/{project}/locations/{location}/nasJobs/{nas_job}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteNasJobAsync(String name) { + DeleteNasJobRequest request = DeleteNasJobRequest.newBuilder().setName(name).build(); + return deleteNasJobAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a NasJob. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   DeleteNasJobRequest request =
+   *       DeleteNasJobRequest.newBuilder()
+   *           .setName(NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString())
+   *           .build();
+   *   jobServiceClient.deleteNasJobAsync(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 deleteNasJobAsync( + DeleteNasJobRequest request) { + return deleteNasJobOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a NasJob. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   DeleteNasJobRequest request =
+   *       DeleteNasJobRequest.newBuilder()
+   *           .setName(NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString())
+   *           .build();
+   *   OperationFuture future =
+   *       jobServiceClient.deleteNasJobOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteNasJobOperationCallable() { + return stub.deleteNasJobOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a NasJob. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   DeleteNasJobRequest request =
+   *       DeleteNasJobRequest.newBuilder()
+   *           .setName(NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString())
+   *           .build();
+   *   ApiFuture future = jobServiceClient.deleteNasJobCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteNasJobCallable() { + return stub.deleteNasJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Cancels a NasJob. Starts asynchronous cancellation on the NasJob. The server makes a best + * effort to cancel the job, but success is not guaranteed. Clients can use + * [JobService.GetNasJob][google.cloud.aiplatform.v1beta1.JobService.GetNasJob] or other methods + * to check whether the cancellation succeeded or whether the job completed despite cancellation. + * On successful cancellation, the NasJob is not deleted; instead it becomes a job with a + * [NasJob.error][google.cloud.aiplatform.v1beta1.NasJob.error] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and + * [NasJob.state][google.cloud.aiplatform.v1beta1.NasJob.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 (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   NasJobName name = NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]");
+   *   jobServiceClient.cancelNasJob(name);
+   * }
+   * }
+ * + * @param name Required. The name of the NasJob to cancel. Format: + * `projects/{project}/locations/{location}/nasJobs/{nas_job}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void cancelNasJob(NasJobName name) { + CancelNasJobRequest request = + CancelNasJobRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + cancelNasJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Cancels a NasJob. Starts asynchronous cancellation on the NasJob. The server makes a best + * effort to cancel the job, but success is not guaranteed. Clients can use + * [JobService.GetNasJob][google.cloud.aiplatform.v1beta1.JobService.GetNasJob] or other methods + * to check whether the cancellation succeeded or whether the job completed despite cancellation. + * On successful cancellation, the NasJob is not deleted; instead it becomes a job with a + * [NasJob.error][google.cloud.aiplatform.v1beta1.NasJob.error] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and + * [NasJob.state][google.cloud.aiplatform.v1beta1.NasJob.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 (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   String name = NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString();
+   *   jobServiceClient.cancelNasJob(name);
+   * }
+   * }
+ * + * @param name Required. The name of the NasJob to cancel. Format: + * `projects/{project}/locations/{location}/nasJobs/{nas_job}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void cancelNasJob(String name) { + CancelNasJobRequest request = CancelNasJobRequest.newBuilder().setName(name).build(); + cancelNasJob(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Cancels a NasJob. Starts asynchronous cancellation on the NasJob. The server makes a best + * effort to cancel the job, but success is not guaranteed. Clients can use + * [JobService.GetNasJob][google.cloud.aiplatform.v1beta1.JobService.GetNasJob] or other methods + * to check whether the cancellation succeeded or whether the job completed despite cancellation. + * On successful cancellation, the NasJob is not deleted; instead it becomes a job with a + * [NasJob.error][google.cloud.aiplatform.v1beta1.NasJob.error] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and + * [NasJob.state][google.cloud.aiplatform.v1beta1.NasJob.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 (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   CancelNasJobRequest request =
+   *       CancelNasJobRequest.newBuilder()
+   *           .setName(NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString())
+   *           .build();
+   *   jobServiceClient.cancelNasJob(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 cancelNasJob(CancelNasJobRequest request) { + cancelNasJobCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Cancels a NasJob. Starts asynchronous cancellation on the NasJob. The server makes a best + * effort to cancel the job, but success is not guaranteed. Clients can use + * [JobService.GetNasJob][google.cloud.aiplatform.v1beta1.JobService.GetNasJob] or other methods + * to check whether the cancellation succeeded or whether the job completed despite cancellation. + * On successful cancellation, the NasJob is not deleted; instead it becomes a job with a + * [NasJob.error][google.cloud.aiplatform.v1beta1.NasJob.error] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to `Code.CANCELLED`, and + * [NasJob.state][google.cloud.aiplatform.v1beta1.NasJob.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 (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   CancelNasJobRequest request =
+   *       CancelNasJobRequest.newBuilder()
+   *           .setName(NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString())
+   *           .build();
+   *   ApiFuture future = jobServiceClient.cancelNasJobCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable cancelNasJobCallable() { + return stub.cancelNasJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a NasTrialDetail. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   NasTrialDetailName name =
+   *       NasTrialDetailName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]", "[NAS_TRIAL_DETAIL]");
+   *   NasTrialDetail response = jobServiceClient.getNasTrialDetail(name);
+   * }
+   * }
+ * + * @param name Required. The name of the NasTrialDetail resource. Format: + * `projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final NasTrialDetail getNasTrialDetail(NasTrialDetailName name) { + GetNasTrialDetailRequest request = + GetNasTrialDetailRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getNasTrialDetail(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a NasTrialDetail. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   String name =
+   *       NasTrialDetailName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]", "[NAS_TRIAL_DETAIL]")
+   *           .toString();
+   *   NasTrialDetail response = jobServiceClient.getNasTrialDetail(name);
+   * }
+   * }
+ * + * @param name Required. The name of the NasTrialDetail resource. Format: + * `projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final NasTrialDetail getNasTrialDetail(String name) { + GetNasTrialDetailRequest request = GetNasTrialDetailRequest.newBuilder().setName(name).build(); + return getNasTrialDetail(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a NasTrialDetail. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   GetNasTrialDetailRequest request =
+   *       GetNasTrialDetailRequest.newBuilder()
+   *           .setName(
+   *               NasTrialDetailName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[NAS_JOB]", "[NAS_TRIAL_DETAIL]")
+   *                   .toString())
+   *           .build();
+   *   NasTrialDetail response = jobServiceClient.getNasTrialDetail(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 NasTrialDetail getNasTrialDetail(GetNasTrialDetailRequest request) { + return getNasTrialDetailCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a NasTrialDetail. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   GetNasTrialDetailRequest request =
+   *       GetNasTrialDetailRequest.newBuilder()
+   *           .setName(
+   *               NasTrialDetailName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[NAS_JOB]", "[NAS_TRIAL_DETAIL]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       jobServiceClient.getNasTrialDetailCallable().futureCall(request);
+   *   // Do something.
+   *   NasTrialDetail response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getNasTrialDetailCallable() { + return stub.getNasTrialDetailCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List top NasTrialDetails of a NasJob. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   NasJobName parent = NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]");
+   *   for (NasTrialDetail element : jobServiceClient.listNasTrialDetails(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The name of the NasJob resource. Format: + * `projects/{project}/locations/{location}/nasJobs/{nas_job}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListNasTrialDetailsPagedResponse listNasTrialDetails(NasJobName parent) { + ListNasTrialDetailsRequest request = + ListNasTrialDetailsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listNasTrialDetails(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List top NasTrialDetails of a NasJob. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   String parent = NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString();
+   *   for (NasTrialDetail element : jobServiceClient.listNasTrialDetails(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The name of the NasJob resource. Format: + * `projects/{project}/locations/{location}/nasJobs/{nas_job}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListNasTrialDetailsPagedResponse listNasTrialDetails(String parent) { + ListNasTrialDetailsRequest request = + ListNasTrialDetailsRequest.newBuilder().setParent(parent).build(); + return listNasTrialDetails(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List top NasTrialDetails of a NasJob. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   ListNasTrialDetailsRequest request =
+   *       ListNasTrialDetailsRequest.newBuilder()
+   *           .setParent(NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (NasTrialDetail element : jobServiceClient.listNasTrialDetails(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 ListNasTrialDetailsPagedResponse listNasTrialDetails( + ListNasTrialDetailsRequest request) { + return listNasTrialDetailsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List top NasTrialDetails of a NasJob. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   ListNasTrialDetailsRequest request =
+   *       ListNasTrialDetailsRequest.newBuilder()
+   *           .setParent(NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       jobServiceClient.listNasTrialDetailsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (NasTrialDetail element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listNasTrialDetailsPagedCallable() { + return stub.listNasTrialDetailsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List top NasTrialDetails of a NasJob. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (JobServiceClient jobServiceClient = JobServiceClient.create()) {
+   *   ListNasTrialDetailsRequest request =
+   *       ListNasTrialDetailsRequest.newBuilder()
+   *           .setParent(NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListNasTrialDetailsResponse response =
+   *         jobServiceClient.listNasTrialDetailsCallable().call(request);
+   *     for (NasTrialDetail element : response.getNasTrialDetailsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listNasTrialDetailsCallable() { + return stub.listNasTrialDetailsCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Creates a BatchPredictionJob. A BatchPredictionJob once created will right away be attempted to @@ -4997,6 +5964,163 @@ protected ListHyperparameterTuningJobsFixedSizeCollection createCollection( } } + public static class ListNasJobsPagedResponse + extends AbstractPagedListResponse< + ListNasJobsRequest, + ListNasJobsResponse, + NasJob, + ListNasJobsPage, + ListNasJobsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListNasJobsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListNasJobsPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListNasJobsPagedResponse(ListNasJobsPage page) { + super(page, ListNasJobsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListNasJobsPage + extends AbstractPage { + + private ListNasJobsPage( + PageContext context, + ListNasJobsResponse response) { + super(context, response); + } + + private static ListNasJobsPage createEmptyPage() { + return new ListNasJobsPage(null, null); + } + + @Override + protected ListNasJobsPage createPage( + PageContext context, + ListNasJobsResponse response) { + return new ListNasJobsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListNasJobsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListNasJobsRequest, + ListNasJobsResponse, + NasJob, + ListNasJobsPage, + ListNasJobsFixedSizeCollection> { + + private ListNasJobsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListNasJobsFixedSizeCollection createEmptyCollection() { + return new ListNasJobsFixedSizeCollection(null, 0); + } + + @Override + protected ListNasJobsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListNasJobsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListNasTrialDetailsPagedResponse + extends AbstractPagedListResponse< + ListNasTrialDetailsRequest, + ListNasTrialDetailsResponse, + NasTrialDetail, + ListNasTrialDetailsPage, + ListNasTrialDetailsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListNasTrialDetailsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListNasTrialDetailsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListNasTrialDetailsPagedResponse(ListNasTrialDetailsPage page) { + super(page, ListNasTrialDetailsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListNasTrialDetailsPage + extends AbstractPage< + ListNasTrialDetailsRequest, + ListNasTrialDetailsResponse, + NasTrialDetail, + ListNasTrialDetailsPage> { + + private ListNasTrialDetailsPage( + PageContext + context, + ListNasTrialDetailsResponse response) { + super(context, response); + } + + private static ListNasTrialDetailsPage createEmptyPage() { + return new ListNasTrialDetailsPage(null, null); + } + + @Override + protected ListNasTrialDetailsPage createPage( + PageContext + context, + ListNasTrialDetailsResponse response) { + return new ListNasTrialDetailsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListNasTrialDetailsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListNasTrialDetailsRequest, + ListNasTrialDetailsResponse, + NasTrialDetail, + ListNasTrialDetailsPage, + ListNasTrialDetailsFixedSizeCollection> { + + private ListNasTrialDetailsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListNasTrialDetailsFixedSizeCollection createEmptyCollection() { + return new ListNasTrialDetailsFixedSizeCollection(null, 0); + } + + @Override + protected ListNasTrialDetailsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListNasTrialDetailsFixedSizeCollection(pages, collectionSize); + } + } + public static class ListBatchPredictionJobsPagedResponse extends AbstractPagedListResponse< ListBatchPredictionJobsRequest, diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/JobServiceSettings.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/JobServiceSettings.java index d1c7434d3a35..4fa9a7959eb2 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/JobServiceSettings.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/JobServiceSettings.java @@ -22,6 +22,8 @@ import static com.google.cloud.aiplatform.v1beta1.JobServiceClient.ListHyperparameterTuningJobsPagedResponse; import static com.google.cloud.aiplatform.v1beta1.JobServiceClient.ListLocationsPagedResponse; import static com.google.cloud.aiplatform.v1beta1.JobServiceClient.ListModelDeploymentMonitoringJobsPagedResponse; +import static com.google.cloud.aiplatform.v1beta1.JobServiceClient.ListNasJobsPagedResponse; +import static com.google.cloud.aiplatform.v1beta1.JobServiceClient.ListNasTrialDetailsPagedResponse; import static com.google.cloud.aiplatform.v1beta1.JobServiceClient.SearchModelDeploymentMonitoringStatsAnomaliesPagedResponse; import com.google.api.core.ApiFunction; @@ -203,6 +205,50 @@ public UnaryCallSettings cancelDataLabeling return ((JobServiceStubSettings) getStubSettings()).cancelHyperparameterTuningJobSettings(); } + /** Returns the object with the settings used for calls to createNasJob. */ + public UnaryCallSettings createNasJobSettings() { + return ((JobServiceStubSettings) getStubSettings()).createNasJobSettings(); + } + + /** Returns the object with the settings used for calls to getNasJob. */ + public UnaryCallSettings getNasJobSettings() { + return ((JobServiceStubSettings) getStubSettings()).getNasJobSettings(); + } + + /** Returns the object with the settings used for calls to listNasJobs. */ + public PagedCallSettings + listNasJobsSettings() { + return ((JobServiceStubSettings) getStubSettings()).listNasJobsSettings(); + } + + /** Returns the object with the settings used for calls to deleteNasJob. */ + public UnaryCallSettings deleteNasJobSettings() { + return ((JobServiceStubSettings) getStubSettings()).deleteNasJobSettings(); + } + + /** Returns the object with the settings used for calls to deleteNasJob. */ + public OperationCallSettings + deleteNasJobOperationSettings() { + return ((JobServiceStubSettings) getStubSettings()).deleteNasJobOperationSettings(); + } + + /** Returns the object with the settings used for calls to cancelNasJob. */ + public UnaryCallSettings cancelNasJobSettings() { + return ((JobServiceStubSettings) getStubSettings()).cancelNasJobSettings(); + } + + /** Returns the object with the settings used for calls to getNasTrialDetail. */ + public UnaryCallSettings getNasTrialDetailSettings() { + return ((JobServiceStubSettings) getStubSettings()).getNasTrialDetailSettings(); + } + + /** Returns the object with the settings used for calls to listNasTrialDetails. */ + public PagedCallSettings< + ListNasTrialDetailsRequest, ListNasTrialDetailsResponse, ListNasTrialDetailsPagedResponse> + listNasTrialDetailsSettings() { + return ((JobServiceStubSettings) getStubSettings()).listNasTrialDetailsSettings(); + } + /** Returns the object with the settings used for calls to createBatchPredictionJob. */ public UnaryCallSettings createBatchPredictionJobSettings() { @@ -558,6 +604,54 @@ public UnaryCallSettings.Builder cancelCustomJobS return getStubSettingsBuilder().cancelHyperparameterTuningJobSettings(); } + /** Returns the builder for the settings used for calls to createNasJob. */ + public UnaryCallSettings.Builder createNasJobSettings() { + return getStubSettingsBuilder().createNasJobSettings(); + } + + /** Returns the builder for the settings used for calls to getNasJob. */ + public UnaryCallSettings.Builder getNasJobSettings() { + return getStubSettingsBuilder().getNasJobSettings(); + } + + /** Returns the builder for the settings used for calls to listNasJobs. */ + public PagedCallSettings.Builder< + ListNasJobsRequest, ListNasJobsResponse, ListNasJobsPagedResponse> + listNasJobsSettings() { + return getStubSettingsBuilder().listNasJobsSettings(); + } + + /** Returns the builder for the settings used for calls to deleteNasJob. */ + public UnaryCallSettings.Builder deleteNasJobSettings() { + return getStubSettingsBuilder().deleteNasJobSettings(); + } + + /** Returns the builder for the settings used for calls to deleteNasJob. */ + public OperationCallSettings.Builder + deleteNasJobOperationSettings() { + return getStubSettingsBuilder().deleteNasJobOperationSettings(); + } + + /** Returns the builder for the settings used for calls to cancelNasJob. */ + public UnaryCallSettings.Builder cancelNasJobSettings() { + return getStubSettingsBuilder().cancelNasJobSettings(); + } + + /** Returns the builder for the settings used for calls to getNasTrialDetail. */ + public UnaryCallSettings.Builder + getNasTrialDetailSettings() { + return getStubSettingsBuilder().getNasTrialDetailSettings(); + } + + /** Returns the builder for the settings used for calls to listNasTrialDetails. */ + public PagedCallSettings.Builder< + ListNasTrialDetailsRequest, + ListNasTrialDetailsResponse, + ListNasTrialDetailsPagedResponse> + listNasTrialDetailsSettings() { + return getStubSettingsBuilder().listNasTrialDetailsSettings(); + } + /** Returns the builder for the settings used for calls to createBatchPredictionJob. */ public UnaryCallSettings.Builder createBatchPredictionJobSettings() { diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelServiceClient.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelServiceClient.java index d46934f6c084..14d08466c17c 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelServiceClient.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelServiceClient.java @@ -1709,6 +1709,255 @@ public final UnaryCallable exportModelCallable() return stub.exportModelCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Copies an already existing Vertex AI Model into the specified Location. The source Model must + * exist in the same Project. When copying custom Models, the users themselves are responsible for + * [Model.metadata][google.cloud.aiplatform.v1beta1.Model.metadata] content to be region-agnostic, + * as well as making sure that any resources (e.g. files) it depends on remain accessible. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   ModelName sourceModel = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
+   *   CopyModelResponse response = modelServiceClient.copyModelAsync(parent, sourceModel).get();
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location into which to copy the Model. Format: + * `projects/{project}/locations/{location}` + * @param sourceModel Required. The resource name of the Model to copy. That Model must be in the + * same Project. Format: `projects/{project}/locations/{location}/models/{model}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture copyModelAsync( + LocationName parent, ModelName sourceModel) { + CopyModelRequest request = + CopyModelRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setSourceModel(sourceModel == null ? null : sourceModel.toString()) + .build(); + return copyModelAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Copies an already existing Vertex AI Model into the specified Location. The source Model must + * exist in the same Project. When copying custom Models, the users themselves are responsible for + * [Model.metadata][google.cloud.aiplatform.v1beta1.Model.metadata] content to be region-agnostic, + * as well as making sure that any resources (e.g. files) it depends on remain accessible. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   String sourceModel = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString();
+   *   CopyModelResponse response = modelServiceClient.copyModelAsync(parent, sourceModel).get();
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location into which to copy the Model. Format: + * `projects/{project}/locations/{location}` + * @param sourceModel Required. The resource name of the Model to copy. That Model must be in the + * same Project. Format: `projects/{project}/locations/{location}/models/{model}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture copyModelAsync( + LocationName parent, String sourceModel) { + CopyModelRequest request = + CopyModelRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setSourceModel(sourceModel) + .build(); + return copyModelAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Copies an already existing Vertex AI Model into the specified Location. The source Model must + * exist in the same Project. When copying custom Models, the users themselves are responsible for + * [Model.metadata][google.cloud.aiplatform.v1beta1.Model.metadata] content to be region-agnostic, + * as well as making sure that any resources (e.g. files) it depends on remain accessible. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   ModelName sourceModel = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
+   *   CopyModelResponse response = modelServiceClient.copyModelAsync(parent, sourceModel).get();
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location into which to copy the Model. Format: + * `projects/{project}/locations/{location}` + * @param sourceModel Required. The resource name of the Model to copy. That Model must be in the + * same Project. Format: `projects/{project}/locations/{location}/models/{model}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture copyModelAsync( + String parent, ModelName sourceModel) { + CopyModelRequest request = + CopyModelRequest.newBuilder() + .setParent(parent) + .setSourceModel(sourceModel == null ? null : sourceModel.toString()) + .build(); + return copyModelAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Copies an already existing Vertex AI Model into the specified Location. The source Model must + * exist in the same Project. When copying custom Models, the users themselves are responsible for + * [Model.metadata][google.cloud.aiplatform.v1beta1.Model.metadata] content to be region-agnostic, + * as well as making sure that any resources (e.g. files) it depends on remain accessible. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   String sourceModel = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString();
+   *   CopyModelResponse response = modelServiceClient.copyModelAsync(parent, sourceModel).get();
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location into which to copy the Model. Format: + * `projects/{project}/locations/{location}` + * @param sourceModel Required. The resource name of the Model to copy. That Model must be in the + * same Project. Format: `projects/{project}/locations/{location}/models/{model}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture copyModelAsync( + String parent, String sourceModel) { + CopyModelRequest request = + CopyModelRequest.newBuilder().setParent(parent).setSourceModel(sourceModel).build(); + return copyModelAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Copies an already existing Vertex AI Model into the specified Location. The source Model must + * exist in the same Project. When copying custom Models, the users themselves are responsible for + * [Model.metadata][google.cloud.aiplatform.v1beta1.Model.metadata] content to be region-agnostic, + * as well as making sure that any resources (e.g. files) it depends on remain accessible. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   CopyModelRequest request =
+   *       CopyModelRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setSourceModel(ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString())
+   *           .setEncryptionSpec(EncryptionSpec.newBuilder().build())
+   *           .build();
+   *   CopyModelResponse response = modelServiceClient.copyModelAsync(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 copyModelAsync( + CopyModelRequest request) { + return copyModelOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Copies an already existing Vertex AI Model into the specified Location. The source Model must + * exist in the same Project. When copying custom Models, the users themselves are responsible for + * [Model.metadata][google.cloud.aiplatform.v1beta1.Model.metadata] content to be region-agnostic, + * as well as making sure that any resources (e.g. files) it depends on remain accessible. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   CopyModelRequest request =
+   *       CopyModelRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setSourceModel(ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString())
+   *           .setEncryptionSpec(EncryptionSpec.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       modelServiceClient.copyModelOperationCallable().futureCall(request);
+   *   // Do something.
+   *   CopyModelResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + copyModelOperationCallable() { + return stub.copyModelOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Copies an already existing Vertex AI Model into the specified Location. The source Model must + * exist in the same Project. When copying custom Models, the users themselves are responsible for + * [Model.metadata][google.cloud.aiplatform.v1beta1.Model.metadata] content to be region-agnostic, + * as well as making sure that any resources (e.g. files) it depends on remain accessible. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   CopyModelRequest request =
+   *       CopyModelRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setSourceModel(ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString())
+   *           .setEncryptionSpec(EncryptionSpec.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = modelServiceClient.copyModelCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable copyModelCallable() { + return stub.copyModelCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Imports an externally generated ModelEvaluation. diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelServiceSettings.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelServiceSettings.java index 5d90c9e37556..83f5c9fe07a8 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelServiceSettings.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelServiceSettings.java @@ -180,6 +180,17 @@ public UnaryCallSettings exportModelSettings() { return ((ModelServiceStubSettings) getStubSettings()).exportModelOperationSettings(); } + /** Returns the object with the settings used for calls to copyModel. */ + public UnaryCallSettings copyModelSettings() { + return ((ModelServiceStubSettings) getStubSettings()).copyModelSettings(); + } + + /** Returns the object with the settings used for calls to copyModel. */ + public OperationCallSettings + copyModelOperationSettings() { + return ((ModelServiceStubSettings) getStubSettings()).copyModelOperationSettings(); + } + /** Returns the object with the settings used for calls to importModelEvaluation. */ public UnaryCallSettings importModelEvaluationSettings() { @@ -439,6 +450,18 @@ public UnaryCallSettings.Builder exportModelSetti return getStubSettingsBuilder().exportModelOperationSettings(); } + /** Returns the builder for the settings used for calls to copyModel. */ + public UnaryCallSettings.Builder copyModelSettings() { + return getStubSettingsBuilder().copyModelSettings(); + } + + /** Returns the builder for the settings used for calls to copyModel. */ + public OperationCallSettings.Builder< + CopyModelRequest, CopyModelResponse, CopyModelOperationMetadata> + copyModelOperationSettings() { + return getStubSettingsBuilder().copyModelOperationSettings(); + } + /** Returns the builder for the settings used for calls to importModelEvaluation. */ public UnaryCallSettings.Builder importModelEvaluationSettings() { 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 974be494bd53..238e96749d42 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 @@ -379,6 +379,9 @@ "CancelHyperparameterTuningJob": { "methods": ["cancelHyperparameterTuningJob", "cancelHyperparameterTuningJob", "cancelHyperparameterTuningJob", "cancelHyperparameterTuningJobCallable"] }, + "CancelNasJob": { + "methods": ["cancelNasJob", "cancelNasJob", "cancelNasJob", "cancelNasJobCallable"] + }, "CreateBatchPredictionJob": { "methods": ["createBatchPredictionJob", "createBatchPredictionJob", "createBatchPredictionJob", "createBatchPredictionJobCallable"] }, @@ -394,6 +397,9 @@ "CreateModelDeploymentMonitoringJob": { "methods": ["createModelDeploymentMonitoringJob", "createModelDeploymentMonitoringJob", "createModelDeploymentMonitoringJob", "createModelDeploymentMonitoringJobCallable"] }, + "CreateNasJob": { + "methods": ["createNasJob", "createNasJob", "createNasJob", "createNasJobCallable"] + }, "DeleteBatchPredictionJob": { "methods": ["deleteBatchPredictionJobAsync", "deleteBatchPredictionJobAsync", "deleteBatchPredictionJobAsync", "deleteBatchPredictionJobOperationCallable", "deleteBatchPredictionJobCallable"] }, @@ -409,6 +415,9 @@ "DeleteModelDeploymentMonitoringJob": { "methods": ["deleteModelDeploymentMonitoringJobAsync", "deleteModelDeploymentMonitoringJobAsync", "deleteModelDeploymentMonitoringJobAsync", "deleteModelDeploymentMonitoringJobOperationCallable", "deleteModelDeploymentMonitoringJobCallable"] }, + "DeleteNasJob": { + "methods": ["deleteNasJobAsync", "deleteNasJobAsync", "deleteNasJobAsync", "deleteNasJobOperationCallable", "deleteNasJobCallable"] + }, "GetBatchPredictionJob": { "methods": ["getBatchPredictionJob", "getBatchPredictionJob", "getBatchPredictionJob", "getBatchPredictionJobCallable"] }, @@ -430,6 +439,12 @@ "GetModelDeploymentMonitoringJob": { "methods": ["getModelDeploymentMonitoringJob", "getModelDeploymentMonitoringJob", "getModelDeploymentMonitoringJob", "getModelDeploymentMonitoringJobCallable"] }, + "GetNasJob": { + "methods": ["getNasJob", "getNasJob", "getNasJob", "getNasJobCallable"] + }, + "GetNasTrialDetail": { + "methods": ["getNasTrialDetail", "getNasTrialDetail", "getNasTrialDetail", "getNasTrialDetailCallable"] + }, "ListBatchPredictionJobs": { "methods": ["listBatchPredictionJobs", "listBatchPredictionJobs", "listBatchPredictionJobs", "listBatchPredictionJobsPagedCallable", "listBatchPredictionJobsCallable"] }, @@ -448,6 +463,12 @@ "ListModelDeploymentMonitoringJobs": { "methods": ["listModelDeploymentMonitoringJobs", "listModelDeploymentMonitoringJobs", "listModelDeploymentMonitoringJobs", "listModelDeploymentMonitoringJobsPagedCallable", "listModelDeploymentMonitoringJobsCallable"] }, + "ListNasJobs": { + "methods": ["listNasJobs", "listNasJobs", "listNasJobs", "listNasJobsPagedCallable", "listNasJobsCallable"] + }, + "ListNasTrialDetails": { + "methods": ["listNasTrialDetails", "listNasTrialDetails", "listNasTrialDetails", "listNasTrialDetailsPagedCallable", "listNasTrialDetailsCallable"] + }, "PauseModelDeploymentMonitoringJob": { "methods": ["pauseModelDeploymentMonitoringJob", "pauseModelDeploymentMonitoringJob", "pauseModelDeploymentMonitoringJob", "pauseModelDeploymentMonitoringJobCallable"] }, @@ -628,6 +649,9 @@ "BatchImportModelEvaluationSlices": { "methods": ["batchImportModelEvaluationSlices", "batchImportModelEvaluationSlices", "batchImportModelEvaluationSlices", "batchImportModelEvaluationSlicesCallable"] }, + "CopyModel": { + "methods": ["copyModelAsync", "copyModelAsync", "copyModelAsync", "copyModelAsync", "copyModelAsync", "copyModelOperationCallable", "copyModelCallable"] + }, "DeleteModel": { "methods": ["deleteModelAsync", "deleteModelAsync", "deleteModelAsync", "deleteModelOperationCallable", "deleteModelCallable"] }, diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcJobServiceStub.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcJobServiceStub.java index fd5bd7a24def..e53650036b65 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcJobServiceStub.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcJobServiceStub.java @@ -22,6 +22,8 @@ import static com.google.cloud.aiplatform.v1beta1.JobServiceClient.ListHyperparameterTuningJobsPagedResponse; import static com.google.cloud.aiplatform.v1beta1.JobServiceClient.ListLocationsPagedResponse; import static com.google.cloud.aiplatform.v1beta1.JobServiceClient.ListModelDeploymentMonitoringJobsPagedResponse; +import static com.google.cloud.aiplatform.v1beta1.JobServiceClient.ListNasJobsPagedResponse; +import static com.google.cloud.aiplatform.v1beta1.JobServiceClient.ListNasTrialDetailsPagedResponse; import static com.google.cloud.aiplatform.v1beta1.JobServiceClient.SearchModelDeploymentMonitoringStatsAnomaliesPagedResponse; import com.google.api.core.BetaApi; @@ -37,11 +39,13 @@ import com.google.cloud.aiplatform.v1beta1.CancelCustomJobRequest; import com.google.cloud.aiplatform.v1beta1.CancelDataLabelingJobRequest; import com.google.cloud.aiplatform.v1beta1.CancelHyperparameterTuningJobRequest; +import com.google.cloud.aiplatform.v1beta1.CancelNasJobRequest; import com.google.cloud.aiplatform.v1beta1.CreateBatchPredictionJobRequest; import com.google.cloud.aiplatform.v1beta1.CreateCustomJobRequest; import com.google.cloud.aiplatform.v1beta1.CreateDataLabelingJobRequest; import com.google.cloud.aiplatform.v1beta1.CreateHyperparameterTuningJobRequest; import com.google.cloud.aiplatform.v1beta1.CreateModelDeploymentMonitoringJobRequest; +import com.google.cloud.aiplatform.v1beta1.CreateNasJobRequest; import com.google.cloud.aiplatform.v1beta1.CustomJob; import com.google.cloud.aiplatform.v1beta1.DataLabelingJob; import com.google.cloud.aiplatform.v1beta1.DeleteBatchPredictionJobRequest; @@ -49,12 +53,15 @@ import com.google.cloud.aiplatform.v1beta1.DeleteDataLabelingJobRequest; import com.google.cloud.aiplatform.v1beta1.DeleteHyperparameterTuningJobRequest; import com.google.cloud.aiplatform.v1beta1.DeleteModelDeploymentMonitoringJobRequest; +import com.google.cloud.aiplatform.v1beta1.DeleteNasJobRequest; import com.google.cloud.aiplatform.v1beta1.DeleteOperationMetadata; import com.google.cloud.aiplatform.v1beta1.GetBatchPredictionJobRequest; import com.google.cloud.aiplatform.v1beta1.GetCustomJobRequest; import com.google.cloud.aiplatform.v1beta1.GetDataLabelingJobRequest; import com.google.cloud.aiplatform.v1beta1.GetHyperparameterTuningJobRequest; import com.google.cloud.aiplatform.v1beta1.GetModelDeploymentMonitoringJobRequest; +import com.google.cloud.aiplatform.v1beta1.GetNasJobRequest; +import com.google.cloud.aiplatform.v1beta1.GetNasTrialDetailRequest; import com.google.cloud.aiplatform.v1beta1.HyperparameterTuningJob; import com.google.cloud.aiplatform.v1beta1.ListBatchPredictionJobsRequest; import com.google.cloud.aiplatform.v1beta1.ListBatchPredictionJobsResponse; @@ -66,7 +73,13 @@ import com.google.cloud.aiplatform.v1beta1.ListHyperparameterTuningJobsResponse; import com.google.cloud.aiplatform.v1beta1.ListModelDeploymentMonitoringJobsRequest; import com.google.cloud.aiplatform.v1beta1.ListModelDeploymentMonitoringJobsResponse; +import com.google.cloud.aiplatform.v1beta1.ListNasJobsRequest; +import com.google.cloud.aiplatform.v1beta1.ListNasJobsResponse; +import com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsRequest; +import com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsResponse; import com.google.cloud.aiplatform.v1beta1.ModelDeploymentMonitoringJob; +import com.google.cloud.aiplatform.v1beta1.NasJob; +import com.google.cloud.aiplatform.v1beta1.NasTrialDetail; import com.google.cloud.aiplatform.v1beta1.PauseModelDeploymentMonitoringJobRequest; import com.google.cloud.aiplatform.v1beta1.ResumeModelDeploymentMonitoringJobRequest; import com.google.cloud.aiplatform.v1beta1.SearchModelDeploymentMonitoringStatsAnomaliesRequest; @@ -265,6 +278,70 @@ public class GrpcJobServiceStub extends JobServiceStub { .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) .build(); + private static final MethodDescriptor createNasJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1beta1.JobService/CreateNasJob") + .setRequestMarshaller(ProtoUtils.marshaller(CreateNasJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(NasJob.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getNasJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1beta1.JobService/GetNasJob") + .setRequestMarshaller(ProtoUtils.marshaller(GetNasJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(NasJob.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listNasJobsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1beta1.JobService/ListNasJobs") + .setRequestMarshaller(ProtoUtils.marshaller(ListNasJobsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListNasJobsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteNasJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1beta1.JobService/DeleteNasJob") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteNasJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor cancelNasJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1beta1.JobService/CancelNasJob") + .setRequestMarshaller(ProtoUtils.marshaller(CancelNasJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getNasTrialDetailMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1beta1.JobService/GetNasTrialDetail") + .setRequestMarshaller( + ProtoUtils.marshaller(GetNasTrialDetailRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(NasTrialDetail.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listNasTrialDetailsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1beta1.JobService/ListNasTrialDetails") + .setRequestMarshaller( + ProtoUtils.marshaller(ListNasTrialDetailsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListNasTrialDetailsResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor createBatchPredictionJobMethodDescriptor = MethodDescriptor.newBuilder() @@ -521,6 +598,20 @@ public class GrpcJobServiceStub extends JobServiceStub { deleteHyperparameterTuningJobOperationCallable; private final UnaryCallable cancelHyperparameterTuningJobCallable; + private final UnaryCallable createNasJobCallable; + private final UnaryCallable getNasJobCallable; + private final UnaryCallable listNasJobsCallable; + private final UnaryCallable + listNasJobsPagedCallable; + private final UnaryCallable deleteNasJobCallable; + private final OperationCallable + deleteNasJobOperationCallable; + private final UnaryCallable cancelNasJobCallable; + private final UnaryCallable getNasTrialDetailCallable; + private final UnaryCallable + listNasTrialDetailsCallable; + private final UnaryCallable + listNasTrialDetailsPagedCallable; private final UnaryCallable createBatchPredictionJobCallable; private final UnaryCallable @@ -785,6 +876,77 @@ protected GrpcJobServiceStub( return params.build(); }) .build(); + GrpcCallSettings createNasJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createNasJobMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings getNasJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getNasJobMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings listNasJobsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listNasJobsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteNasJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteNasJobMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings cancelNasJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(cancelNasJobMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings getNasTrialDetailTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getNasTrialDetailMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + listNasTrialDetailsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listNasTrialDetailsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); GrpcCallSettings createBatchPredictionJobTransportSettings = GrpcCallSettings.newBuilder() @@ -1093,6 +1255,45 @@ protected GrpcJobServiceStub( cancelHyperparameterTuningJobTransportSettings, settings.cancelHyperparameterTuningJobSettings(), clientContext); + this.createNasJobCallable = + callableFactory.createUnaryCallable( + createNasJobTransportSettings, settings.createNasJobSettings(), clientContext); + this.getNasJobCallable = + callableFactory.createUnaryCallable( + getNasJobTransportSettings, settings.getNasJobSettings(), clientContext); + this.listNasJobsCallable = + callableFactory.createUnaryCallable( + listNasJobsTransportSettings, settings.listNasJobsSettings(), clientContext); + this.listNasJobsPagedCallable = + callableFactory.createPagedCallable( + listNasJobsTransportSettings, settings.listNasJobsSettings(), clientContext); + this.deleteNasJobCallable = + callableFactory.createUnaryCallable( + deleteNasJobTransportSettings, settings.deleteNasJobSettings(), clientContext); + this.deleteNasJobOperationCallable = + callableFactory.createOperationCallable( + deleteNasJobTransportSettings, + settings.deleteNasJobOperationSettings(), + clientContext, + operationsStub); + this.cancelNasJobCallable = + callableFactory.createUnaryCallable( + cancelNasJobTransportSettings, settings.cancelNasJobSettings(), clientContext); + this.getNasTrialDetailCallable = + callableFactory.createUnaryCallable( + getNasTrialDetailTransportSettings, + settings.getNasTrialDetailSettings(), + clientContext); + this.listNasTrialDetailsCallable = + callableFactory.createUnaryCallable( + listNasTrialDetailsTransportSettings, + settings.listNasTrialDetailsSettings(), + clientContext); + this.listNasTrialDetailsPagedCallable = + callableFactory.createPagedCallable( + listNasTrialDetailsTransportSettings, + settings.listNasTrialDetailsSettings(), + clientContext); this.createBatchPredictionJobCallable = callableFactory.createUnaryCallable( createBatchPredictionJobTransportSettings, @@ -1339,6 +1540,59 @@ public UnaryCallable cancelDataLabelingJobC return cancelHyperparameterTuningJobCallable; } + @Override + public UnaryCallable createNasJobCallable() { + return createNasJobCallable; + } + + @Override + public UnaryCallable getNasJobCallable() { + return getNasJobCallable; + } + + @Override + public UnaryCallable listNasJobsCallable() { + return listNasJobsCallable; + } + + @Override + public UnaryCallable listNasJobsPagedCallable() { + return listNasJobsPagedCallable; + } + + @Override + public UnaryCallable deleteNasJobCallable() { + return deleteNasJobCallable; + } + + @Override + public OperationCallable + deleteNasJobOperationCallable() { + return deleteNasJobOperationCallable; + } + + @Override + public UnaryCallable cancelNasJobCallable() { + return cancelNasJobCallable; + } + + @Override + public UnaryCallable getNasTrialDetailCallable() { + return getNasTrialDetailCallable; + } + + @Override + public UnaryCallable + listNasTrialDetailsCallable() { + return listNasTrialDetailsCallable; + } + + @Override + public UnaryCallable + listNasTrialDetailsPagedCallable() { + return listNasTrialDetailsPagedCallable; + } + @Override public UnaryCallable createBatchPredictionJobCallable() { diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcModelServiceStub.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcModelServiceStub.java index 1087a381ca08..1abb96761c53 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcModelServiceStub.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/GrpcModelServiceStub.java @@ -32,6 +32,9 @@ import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesRequest; import com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesResponse; +import com.google.cloud.aiplatform.v1beta1.CopyModelOperationMetadata; +import com.google.cloud.aiplatform.v1beta1.CopyModelRequest; +import com.google.cloud.aiplatform.v1beta1.CopyModelResponse; import com.google.cloud.aiplatform.v1beta1.DeleteModelRequest; import com.google.cloud.aiplatform.v1beta1.DeleteModelVersionRequest; import com.google.cloud.aiplatform.v1beta1.DeleteOperationMetadata; @@ -180,6 +183,14 @@ public class GrpcModelServiceStub extends ModelServiceStub { .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); + private static final MethodDescriptor copyModelMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1beta1.ModelService/CopyModel") + .setRequestMarshaller(ProtoUtils.marshaller(CopyModelRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + private static final MethodDescriptor importModelEvaluationMethodDescriptor = MethodDescriptor.newBuilder() @@ -332,6 +343,9 @@ public class GrpcModelServiceStub extends ModelServiceStub { private final OperationCallable< ExportModelRequest, ExportModelResponse, ExportModelOperationMetadata> exportModelOperationCallable; + private final UnaryCallable copyModelCallable; + private final OperationCallable + copyModelOperationCallable; private final UnaryCallable importModelEvaluationCallable; private final UnaryCallable< @@ -503,6 +517,16 @@ protected GrpcModelServiceStub( return params.build(); }) .build(); + GrpcCallSettings copyModelTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(copyModelMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); GrpcCallSettings importModelEvaluationTransportSettings = GrpcCallSettings.newBuilder() @@ -701,6 +725,15 @@ protected GrpcModelServiceStub( settings.exportModelOperationSettings(), clientContext, operationsStub); + this.copyModelCallable = + callableFactory.createUnaryCallable( + copyModelTransportSettings, settings.copyModelSettings(), clientContext); + this.copyModelOperationCallable = + callableFactory.createOperationCallable( + copyModelTransportSettings, + settings.copyModelOperationSettings(), + clientContext, + operationsStub); this.importModelEvaluationCallable = callableFactory.createUnaryCallable( importModelEvaluationTransportSettings, @@ -866,6 +899,17 @@ public UnaryCallable exportModelCallable() { return exportModelOperationCallable; } + @Override + public UnaryCallable copyModelCallable() { + return copyModelCallable; + } + + @Override + public OperationCallable + copyModelOperationCallable() { + return copyModelOperationCallable; + } + @Override public UnaryCallable importModelEvaluationCallable() { diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/JobServiceStub.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/JobServiceStub.java index 996217ae904e..23065703d037 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/JobServiceStub.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/JobServiceStub.java @@ -22,6 +22,8 @@ import static com.google.cloud.aiplatform.v1beta1.JobServiceClient.ListHyperparameterTuningJobsPagedResponse; import static com.google.cloud.aiplatform.v1beta1.JobServiceClient.ListLocationsPagedResponse; import static com.google.cloud.aiplatform.v1beta1.JobServiceClient.ListModelDeploymentMonitoringJobsPagedResponse; +import static com.google.cloud.aiplatform.v1beta1.JobServiceClient.ListNasJobsPagedResponse; +import static com.google.cloud.aiplatform.v1beta1.JobServiceClient.ListNasTrialDetailsPagedResponse; import static com.google.cloud.aiplatform.v1beta1.JobServiceClient.SearchModelDeploymentMonitoringStatsAnomaliesPagedResponse; import com.google.api.core.BetaApi; @@ -33,11 +35,13 @@ import com.google.cloud.aiplatform.v1beta1.CancelCustomJobRequest; import com.google.cloud.aiplatform.v1beta1.CancelDataLabelingJobRequest; import com.google.cloud.aiplatform.v1beta1.CancelHyperparameterTuningJobRequest; +import com.google.cloud.aiplatform.v1beta1.CancelNasJobRequest; import com.google.cloud.aiplatform.v1beta1.CreateBatchPredictionJobRequest; import com.google.cloud.aiplatform.v1beta1.CreateCustomJobRequest; import com.google.cloud.aiplatform.v1beta1.CreateDataLabelingJobRequest; import com.google.cloud.aiplatform.v1beta1.CreateHyperparameterTuningJobRequest; import com.google.cloud.aiplatform.v1beta1.CreateModelDeploymentMonitoringJobRequest; +import com.google.cloud.aiplatform.v1beta1.CreateNasJobRequest; import com.google.cloud.aiplatform.v1beta1.CustomJob; import com.google.cloud.aiplatform.v1beta1.DataLabelingJob; import com.google.cloud.aiplatform.v1beta1.DeleteBatchPredictionJobRequest; @@ -45,12 +49,15 @@ import com.google.cloud.aiplatform.v1beta1.DeleteDataLabelingJobRequest; import com.google.cloud.aiplatform.v1beta1.DeleteHyperparameterTuningJobRequest; import com.google.cloud.aiplatform.v1beta1.DeleteModelDeploymentMonitoringJobRequest; +import com.google.cloud.aiplatform.v1beta1.DeleteNasJobRequest; import com.google.cloud.aiplatform.v1beta1.DeleteOperationMetadata; import com.google.cloud.aiplatform.v1beta1.GetBatchPredictionJobRequest; import com.google.cloud.aiplatform.v1beta1.GetCustomJobRequest; import com.google.cloud.aiplatform.v1beta1.GetDataLabelingJobRequest; import com.google.cloud.aiplatform.v1beta1.GetHyperparameterTuningJobRequest; import com.google.cloud.aiplatform.v1beta1.GetModelDeploymentMonitoringJobRequest; +import com.google.cloud.aiplatform.v1beta1.GetNasJobRequest; +import com.google.cloud.aiplatform.v1beta1.GetNasTrialDetailRequest; import com.google.cloud.aiplatform.v1beta1.HyperparameterTuningJob; import com.google.cloud.aiplatform.v1beta1.ListBatchPredictionJobsRequest; import com.google.cloud.aiplatform.v1beta1.ListBatchPredictionJobsResponse; @@ -62,7 +69,13 @@ import com.google.cloud.aiplatform.v1beta1.ListHyperparameterTuningJobsResponse; import com.google.cloud.aiplatform.v1beta1.ListModelDeploymentMonitoringJobsRequest; import com.google.cloud.aiplatform.v1beta1.ListModelDeploymentMonitoringJobsResponse; +import com.google.cloud.aiplatform.v1beta1.ListNasJobsRequest; +import com.google.cloud.aiplatform.v1beta1.ListNasJobsResponse; +import com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsRequest; +import com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsResponse; import com.google.cloud.aiplatform.v1beta1.ModelDeploymentMonitoringJob; +import com.google.cloud.aiplatform.v1beta1.NasJob; +import com.google.cloud.aiplatform.v1beta1.NasTrialDetail; import com.google.cloud.aiplatform.v1beta1.PauseModelDeploymentMonitoringJobRequest; import com.google.cloud.aiplatform.v1beta1.ResumeModelDeploymentMonitoringJobRequest; import com.google.cloud.aiplatform.v1beta1.SearchModelDeploymentMonitoringStatsAnomaliesRequest; @@ -203,6 +216,49 @@ public UnaryCallable cancelDataLabelingJobC "Not implemented: cancelHyperparameterTuningJobCallable()"); } + public UnaryCallable createNasJobCallable() { + throw new UnsupportedOperationException("Not implemented: createNasJobCallable()"); + } + + public UnaryCallable getNasJobCallable() { + throw new UnsupportedOperationException("Not implemented: getNasJobCallable()"); + } + + public UnaryCallable listNasJobsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listNasJobsPagedCallable()"); + } + + public UnaryCallable listNasJobsCallable() { + throw new UnsupportedOperationException("Not implemented: listNasJobsCallable()"); + } + + public OperationCallable + deleteNasJobOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteNasJobOperationCallable()"); + } + + public UnaryCallable deleteNasJobCallable() { + throw new UnsupportedOperationException("Not implemented: deleteNasJobCallable()"); + } + + public UnaryCallable cancelNasJobCallable() { + throw new UnsupportedOperationException("Not implemented: cancelNasJobCallable()"); + } + + public UnaryCallable getNasTrialDetailCallable() { + throw new UnsupportedOperationException("Not implemented: getNasTrialDetailCallable()"); + } + + public UnaryCallable + listNasTrialDetailsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listNasTrialDetailsPagedCallable()"); + } + + public UnaryCallable + listNasTrialDetailsCallable() { + throw new UnsupportedOperationException("Not implemented: listNasTrialDetailsCallable()"); + } + public UnaryCallable createBatchPredictionJobCallable() { throw new UnsupportedOperationException("Not implemented: createBatchPredictionJobCallable()"); diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/JobServiceStubSettings.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/JobServiceStubSettings.java index 350ceca16f5a..f61db9c462e2 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/JobServiceStubSettings.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/JobServiceStubSettings.java @@ -22,6 +22,8 @@ import static com.google.cloud.aiplatform.v1beta1.JobServiceClient.ListHyperparameterTuningJobsPagedResponse; import static com.google.cloud.aiplatform.v1beta1.JobServiceClient.ListLocationsPagedResponse; import static com.google.cloud.aiplatform.v1beta1.JobServiceClient.ListModelDeploymentMonitoringJobsPagedResponse; +import static com.google.cloud.aiplatform.v1beta1.JobServiceClient.ListNasJobsPagedResponse; +import static com.google.cloud.aiplatform.v1beta1.JobServiceClient.ListNasTrialDetailsPagedResponse; import static com.google.cloud.aiplatform.v1beta1.JobServiceClient.SearchModelDeploymentMonitoringStatsAnomaliesPagedResponse; import com.google.api.core.ApiFunction; @@ -55,11 +57,13 @@ import com.google.cloud.aiplatform.v1beta1.CancelCustomJobRequest; import com.google.cloud.aiplatform.v1beta1.CancelDataLabelingJobRequest; import com.google.cloud.aiplatform.v1beta1.CancelHyperparameterTuningJobRequest; +import com.google.cloud.aiplatform.v1beta1.CancelNasJobRequest; import com.google.cloud.aiplatform.v1beta1.CreateBatchPredictionJobRequest; import com.google.cloud.aiplatform.v1beta1.CreateCustomJobRequest; import com.google.cloud.aiplatform.v1beta1.CreateDataLabelingJobRequest; import com.google.cloud.aiplatform.v1beta1.CreateHyperparameterTuningJobRequest; import com.google.cloud.aiplatform.v1beta1.CreateModelDeploymentMonitoringJobRequest; +import com.google.cloud.aiplatform.v1beta1.CreateNasJobRequest; import com.google.cloud.aiplatform.v1beta1.CustomJob; import com.google.cloud.aiplatform.v1beta1.DataLabelingJob; import com.google.cloud.aiplatform.v1beta1.DeleteBatchPredictionJobRequest; @@ -67,12 +71,15 @@ import com.google.cloud.aiplatform.v1beta1.DeleteDataLabelingJobRequest; import com.google.cloud.aiplatform.v1beta1.DeleteHyperparameterTuningJobRequest; import com.google.cloud.aiplatform.v1beta1.DeleteModelDeploymentMonitoringJobRequest; +import com.google.cloud.aiplatform.v1beta1.DeleteNasJobRequest; import com.google.cloud.aiplatform.v1beta1.DeleteOperationMetadata; import com.google.cloud.aiplatform.v1beta1.GetBatchPredictionJobRequest; import com.google.cloud.aiplatform.v1beta1.GetCustomJobRequest; import com.google.cloud.aiplatform.v1beta1.GetDataLabelingJobRequest; import com.google.cloud.aiplatform.v1beta1.GetHyperparameterTuningJobRequest; import com.google.cloud.aiplatform.v1beta1.GetModelDeploymentMonitoringJobRequest; +import com.google.cloud.aiplatform.v1beta1.GetNasJobRequest; +import com.google.cloud.aiplatform.v1beta1.GetNasTrialDetailRequest; import com.google.cloud.aiplatform.v1beta1.HyperparameterTuningJob; import com.google.cloud.aiplatform.v1beta1.ListBatchPredictionJobsRequest; import com.google.cloud.aiplatform.v1beta1.ListBatchPredictionJobsResponse; @@ -84,8 +91,14 @@ import com.google.cloud.aiplatform.v1beta1.ListHyperparameterTuningJobsResponse; import com.google.cloud.aiplatform.v1beta1.ListModelDeploymentMonitoringJobsRequest; import com.google.cloud.aiplatform.v1beta1.ListModelDeploymentMonitoringJobsResponse; +import com.google.cloud.aiplatform.v1beta1.ListNasJobsRequest; +import com.google.cloud.aiplatform.v1beta1.ListNasJobsResponse; +import com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsRequest; +import com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsResponse; import com.google.cloud.aiplatform.v1beta1.ModelDeploymentMonitoringJob; import com.google.cloud.aiplatform.v1beta1.ModelMonitoringStatsAnomalies; +import com.google.cloud.aiplatform.v1beta1.NasJob; +import com.google.cloud.aiplatform.v1beta1.NasTrialDetail; import com.google.cloud.aiplatform.v1beta1.PauseModelDeploymentMonitoringJobRequest; import com.google.cloud.aiplatform.v1beta1.ResumeModelDeploymentMonitoringJobRequest; import com.google.cloud.aiplatform.v1beta1.SearchModelDeploymentMonitoringStatsAnomaliesRequest; @@ -153,7 +166,10 @@ public class JobServiceStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + ImmutableList.builder() + .add("https://www.googleapis.com/auth/cloud-platform") + .add("https://www.googleapis.com/auth/cloud-platform.read-only") + .build(); private final UnaryCallSettings createCustomJobSettings; private final UnaryCallSettings getCustomJobSettings; @@ -195,6 +211,19 @@ public class JobServiceStubSettings extends StubSettings deleteHyperparameterTuningJobOperationSettings; private final UnaryCallSettings cancelHyperparameterTuningJobSettings; + private final UnaryCallSettings createNasJobSettings; + private final UnaryCallSettings getNasJobSettings; + private final PagedCallSettings + listNasJobsSettings; + private final UnaryCallSettings deleteNasJobSettings; + private final OperationCallSettings + deleteNasJobOperationSettings; + private final UnaryCallSettings cancelNasJobSettings; + private final UnaryCallSettings + getNasTrialDetailSettings; + private final PagedCallSettings< + ListNasTrialDetailsRequest, ListNasTrialDetailsResponse, ListNasTrialDetailsPagedResponse> + listNasTrialDetailsSettings; private final UnaryCallSettings createBatchPredictionJobSettings; private final UnaryCallSettings @@ -379,6 +408,82 @@ public Iterable extractResources( } }; + private static final PagedListDescriptor + LIST_NAS_JOBS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListNasJobsRequest injectToken(ListNasJobsRequest payload, String token) { + return ListNasJobsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListNasJobsRequest injectPageSize(ListNasJobsRequest payload, int pageSize) { + return ListNasJobsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListNasJobsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListNasJobsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListNasJobsResponse payload) { + return payload.getNasJobsList() == null + ? ImmutableList.of() + : payload.getNasJobsList(); + } + }; + + private static final PagedListDescriptor< + ListNasTrialDetailsRequest, ListNasTrialDetailsResponse, NasTrialDetail> + LIST_NAS_TRIAL_DETAILS_PAGE_STR_DESC = + new PagedListDescriptor< + ListNasTrialDetailsRequest, ListNasTrialDetailsResponse, NasTrialDetail>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListNasTrialDetailsRequest injectToken( + ListNasTrialDetailsRequest payload, String token) { + return ListNasTrialDetailsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListNasTrialDetailsRequest injectPageSize( + ListNasTrialDetailsRequest payload, int pageSize) { + return ListNasTrialDetailsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListNasTrialDetailsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListNasTrialDetailsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListNasTrialDetailsResponse payload) { + return payload.getNasTrialDetailsList() == null + ? ImmutableList.of() + : payload.getNasTrialDetailsList(); + } + }; + private static final PagedListDescriptor< ListBatchPredictionJobsRequest, ListBatchPredictionJobsResponse, BatchPredictionJob> LIST_BATCH_PREDICTION_JOBS_PAGE_STR_DESC = @@ -633,6 +738,44 @@ public ApiFuture getFuturePagedRespon } }; + private static final PagedListResponseFactory< + ListNasJobsRequest, ListNasJobsResponse, ListNasJobsPagedResponse> + LIST_NAS_JOBS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListNasJobsRequest, ListNasJobsResponse, ListNasJobsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListNasJobsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_NAS_JOBS_PAGE_STR_DESC, request, context); + return ListNasJobsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListNasTrialDetailsRequest, ListNasTrialDetailsResponse, ListNasTrialDetailsPagedResponse> + LIST_NAS_TRIAL_DETAILS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListNasTrialDetailsRequest, + ListNasTrialDetailsResponse, + ListNasTrialDetailsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListNasTrialDetailsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_NAS_TRIAL_DETAILS_PAGE_STR_DESC, request, context); + return ListNasTrialDetailsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + private static final PagedListResponseFactory< ListBatchPredictionJobsRequest, ListBatchPredictionJobsResponse, @@ -855,6 +998,50 @@ public UnaryCallSettings cancelDataLabeling return cancelHyperparameterTuningJobSettings; } + /** Returns the object with the settings used for calls to createNasJob. */ + public UnaryCallSettings createNasJobSettings() { + return createNasJobSettings; + } + + /** Returns the object with the settings used for calls to getNasJob. */ + public UnaryCallSettings getNasJobSettings() { + return getNasJobSettings; + } + + /** Returns the object with the settings used for calls to listNasJobs. */ + public PagedCallSettings + listNasJobsSettings() { + return listNasJobsSettings; + } + + /** Returns the object with the settings used for calls to deleteNasJob. */ + public UnaryCallSettings deleteNasJobSettings() { + return deleteNasJobSettings; + } + + /** Returns the object with the settings used for calls to deleteNasJob. */ + public OperationCallSettings + deleteNasJobOperationSettings() { + return deleteNasJobOperationSettings; + } + + /** Returns the object with the settings used for calls to cancelNasJob. */ + public UnaryCallSettings cancelNasJobSettings() { + return cancelNasJobSettings; + } + + /** Returns the object with the settings used for calls to getNasTrialDetail. */ + public UnaryCallSettings getNasTrialDetailSettings() { + return getNasTrialDetailSettings; + } + + /** Returns the object with the settings used for calls to listNasTrialDetails. */ + public PagedCallSettings< + ListNasTrialDetailsRequest, ListNasTrialDetailsResponse, ListNasTrialDetailsPagedResponse> + listNasTrialDetailsSettings() { + return listNasTrialDetailsSettings; + } + /** Returns the object with the settings used for calls to createBatchPredictionJob. */ public UnaryCallSettings createBatchPredictionJobSettings() { @@ -1094,6 +1281,14 @@ protected JobServiceStubSettings(Builder settingsBuilder) throws IOException { settingsBuilder.deleteHyperparameterTuningJobOperationSettings().build(); cancelHyperparameterTuningJobSettings = settingsBuilder.cancelHyperparameterTuningJobSettings().build(); + createNasJobSettings = settingsBuilder.createNasJobSettings().build(); + getNasJobSettings = settingsBuilder.getNasJobSettings().build(); + listNasJobsSettings = settingsBuilder.listNasJobsSettings().build(); + deleteNasJobSettings = settingsBuilder.deleteNasJobSettings().build(); + deleteNasJobOperationSettings = settingsBuilder.deleteNasJobOperationSettings().build(); + cancelNasJobSettings = settingsBuilder.cancelNasJobSettings().build(); + getNasTrialDetailSettings = settingsBuilder.getNasTrialDetailSettings().build(); + listNasTrialDetailsSettings = settingsBuilder.listNasTrialDetailsSettings().build(); createBatchPredictionJobSettings = settingsBuilder.createBatchPredictionJobSettings().build(); getBatchPredictionJobSettings = settingsBuilder.getBatchPredictionJobSettings().build(); listBatchPredictionJobsSettings = settingsBuilder.listBatchPredictionJobsSettings().build(); @@ -1177,6 +1372,22 @@ public static class Builder extends StubSettings.Builder cancelHyperparameterTuningJobSettings; + private final UnaryCallSettings.Builder createNasJobSettings; + private final UnaryCallSettings.Builder getNasJobSettings; + private final PagedCallSettings.Builder< + ListNasJobsRequest, ListNasJobsResponse, ListNasJobsPagedResponse> + listNasJobsSettings; + private final UnaryCallSettings.Builder deleteNasJobSettings; + private final OperationCallSettings.Builder + deleteNasJobOperationSettings; + private final UnaryCallSettings.Builder cancelNasJobSettings; + private final UnaryCallSettings.Builder + getNasTrialDetailSettings; + private final PagedCallSettings.Builder< + ListNasTrialDetailsRequest, + ListNasTrialDetailsResponse, + ListNasTrialDetailsPagedResponse> + listNasTrialDetailsSettings; private final UnaryCallSettings.Builder createBatchPredictionJobSettings; private final UnaryCallSettings.Builder @@ -1241,9 +1452,9 @@ public static class Builder extends StubSettings.BuildernewArrayList())); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); definitions.put( "no_retry_5_codes", ImmutableSet.copyOf(Lists.newArrayList())); - definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); RETRYABLE_CODE_DEFINITIONS = definitions.build(); } @@ -1260,6 +1471,8 @@ public static class Builder extends StubSettings.BuildernewUnaryCallSettingsBuilder() + .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 .deleteBatchPredictionJobOperationSettings() .setInitialCallSettings( @@ -1926,6 +2227,56 @@ public UnaryCallSettings.Builder cancelCustomJobS return cancelHyperparameterTuningJobSettings; } + /** Returns the builder for the settings used for calls to createNasJob. */ + public UnaryCallSettings.Builder createNasJobSettings() { + return createNasJobSettings; + } + + /** Returns the builder for the settings used for calls to getNasJob. */ + public UnaryCallSettings.Builder getNasJobSettings() { + return getNasJobSettings; + } + + /** Returns the builder for the settings used for calls to listNasJobs. */ + public PagedCallSettings.Builder< + ListNasJobsRequest, ListNasJobsResponse, ListNasJobsPagedResponse> + listNasJobsSettings() { + return listNasJobsSettings; + } + + /** Returns the builder for the settings used for calls to deleteNasJob. */ + public UnaryCallSettings.Builder deleteNasJobSettings() { + return deleteNasJobSettings; + } + + /** Returns the builder for the settings used for calls to deleteNasJob. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteNasJobOperationSettings() { + return deleteNasJobOperationSettings; + } + + /** Returns the builder for the settings used for calls to cancelNasJob. */ + public UnaryCallSettings.Builder cancelNasJobSettings() { + return cancelNasJobSettings; + } + + /** Returns the builder for the settings used for calls to getNasTrialDetail. */ + public UnaryCallSettings.Builder + getNasTrialDetailSettings() { + return getNasTrialDetailSettings; + } + + /** Returns the builder for the settings used for calls to listNasTrialDetails. */ + public PagedCallSettings.Builder< + ListNasTrialDetailsRequest, + ListNasTrialDetailsResponse, + ListNasTrialDetailsPagedResponse> + listNasTrialDetailsSettings() { + return listNasTrialDetailsSettings; + } + /** Returns the builder for the settings used for calls to createBatchPredictionJob. */ public UnaryCallSettings.Builder createBatchPredictionJobSettings() { diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/ModelServiceStub.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/ModelServiceStub.java index 3721c8c57f34..d48fa3f91a31 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/ModelServiceStub.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/ModelServiceStub.java @@ -28,6 +28,9 @@ import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesRequest; import com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesResponse; +import com.google.cloud.aiplatform.v1beta1.CopyModelOperationMetadata; +import com.google.cloud.aiplatform.v1beta1.CopyModelRequest; +import com.google.cloud.aiplatform.v1beta1.CopyModelResponse; import com.google.cloud.aiplatform.v1beta1.DeleteModelRequest; import com.google.cloud.aiplatform.v1beta1.DeleteModelVersionRequest; import com.google.cloud.aiplatform.v1beta1.DeleteOperationMetadata; @@ -166,6 +169,15 @@ public UnaryCallable exportModelCallable() { throw new UnsupportedOperationException("Not implemented: exportModelCallable()"); } + public OperationCallable + copyModelOperationCallable() { + throw new UnsupportedOperationException("Not implemented: copyModelOperationCallable()"); + } + + public UnaryCallable copyModelCallable() { + throw new UnsupportedOperationException("Not implemented: copyModelCallable()"); + } + public UnaryCallable importModelEvaluationCallable() { throw new UnsupportedOperationException("Not implemented: importModelEvaluationCallable()"); diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/ModelServiceStubSettings.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/ModelServiceStubSettings.java index 49f51f2bd4d8..16800bd02f0c 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/ModelServiceStubSettings.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/ModelServiceStubSettings.java @@ -50,6 +50,9 @@ import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesRequest; import com.google.cloud.aiplatform.v1beta1.BatchImportModelEvaluationSlicesResponse; +import com.google.cloud.aiplatform.v1beta1.CopyModelOperationMetadata; +import com.google.cloud.aiplatform.v1beta1.CopyModelRequest; +import com.google.cloud.aiplatform.v1beta1.CopyModelResponse; import com.google.cloud.aiplatform.v1beta1.DeleteModelRequest; import com.google.cloud.aiplatform.v1beta1.DeleteModelVersionRequest; import com.google.cloud.aiplatform.v1beta1.DeleteOperationMetadata; @@ -172,6 +175,10 @@ public class ModelServiceStubSettings extends StubSettings exportModelOperationSettings; + private final UnaryCallSettings copyModelSettings; + private final OperationCallSettings< + CopyModelRequest, CopyModelResponse, CopyModelOperationMetadata> + copyModelOperationSettings; private final UnaryCallSettings importModelEvaluationSettings; private final UnaryCallSettings< @@ -593,6 +600,17 @@ public UnaryCallSettings exportModelSettings() { return exportModelOperationSettings; } + /** Returns the object with the settings used for calls to copyModel. */ + public UnaryCallSettings copyModelSettings() { + return copyModelSettings; + } + + /** Returns the object with the settings used for calls to copyModel. */ + public OperationCallSettings + copyModelOperationSettings() { + return copyModelOperationSettings; + } + /** Returns the object with the settings used for calls to importModelEvaluation. */ public UnaryCallSettings importModelEvaluationSettings() { @@ -755,6 +773,8 @@ protected ModelServiceStubSettings(Builder settingsBuilder) throws IOException { mergeVersionAliasesSettings = settingsBuilder.mergeVersionAliasesSettings().build(); exportModelSettings = settingsBuilder.exportModelSettings().build(); exportModelOperationSettings = settingsBuilder.exportModelOperationSettings().build(); + copyModelSettings = settingsBuilder.copyModelSettings().build(); + copyModelOperationSettings = settingsBuilder.copyModelOperationSettings().build(); importModelEvaluationSettings = settingsBuilder.importModelEvaluationSettings().build(); batchImportModelEvaluationSlicesSettings = settingsBuilder.batchImportModelEvaluationSlicesSettings().build(); @@ -805,6 +825,10 @@ public static class Builder extends StubSettings.Builder exportModelOperationSettings; + private final UnaryCallSettings.Builder copyModelSettings; + private final OperationCallSettings.Builder< + CopyModelRequest, CopyModelResponse, CopyModelOperationMetadata> + copyModelOperationSettings; private final UnaryCallSettings.Builder importModelEvaluationSettings; private final UnaryCallSettings.Builder< @@ -884,6 +908,8 @@ protected Builder(ClientContext clientContext) { mergeVersionAliasesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); exportModelSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); exportModelOperationSettings = OperationCallSettings.newBuilder(); + copyModelSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + copyModelOperationSettings = OperationCallSettings.newBuilder(); importModelEvaluationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); batchImportModelEvaluationSlicesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); getModelEvaluationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -910,6 +936,7 @@ protected Builder(ClientContext clientContext) { deleteModelVersionSettings, mergeVersionAliasesSettings, exportModelSettings, + copyModelSettings, importModelEvaluationSettings, batchImportModelEvaluationSlicesSettings, getModelEvaluationSettings, @@ -944,6 +971,8 @@ protected Builder(ModelServiceStubSettings settings) { mergeVersionAliasesSettings = settings.mergeVersionAliasesSettings.toBuilder(); exportModelSettings = settings.exportModelSettings.toBuilder(); exportModelOperationSettings = settings.exportModelOperationSettings.toBuilder(); + copyModelSettings = settings.copyModelSettings.toBuilder(); + copyModelOperationSettings = settings.copyModelOperationSettings.toBuilder(); importModelEvaluationSettings = settings.importModelEvaluationSettings.toBuilder(); batchImportModelEvaluationSlicesSettings = settings.batchImportModelEvaluationSlicesSettings.toBuilder(); @@ -969,6 +998,7 @@ protected Builder(ModelServiceStubSettings settings) { deleteModelVersionSettings, mergeVersionAliasesSettings, exportModelSettings, + copyModelSettings, importModelEvaluationSettings, batchImportModelEvaluationSlicesSettings, getModelEvaluationSettings, @@ -1046,6 +1076,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_7_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_7_params")); + builder + .copyModelSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_7_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_7_params")); + builder .importModelEvaluationSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) @@ -1222,6 +1257,30 @@ private static Builder initDefaults(Builder builder) { .setTotalTimeout(Duration.ofMillis(300000L)) .build())); + builder + .copyModelOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_7_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_7_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(CopyModelResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + CopyModelOperationMetadata.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; } @@ -1341,6 +1400,20 @@ public UnaryCallSettings.Builder exportModelSetti return exportModelOperationSettings; } + /** Returns the builder for the settings used for calls to copyModel. */ + public UnaryCallSettings.Builder copyModelSettings() { + return copyModelSettings; + } + + /** Returns the builder for the settings used for calls to copyModel. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + CopyModelRequest, CopyModelResponse, CopyModelOperationMetadata> + copyModelOperationSettings() { + return copyModelOperationSettings; + } + /** Returns the builder for the settings used for calls to importModelEvaluation. */ public UnaryCallSettings.Builder importModelEvaluationSettings() { diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/IndexEndpointServiceClientTest.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/IndexEndpointServiceClientTest.java index 1c56d9dcdf60..69d8a7a254b8 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/IndexEndpointServiceClientTest.java +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/IndexEndpointServiceClientTest.java @@ -120,6 +120,7 @@ public void createIndexEndpointTest() throws Exception { .setUpdateTime(Timestamp.newBuilder().build()) .setNetwork("network1843485230") .setEnablePrivateServiceConnect(true) + .setPrivateServiceConnectConfig(PrivateServiceConnectConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -178,6 +179,7 @@ public void createIndexEndpointTest2() throws Exception { .setUpdateTime(Timestamp.newBuilder().build()) .setNetwork("network1843485230") .setEnablePrivateServiceConnect(true) + .setPrivateServiceConnectConfig(PrivateServiceConnectConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -236,6 +238,7 @@ public void getIndexEndpointTest() throws Exception { .setUpdateTime(Timestamp.newBuilder().build()) .setNetwork("network1843485230") .setEnablePrivateServiceConnect(true) + .setPrivateServiceConnectConfig(PrivateServiceConnectConfig.newBuilder().build()) .build(); mockIndexEndpointService.addResponse(expectedResponse); @@ -283,6 +286,7 @@ public void getIndexEndpointTest2() throws Exception { .setUpdateTime(Timestamp.newBuilder().build()) .setNetwork("network1843485230") .setEnablePrivateServiceConnect(true) + .setPrivateServiceConnectConfig(PrivateServiceConnectConfig.newBuilder().build()) .build(); mockIndexEndpointService.addResponse(expectedResponse); @@ -418,6 +422,7 @@ public void updateIndexEndpointTest() throws Exception { .setUpdateTime(Timestamp.newBuilder().build()) .setNetwork("network1843485230") .setEnablePrivateServiceConnect(true) + .setPrivateServiceConnectConfig(PrivateServiceConnectConfig.newBuilder().build()) .build(); mockIndexEndpointService.addResponse(expectedResponse); diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/JobServiceClientTest.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/JobServiceClientTest.java index 642b4bb55c3b..26bdb1b83585 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/JobServiceClientTest.java +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/JobServiceClientTest.java @@ -22,6 +22,8 @@ import static com.google.cloud.aiplatform.v1.JobServiceClient.ListHyperparameterTuningJobsPagedResponse; import static com.google.cloud.aiplatform.v1.JobServiceClient.ListLocationsPagedResponse; import static com.google.cloud.aiplatform.v1.JobServiceClient.ListModelDeploymentMonitoringJobsPagedResponse; +import static com.google.cloud.aiplatform.v1.JobServiceClient.ListNasJobsPagedResponse; +import static com.google.cloud.aiplatform.v1.JobServiceClient.ListNasTrialDetailsPagedResponse; import static com.google.cloud.aiplatform.v1.JobServiceClient.SearchModelDeploymentMonitoringStatsAnomaliesPagedResponse; import com.google.api.gax.core.NoCredentialsProvider; @@ -1535,6 +1537,628 @@ public void cancelHyperparameterTuningJobExceptionTest2() throws Exception { } } + @Test + public void createNasJobTest() throws Exception { + NasJob expectedResponse = + NasJob.newBuilder() + .setName(NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString()) + .setDisplayName("displayName1714148973") + .setNasJobSpec(NasJobSpec.newBuilder().build()) + .setNasJobOutput(NasJobOutput.newBuilder().build()) + .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()) + .setEncryptionSpec(EncryptionSpec.newBuilder().build()) + .setEnableRestrictedImageTraining(true) + .build(); + mockJobService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + NasJob nasJob = NasJob.newBuilder().build(); + + NasJob actualResponse = client.createNasJob(parent, nasJob); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateNasJobRequest actualRequest = ((CreateNasJobRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(nasJob, actualRequest.getNasJob()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createNasJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + NasJob nasJob = NasJob.newBuilder().build(); + client.createNasJob(parent, nasJob); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createNasJobTest2() throws Exception { + NasJob expectedResponse = + NasJob.newBuilder() + .setName(NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString()) + .setDisplayName("displayName1714148973") + .setNasJobSpec(NasJobSpec.newBuilder().build()) + .setNasJobOutput(NasJobOutput.newBuilder().build()) + .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()) + .setEncryptionSpec(EncryptionSpec.newBuilder().build()) + .setEnableRestrictedImageTraining(true) + .build(); + mockJobService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + NasJob nasJob = NasJob.newBuilder().build(); + + NasJob actualResponse = client.createNasJob(parent, nasJob); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateNasJobRequest actualRequest = ((CreateNasJobRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(nasJob, actualRequest.getNasJob()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createNasJobExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + + try { + String parent = "parent-995424086"; + NasJob nasJob = NasJob.newBuilder().build(); + client.createNasJob(parent, nasJob); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getNasJobTest() throws Exception { + NasJob expectedResponse = + NasJob.newBuilder() + .setName(NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString()) + .setDisplayName("displayName1714148973") + .setNasJobSpec(NasJobSpec.newBuilder().build()) + .setNasJobOutput(NasJobOutput.newBuilder().build()) + .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()) + .setEncryptionSpec(EncryptionSpec.newBuilder().build()) + .setEnableRestrictedImageTraining(true) + .build(); + mockJobService.addResponse(expectedResponse); + + NasJobName name = NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]"); + + NasJob actualResponse = client.getNasJob(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetNasJobRequest actualRequest = ((GetNasJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getNasJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + + try { + NasJobName name = NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]"); + client.getNasJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getNasJobTest2() throws Exception { + NasJob expectedResponse = + NasJob.newBuilder() + .setName(NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString()) + .setDisplayName("displayName1714148973") + .setNasJobSpec(NasJobSpec.newBuilder().build()) + .setNasJobOutput(NasJobOutput.newBuilder().build()) + .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()) + .setEncryptionSpec(EncryptionSpec.newBuilder().build()) + .setEnableRestrictedImageTraining(true) + .build(); + mockJobService.addResponse(expectedResponse); + + String name = "name3373707"; + + NasJob actualResponse = client.getNasJob(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetNasJobRequest actualRequest = ((GetNasJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getNasJobExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + + try { + String name = "name3373707"; + client.getNasJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listNasJobsTest() throws Exception { + NasJob responsesElement = NasJob.newBuilder().build(); + ListNasJobsResponse expectedResponse = + ListNasJobsResponse.newBuilder() + .setNextPageToken("") + .addAllNasJobs(Arrays.asList(responsesElement)) + .build(); + mockJobService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListNasJobsPagedResponse pagedListResponse = client.listNasJobs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getNasJobsList().get(0), resources.get(0)); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListNasJobsRequest actualRequest = ((ListNasJobsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listNasJobsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listNasJobs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listNasJobsTest2() throws Exception { + NasJob responsesElement = NasJob.newBuilder().build(); + ListNasJobsResponse expectedResponse = + ListNasJobsResponse.newBuilder() + .setNextPageToken("") + .addAllNasJobs(Arrays.asList(responsesElement)) + .build(); + mockJobService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListNasJobsPagedResponse pagedListResponse = client.listNasJobs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getNasJobsList().get(0), resources.get(0)); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListNasJobsRequest actualRequest = ((ListNasJobsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listNasJobsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listNasJobs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteNasJobTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteNasJobTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockJobService.addResponse(resultOperation); + + NasJobName name = NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]"); + + client.deleteNasJobAsync(name).get(); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteNasJobRequest actualRequest = ((DeleteNasJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteNasJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + + try { + NasJobName name = NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]"); + client.deleteNasJobAsync(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 deleteNasJobTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteNasJobTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockJobService.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteNasJobAsync(name).get(); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteNasJobRequest actualRequest = ((DeleteNasJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteNasJobExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + + try { + String name = "name3373707"; + client.deleteNasJobAsync(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 cancelNasJobTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockJobService.addResponse(expectedResponse); + + NasJobName name = NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]"); + + client.cancelNasJob(name); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CancelNasJobRequest actualRequest = ((CancelNasJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void cancelNasJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + + try { + NasJobName name = NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]"); + client.cancelNasJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void cancelNasJobTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockJobService.addResponse(expectedResponse); + + String name = "name3373707"; + + client.cancelNasJob(name); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CancelNasJobRequest actualRequest = ((CancelNasJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void cancelNasJobExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + + try { + String name = "name3373707"; + client.cancelNasJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getNasTrialDetailTest() throws Exception { + NasTrialDetail expectedResponse = + NasTrialDetail.newBuilder() + .setName( + NasTrialDetailName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]", "[NAS_TRIAL_DETAIL]") + .toString()) + .setParameters("parameters458736106") + .setSearchTrial(NasTrial.newBuilder().build()) + .setTrainTrial(NasTrial.newBuilder().build()) + .build(); + mockJobService.addResponse(expectedResponse); + + NasTrialDetailName name = + NasTrialDetailName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]", "[NAS_TRIAL_DETAIL]"); + + NasTrialDetail actualResponse = client.getNasTrialDetail(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetNasTrialDetailRequest actualRequest = ((GetNasTrialDetailRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getNasTrialDetailExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + + try { + NasTrialDetailName name = + NasTrialDetailName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]", "[NAS_TRIAL_DETAIL]"); + client.getNasTrialDetail(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getNasTrialDetailTest2() throws Exception { + NasTrialDetail expectedResponse = + NasTrialDetail.newBuilder() + .setName( + NasTrialDetailName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]", "[NAS_TRIAL_DETAIL]") + .toString()) + .setParameters("parameters458736106") + .setSearchTrial(NasTrial.newBuilder().build()) + .setTrainTrial(NasTrial.newBuilder().build()) + .build(); + mockJobService.addResponse(expectedResponse); + + String name = "name3373707"; + + NasTrialDetail actualResponse = client.getNasTrialDetail(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetNasTrialDetailRequest actualRequest = ((GetNasTrialDetailRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getNasTrialDetailExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + + try { + String name = "name3373707"; + client.getNasTrialDetail(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listNasTrialDetailsTest() throws Exception { + NasTrialDetail responsesElement = NasTrialDetail.newBuilder().build(); + ListNasTrialDetailsResponse expectedResponse = + ListNasTrialDetailsResponse.newBuilder() + .setNextPageToken("") + .addAllNasTrialDetails(Arrays.asList(responsesElement)) + .build(); + mockJobService.addResponse(expectedResponse); + + NasJobName parent = NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]"); + + ListNasTrialDetailsPagedResponse pagedListResponse = client.listNasTrialDetails(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getNasTrialDetailsList().get(0), resources.get(0)); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListNasTrialDetailsRequest actualRequest = ((ListNasTrialDetailsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listNasTrialDetailsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + + try { + NasJobName parent = NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]"); + client.listNasTrialDetails(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listNasTrialDetailsTest2() throws Exception { + NasTrialDetail responsesElement = NasTrialDetail.newBuilder().build(); + ListNasTrialDetailsResponse expectedResponse = + ListNasTrialDetailsResponse.newBuilder() + .setNextPageToken("") + .addAllNasTrialDetails(Arrays.asList(responsesElement)) + .build(); + mockJobService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListNasTrialDetailsPagedResponse pagedListResponse = client.listNasTrialDetails(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getNasTrialDetailsList().get(0), resources.get(0)); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListNasTrialDetailsRequest actualRequest = ((ListNasTrialDetailsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listNasTrialDetailsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listNasTrialDetails(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void createBatchPredictionJobTest() throws Exception { BatchPredictionJob expectedResponse = diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockJobServiceImpl.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockJobServiceImpl.java index a0f58d0428ed..d1a71228ba0b 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockJobServiceImpl.java +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockJobServiceImpl.java @@ -379,6 +379,151 @@ public void cancelHyperparameterTuningJob( } } + @Override + public void createNasJob(CreateNasJobRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof NasJob) { + requests.add(request); + responseObserver.onNext(((NasJob) 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 CreateNasJob, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + NasJob.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getNasJob(GetNasJobRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof NasJob) { + requests.add(request); + responseObserver.onNext(((NasJob) 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 GetNasJob, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + NasJob.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listNasJobs( + ListNasJobsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListNasJobsResponse) { + requests.add(request); + responseObserver.onNext(((ListNasJobsResponse) 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 ListNasJobs, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListNasJobsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteNasJob( + DeleteNasJobRequest 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 DeleteNasJob, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void cancelNasJob(CancelNasJobRequest 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 CancelNasJob, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getNasTrialDetail( + GetNasTrialDetailRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof NasTrialDetail) { + requests.add(request); + responseObserver.onNext(((NasTrialDetail) 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 GetNasTrialDetail, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + NasTrialDetail.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listNasTrialDetails( + ListNasTrialDetailsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListNasTrialDetailsResponse) { + requests.add(request); + responseObserver.onNext(((ListNasTrialDetailsResponse) 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 ListNasTrialDetails, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListNasTrialDetailsResponse.class.getName(), + Exception.class.getName()))); + } + } + @Override public void createBatchPredictionJob( CreateBatchPredictionJobRequest request, diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockModelServiceImpl.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockModelServiceImpl.java index a5bd3ac81a32..4e69c0ba7fb7 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockModelServiceImpl.java +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/MockModelServiceImpl.java @@ -244,6 +244,26 @@ public void exportModel(ExportModelRequest request, StreamObserver re } } + @Override + public void copyModel(CopyModelRequest 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 CopyModel, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + @Override public void importModelEvaluation( ImportModelEvaluationRequest request, StreamObserver responseObserver) { diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/ModelServiceClientTest.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/ModelServiceClientTest.java index 4f757179061d..bcc350c25447 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/ModelServiceClientTest.java +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1/ModelServiceClientTest.java @@ -242,6 +242,7 @@ public void getModelTest() throws Exception { .putAllLabels(new HashMap()) .setEncryptionSpec(EncryptionSpec.newBuilder().build()) .setModelSourceInfo(ModelSourceInfo.newBuilder().build()) + .setOriginalModelInfo(Model.OriginalModelInfo.newBuilder().build()) .setMetadataArtifact("metadataArtifact1018119713") .build(); mockModelService.addResponse(expectedResponse); @@ -308,6 +309,7 @@ public void getModelTest2() throws Exception { .putAllLabels(new HashMap()) .setEncryptionSpec(EncryptionSpec.newBuilder().build()) .setModelSourceInfo(ModelSourceInfo.newBuilder().build()) + .setOriginalModelInfo(Model.OriginalModelInfo.newBuilder().build()) .setMetadataArtifact("metadataArtifact1018119713") .build(); mockModelService.addResponse(expectedResponse); @@ -550,6 +552,7 @@ public void updateModelTest() throws Exception { .putAllLabels(new HashMap()) .setEncryptionSpec(EncryptionSpec.newBuilder().build()) .setModelSourceInfo(ModelSourceInfo.newBuilder().build()) + .setOriginalModelInfo(Model.OriginalModelInfo.newBuilder().build()) .setMetadataArtifact("metadataArtifact1018119713") .build(); mockModelService.addResponse(expectedResponse); @@ -787,6 +790,7 @@ public void mergeVersionAliasesTest() throws Exception { .putAllLabels(new HashMap()) .setEncryptionSpec(EncryptionSpec.newBuilder().build()) .setModelSourceInfo(ModelSourceInfo.newBuilder().build()) + .setOriginalModelInfo(Model.OriginalModelInfo.newBuilder().build()) .setMetadataArtifact("metadataArtifact1018119713") .build(); mockModelService.addResponse(expectedResponse); @@ -856,6 +860,7 @@ public void mergeVersionAliasesTest2() throws Exception { .putAllLabels(new HashMap()) .setEncryptionSpec(EncryptionSpec.newBuilder().build()) .setModelSourceInfo(ModelSourceInfo.newBuilder().build()) + .setOriginalModelInfo(Model.OriginalModelInfo.newBuilder().build()) .setMetadataArtifact("metadataArtifact1018119713") .build(); mockModelService.addResponse(expectedResponse); @@ -989,6 +994,206 @@ public void exportModelExceptionTest2() throws Exception { } } + @Test + public void copyModelTest() throws Exception { + CopyModelResponse expectedResponse = + CopyModelResponse.newBuilder() + .setModel(ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString()) + .setModelVersionId("modelVersionId-2006125846") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("copyModelTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockModelService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + ModelName sourceModel = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]"); + + CopyModelResponse actualResponse = client.copyModelAsync(parent, sourceModel).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockModelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CopyModelRequest actualRequest = ((CopyModelRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(sourceModel.toString(), actualRequest.getSourceModel()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void copyModelExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockModelService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + ModelName sourceModel = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]"); + client.copyModelAsync(parent, sourceModel).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 copyModelTest2() throws Exception { + CopyModelResponse expectedResponse = + CopyModelResponse.newBuilder() + .setModel(ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString()) + .setModelVersionId("modelVersionId-2006125846") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("copyModelTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockModelService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + String sourceModel = "sourceModel-101418034"; + + CopyModelResponse actualResponse = client.copyModelAsync(parent, sourceModel).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockModelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CopyModelRequest actualRequest = ((CopyModelRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(sourceModel, actualRequest.getSourceModel()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void copyModelExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockModelService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + String sourceModel = "sourceModel-101418034"; + client.copyModelAsync(parent, sourceModel).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 copyModelTest3() throws Exception { + CopyModelResponse expectedResponse = + CopyModelResponse.newBuilder() + .setModel(ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString()) + .setModelVersionId("modelVersionId-2006125846") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("copyModelTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockModelService.addResponse(resultOperation); + + String parent = "parent-995424086"; + ModelName sourceModel = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]"); + + CopyModelResponse actualResponse = client.copyModelAsync(parent, sourceModel).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockModelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CopyModelRequest actualRequest = ((CopyModelRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(sourceModel.toString(), actualRequest.getSourceModel()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void copyModelExceptionTest3() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockModelService.addException(exception); + + try { + String parent = "parent-995424086"; + ModelName sourceModel = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]"); + client.copyModelAsync(parent, sourceModel).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 copyModelTest4() throws Exception { + CopyModelResponse expectedResponse = + CopyModelResponse.newBuilder() + .setModel(ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString()) + .setModelVersionId("modelVersionId-2006125846") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("copyModelTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockModelService.addResponse(resultOperation); + + String parent = "parent-995424086"; + String sourceModel = "sourceModel-101418034"; + + CopyModelResponse actualResponse = client.copyModelAsync(parent, sourceModel).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockModelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CopyModelRequest actualRequest = ((CopyModelRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(sourceModel, actualRequest.getSourceModel()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void copyModelExceptionTest4() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockModelService.addException(exception); + + try { + String parent = "parent-995424086"; + String sourceModel = "sourceModel-101418034"; + client.copyModelAsync(parent, sourceModel).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 importModelEvaluationTest() throws Exception { ModelEvaluation expectedResponse = diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/IndexEndpointServiceClientTest.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/IndexEndpointServiceClientTest.java index 261ab1694cdc..128cc9e8722b 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/IndexEndpointServiceClientTest.java +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/IndexEndpointServiceClientTest.java @@ -120,6 +120,7 @@ public void createIndexEndpointTest() throws Exception { .setUpdateTime(Timestamp.newBuilder().build()) .setNetwork("network1843485230") .setEnablePrivateServiceConnect(true) + .setPrivateServiceConnectConfig(PrivateServiceConnectConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -178,6 +179,7 @@ public void createIndexEndpointTest2() throws Exception { .setUpdateTime(Timestamp.newBuilder().build()) .setNetwork("network1843485230") .setEnablePrivateServiceConnect(true) + .setPrivateServiceConnectConfig(PrivateServiceConnectConfig.newBuilder().build()) .build(); Operation resultOperation = Operation.newBuilder() @@ -236,6 +238,7 @@ public void getIndexEndpointTest() throws Exception { .setUpdateTime(Timestamp.newBuilder().build()) .setNetwork("network1843485230") .setEnablePrivateServiceConnect(true) + .setPrivateServiceConnectConfig(PrivateServiceConnectConfig.newBuilder().build()) .build(); mockIndexEndpointService.addResponse(expectedResponse); @@ -283,6 +286,7 @@ public void getIndexEndpointTest2() throws Exception { .setUpdateTime(Timestamp.newBuilder().build()) .setNetwork("network1843485230") .setEnablePrivateServiceConnect(true) + .setPrivateServiceConnectConfig(PrivateServiceConnectConfig.newBuilder().build()) .build(); mockIndexEndpointService.addResponse(expectedResponse); @@ -418,6 +422,7 @@ public void updateIndexEndpointTest() throws Exception { .setUpdateTime(Timestamp.newBuilder().build()) .setNetwork("network1843485230") .setEnablePrivateServiceConnect(true) + .setPrivateServiceConnectConfig(PrivateServiceConnectConfig.newBuilder().build()) .build(); mockIndexEndpointService.addResponse(expectedResponse); diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/JobServiceClientTest.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/JobServiceClientTest.java index a3da34decd27..582de0ceb2d7 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/JobServiceClientTest.java +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/JobServiceClientTest.java @@ -22,6 +22,8 @@ import static com.google.cloud.aiplatform.v1beta1.JobServiceClient.ListHyperparameterTuningJobsPagedResponse; import static com.google.cloud.aiplatform.v1beta1.JobServiceClient.ListLocationsPagedResponse; import static com.google.cloud.aiplatform.v1beta1.JobServiceClient.ListModelDeploymentMonitoringJobsPagedResponse; +import static com.google.cloud.aiplatform.v1beta1.JobServiceClient.ListNasJobsPagedResponse; +import static com.google.cloud.aiplatform.v1beta1.JobServiceClient.ListNasTrialDetailsPagedResponse; import static com.google.cloud.aiplatform.v1beta1.JobServiceClient.SearchModelDeploymentMonitoringStatsAnomaliesPagedResponse; import com.google.api.gax.core.NoCredentialsProvider; @@ -1535,6 +1537,628 @@ public void cancelHyperparameterTuningJobExceptionTest2() throws Exception { } } + @Test + public void createNasJobTest() throws Exception { + NasJob expectedResponse = + NasJob.newBuilder() + .setName(NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString()) + .setDisplayName("displayName1714148973") + .setNasJobSpec(NasJobSpec.newBuilder().build()) + .setNasJobOutput(NasJobOutput.newBuilder().build()) + .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()) + .setEncryptionSpec(EncryptionSpec.newBuilder().build()) + .setEnableRestrictedImageTraining(true) + .build(); + mockJobService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + NasJob nasJob = NasJob.newBuilder().build(); + + NasJob actualResponse = client.createNasJob(parent, nasJob); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateNasJobRequest actualRequest = ((CreateNasJobRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(nasJob, actualRequest.getNasJob()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createNasJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + NasJob nasJob = NasJob.newBuilder().build(); + client.createNasJob(parent, nasJob); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createNasJobTest2() throws Exception { + NasJob expectedResponse = + NasJob.newBuilder() + .setName(NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString()) + .setDisplayName("displayName1714148973") + .setNasJobSpec(NasJobSpec.newBuilder().build()) + .setNasJobOutput(NasJobOutput.newBuilder().build()) + .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()) + .setEncryptionSpec(EncryptionSpec.newBuilder().build()) + .setEnableRestrictedImageTraining(true) + .build(); + mockJobService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + NasJob nasJob = NasJob.newBuilder().build(); + + NasJob actualResponse = client.createNasJob(parent, nasJob); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateNasJobRequest actualRequest = ((CreateNasJobRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(nasJob, actualRequest.getNasJob()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createNasJobExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + + try { + String parent = "parent-995424086"; + NasJob nasJob = NasJob.newBuilder().build(); + client.createNasJob(parent, nasJob); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getNasJobTest() throws Exception { + NasJob expectedResponse = + NasJob.newBuilder() + .setName(NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString()) + .setDisplayName("displayName1714148973") + .setNasJobSpec(NasJobSpec.newBuilder().build()) + .setNasJobOutput(NasJobOutput.newBuilder().build()) + .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()) + .setEncryptionSpec(EncryptionSpec.newBuilder().build()) + .setEnableRestrictedImageTraining(true) + .build(); + mockJobService.addResponse(expectedResponse); + + NasJobName name = NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]"); + + NasJob actualResponse = client.getNasJob(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetNasJobRequest actualRequest = ((GetNasJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getNasJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + + try { + NasJobName name = NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]"); + client.getNasJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getNasJobTest2() throws Exception { + NasJob expectedResponse = + NasJob.newBuilder() + .setName(NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]").toString()) + .setDisplayName("displayName1714148973") + .setNasJobSpec(NasJobSpec.newBuilder().build()) + .setNasJobOutput(NasJobOutput.newBuilder().build()) + .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()) + .setEncryptionSpec(EncryptionSpec.newBuilder().build()) + .setEnableRestrictedImageTraining(true) + .build(); + mockJobService.addResponse(expectedResponse); + + String name = "name3373707"; + + NasJob actualResponse = client.getNasJob(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetNasJobRequest actualRequest = ((GetNasJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getNasJobExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + + try { + String name = "name3373707"; + client.getNasJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listNasJobsTest() throws Exception { + NasJob responsesElement = NasJob.newBuilder().build(); + ListNasJobsResponse expectedResponse = + ListNasJobsResponse.newBuilder() + .setNextPageToken("") + .addAllNasJobs(Arrays.asList(responsesElement)) + .build(); + mockJobService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListNasJobsPagedResponse pagedListResponse = client.listNasJobs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getNasJobsList().get(0), resources.get(0)); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListNasJobsRequest actualRequest = ((ListNasJobsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listNasJobsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listNasJobs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listNasJobsTest2() throws Exception { + NasJob responsesElement = NasJob.newBuilder().build(); + ListNasJobsResponse expectedResponse = + ListNasJobsResponse.newBuilder() + .setNextPageToken("") + .addAllNasJobs(Arrays.asList(responsesElement)) + .build(); + mockJobService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListNasJobsPagedResponse pagedListResponse = client.listNasJobs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getNasJobsList().get(0), resources.get(0)); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListNasJobsRequest actualRequest = ((ListNasJobsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listNasJobsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listNasJobs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteNasJobTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteNasJobTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockJobService.addResponse(resultOperation); + + NasJobName name = NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]"); + + client.deleteNasJobAsync(name).get(); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteNasJobRequest actualRequest = ((DeleteNasJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteNasJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + + try { + NasJobName name = NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]"); + client.deleteNasJobAsync(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 deleteNasJobTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteNasJobTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockJobService.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteNasJobAsync(name).get(); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteNasJobRequest actualRequest = ((DeleteNasJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteNasJobExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + + try { + String name = "name3373707"; + client.deleteNasJobAsync(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 cancelNasJobTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockJobService.addResponse(expectedResponse); + + NasJobName name = NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]"); + + client.cancelNasJob(name); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CancelNasJobRequest actualRequest = ((CancelNasJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void cancelNasJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + + try { + NasJobName name = NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]"); + client.cancelNasJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void cancelNasJobTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockJobService.addResponse(expectedResponse); + + String name = "name3373707"; + + client.cancelNasJob(name); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CancelNasJobRequest actualRequest = ((CancelNasJobRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void cancelNasJobExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + + try { + String name = "name3373707"; + client.cancelNasJob(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getNasTrialDetailTest() throws Exception { + NasTrialDetail expectedResponse = + NasTrialDetail.newBuilder() + .setName( + NasTrialDetailName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]", "[NAS_TRIAL_DETAIL]") + .toString()) + .setParameters("parameters458736106") + .setSearchTrial(NasTrial.newBuilder().build()) + .setTrainTrial(NasTrial.newBuilder().build()) + .build(); + mockJobService.addResponse(expectedResponse); + + NasTrialDetailName name = + NasTrialDetailName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]", "[NAS_TRIAL_DETAIL]"); + + NasTrialDetail actualResponse = client.getNasTrialDetail(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetNasTrialDetailRequest actualRequest = ((GetNasTrialDetailRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getNasTrialDetailExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + + try { + NasTrialDetailName name = + NasTrialDetailName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]", "[NAS_TRIAL_DETAIL]"); + client.getNasTrialDetail(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getNasTrialDetailTest2() throws Exception { + NasTrialDetail expectedResponse = + NasTrialDetail.newBuilder() + .setName( + NasTrialDetailName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]", "[NAS_TRIAL_DETAIL]") + .toString()) + .setParameters("parameters458736106") + .setSearchTrial(NasTrial.newBuilder().build()) + .setTrainTrial(NasTrial.newBuilder().build()) + .build(); + mockJobService.addResponse(expectedResponse); + + String name = "name3373707"; + + NasTrialDetail actualResponse = client.getNasTrialDetail(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetNasTrialDetailRequest actualRequest = ((GetNasTrialDetailRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getNasTrialDetailExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + + try { + String name = "name3373707"; + client.getNasTrialDetail(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listNasTrialDetailsTest() throws Exception { + NasTrialDetail responsesElement = NasTrialDetail.newBuilder().build(); + ListNasTrialDetailsResponse expectedResponse = + ListNasTrialDetailsResponse.newBuilder() + .setNextPageToken("") + .addAllNasTrialDetails(Arrays.asList(responsesElement)) + .build(); + mockJobService.addResponse(expectedResponse); + + NasJobName parent = NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]"); + + ListNasTrialDetailsPagedResponse pagedListResponse = client.listNasTrialDetails(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getNasTrialDetailsList().get(0), resources.get(0)); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListNasTrialDetailsRequest actualRequest = ((ListNasTrialDetailsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listNasTrialDetailsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + + try { + NasJobName parent = NasJobName.of("[PROJECT]", "[LOCATION]", "[NAS_JOB]"); + client.listNasTrialDetails(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listNasTrialDetailsTest2() throws Exception { + NasTrialDetail responsesElement = NasTrialDetail.newBuilder().build(); + ListNasTrialDetailsResponse expectedResponse = + ListNasTrialDetailsResponse.newBuilder() + .setNextPageToken("") + .addAllNasTrialDetails(Arrays.asList(responsesElement)) + .build(); + mockJobService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListNasTrialDetailsPagedResponse pagedListResponse = client.listNasTrialDetails(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getNasTrialDetailsList().get(0), resources.get(0)); + + List actualRequests = mockJobService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListNasTrialDetailsRequest actualRequest = ((ListNasTrialDetailsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listNasTrialDetailsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockJobService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listNasTrialDetails(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void createBatchPredictionJobTest() throws Exception { BatchPredictionJob expectedResponse = diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockJobServiceImpl.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockJobServiceImpl.java index aec3059cc82f..a2859a8e4d67 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockJobServiceImpl.java +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockJobServiceImpl.java @@ -379,6 +379,151 @@ public void cancelHyperparameterTuningJob( } } + @Override + public void createNasJob(CreateNasJobRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof NasJob) { + requests.add(request); + responseObserver.onNext(((NasJob) 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 CreateNasJob, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + NasJob.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getNasJob(GetNasJobRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof NasJob) { + requests.add(request); + responseObserver.onNext(((NasJob) 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 GetNasJob, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + NasJob.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listNasJobs( + ListNasJobsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListNasJobsResponse) { + requests.add(request); + responseObserver.onNext(((ListNasJobsResponse) 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 ListNasJobs, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListNasJobsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteNasJob( + DeleteNasJobRequest 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 DeleteNasJob, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void cancelNasJob(CancelNasJobRequest 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 CancelNasJob, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getNasTrialDetail( + GetNasTrialDetailRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof NasTrialDetail) { + requests.add(request); + responseObserver.onNext(((NasTrialDetail) 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 GetNasTrialDetail, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + NasTrialDetail.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listNasTrialDetails( + ListNasTrialDetailsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListNasTrialDetailsResponse) { + requests.add(request); + responseObserver.onNext(((ListNasTrialDetailsResponse) 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 ListNasTrialDetails, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListNasTrialDetailsResponse.class.getName(), + Exception.class.getName()))); + } + } + @Override public void createBatchPredictionJob( CreateBatchPredictionJobRequest request, diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockModelServiceImpl.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockModelServiceImpl.java index 60c461613930..49a2f13a5b25 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockModelServiceImpl.java +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/MockModelServiceImpl.java @@ -265,6 +265,26 @@ public void exportModel(ExportModelRequest request, StreamObserver re } } + @Override + public void copyModel(CopyModelRequest 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 CopyModel, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + @Override public void importModelEvaluation( ImportModelEvaluationRequest request, StreamObserver responseObserver) { diff --git a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/ModelServiceClientTest.java b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/ModelServiceClientTest.java index 8619fd7498e8..cd356d77fd0c 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/ModelServiceClientTest.java +++ b/java-aiplatform/google-cloud-aiplatform/src/test/java/com/google/cloud/aiplatform/v1beta1/ModelServiceClientTest.java @@ -242,6 +242,7 @@ public void getModelTest() throws Exception { .putAllLabels(new HashMap()) .setEncryptionSpec(EncryptionSpec.newBuilder().build()) .setModelSourceInfo(ModelSourceInfo.newBuilder().build()) + .setOriginalModelInfo(Model.OriginalModelInfo.newBuilder().build()) .setMetadataArtifact("metadataArtifact1018119713") .build(); mockModelService.addResponse(expectedResponse); @@ -308,6 +309,7 @@ public void getModelTest2() throws Exception { .putAllLabels(new HashMap()) .setEncryptionSpec(EncryptionSpec.newBuilder().build()) .setModelSourceInfo(ModelSourceInfo.newBuilder().build()) + .setOriginalModelInfo(Model.OriginalModelInfo.newBuilder().build()) .setMetadataArtifact("metadataArtifact1018119713") .build(); mockModelService.addResponse(expectedResponse); @@ -550,6 +552,7 @@ public void updateModelTest() throws Exception { .putAllLabels(new HashMap()) .setEncryptionSpec(EncryptionSpec.newBuilder().build()) .setModelSourceInfo(ModelSourceInfo.newBuilder().build()) + .setOriginalModelInfo(Model.OriginalModelInfo.newBuilder().build()) .setMetadataArtifact("metadataArtifact1018119713") .build(); mockModelService.addResponse(expectedResponse); @@ -879,6 +882,7 @@ public void mergeVersionAliasesTest() throws Exception { .putAllLabels(new HashMap()) .setEncryptionSpec(EncryptionSpec.newBuilder().build()) .setModelSourceInfo(ModelSourceInfo.newBuilder().build()) + .setOriginalModelInfo(Model.OriginalModelInfo.newBuilder().build()) .setMetadataArtifact("metadataArtifact1018119713") .build(); mockModelService.addResponse(expectedResponse); @@ -948,6 +952,7 @@ public void mergeVersionAliasesTest2() throws Exception { .putAllLabels(new HashMap()) .setEncryptionSpec(EncryptionSpec.newBuilder().build()) .setModelSourceInfo(ModelSourceInfo.newBuilder().build()) + .setOriginalModelInfo(Model.OriginalModelInfo.newBuilder().build()) .setMetadataArtifact("metadataArtifact1018119713") .build(); mockModelService.addResponse(expectedResponse); @@ -1081,6 +1086,206 @@ public void exportModelExceptionTest2() throws Exception { } } + @Test + public void copyModelTest() throws Exception { + CopyModelResponse expectedResponse = + CopyModelResponse.newBuilder() + .setModel(ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString()) + .setModelVersionId("modelVersionId-2006125846") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("copyModelTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockModelService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + ModelName sourceModel = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]"); + + CopyModelResponse actualResponse = client.copyModelAsync(parent, sourceModel).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockModelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CopyModelRequest actualRequest = ((CopyModelRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(sourceModel.toString(), actualRequest.getSourceModel()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void copyModelExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockModelService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + ModelName sourceModel = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]"); + client.copyModelAsync(parent, sourceModel).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 copyModelTest2() throws Exception { + CopyModelResponse expectedResponse = + CopyModelResponse.newBuilder() + .setModel(ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString()) + .setModelVersionId("modelVersionId-2006125846") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("copyModelTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockModelService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + String sourceModel = "sourceModel-101418034"; + + CopyModelResponse actualResponse = client.copyModelAsync(parent, sourceModel).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockModelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CopyModelRequest actualRequest = ((CopyModelRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(sourceModel, actualRequest.getSourceModel()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void copyModelExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockModelService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + String sourceModel = "sourceModel-101418034"; + client.copyModelAsync(parent, sourceModel).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 copyModelTest3() throws Exception { + CopyModelResponse expectedResponse = + CopyModelResponse.newBuilder() + .setModel(ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString()) + .setModelVersionId("modelVersionId-2006125846") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("copyModelTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockModelService.addResponse(resultOperation); + + String parent = "parent-995424086"; + ModelName sourceModel = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]"); + + CopyModelResponse actualResponse = client.copyModelAsync(parent, sourceModel).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockModelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CopyModelRequest actualRequest = ((CopyModelRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(sourceModel.toString(), actualRequest.getSourceModel()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void copyModelExceptionTest3() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockModelService.addException(exception); + + try { + String parent = "parent-995424086"; + ModelName sourceModel = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]"); + client.copyModelAsync(parent, sourceModel).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 copyModelTest4() throws Exception { + CopyModelResponse expectedResponse = + CopyModelResponse.newBuilder() + .setModel(ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]").toString()) + .setModelVersionId("modelVersionId-2006125846") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("copyModelTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockModelService.addResponse(resultOperation); + + String parent = "parent-995424086"; + String sourceModel = "sourceModel-101418034"; + + CopyModelResponse actualResponse = client.copyModelAsync(parent, sourceModel).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockModelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CopyModelRequest actualRequest = ((CopyModelRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(sourceModel, actualRequest.getSourceModel()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void copyModelExceptionTest4() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockModelService.addException(exception); + + try { + String parent = "parent-995424086"; + String sourceModel = "sourceModel-101418034"; + client.copyModelAsync(parent, sourceModel).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 importModelEvaluationTest() throws Exception { ModelEvaluation expectedResponse = diff --git a/java-aiplatform/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/JobServiceGrpc.java b/java-aiplatform/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/JobServiceGrpc.java index 5a4529064f95..0f7951d9fb48 100644 --- a/java-aiplatform/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/JobServiceGrpc.java +++ b/java-aiplatform/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/JobServiceGrpc.java @@ -751,6 +751,314 @@ private JobServiceGrpc() {} return getCancelHyperparameterTuningJobMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CreateNasJobRequest, com.google.cloud.aiplatform.v1.NasJob> + getCreateNasJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateNasJob", + requestType = com.google.cloud.aiplatform.v1.CreateNasJobRequest.class, + responseType = com.google.cloud.aiplatform.v1.NasJob.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CreateNasJobRequest, com.google.cloud.aiplatform.v1.NasJob> + getCreateNasJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CreateNasJobRequest, + com.google.cloud.aiplatform.v1.NasJob> + getCreateNasJobMethod; + if ((getCreateNasJobMethod = JobServiceGrpc.getCreateNasJobMethod) == null) { + synchronized (JobServiceGrpc.class) { + if ((getCreateNasJobMethod = JobServiceGrpc.getCreateNasJobMethod) == null) { + JobServiceGrpc.getCreateNasJobMethod = + getCreateNasJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateNasJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.CreateNasJobRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.NasJob.getDefaultInstance())) + .setSchemaDescriptor(new JobServiceMethodDescriptorSupplier("CreateNasJob")) + .build(); + } + } + } + return getCreateNasJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetNasJobRequest, com.google.cloud.aiplatform.v1.NasJob> + getGetNasJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetNasJob", + requestType = com.google.cloud.aiplatform.v1.GetNasJobRequest.class, + responseType = com.google.cloud.aiplatform.v1.NasJob.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetNasJobRequest, com.google.cloud.aiplatform.v1.NasJob> + getGetNasJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetNasJobRequest, com.google.cloud.aiplatform.v1.NasJob> + getGetNasJobMethod; + if ((getGetNasJobMethod = JobServiceGrpc.getGetNasJobMethod) == null) { + synchronized (JobServiceGrpc.class) { + if ((getGetNasJobMethod = JobServiceGrpc.getGetNasJobMethod) == null) { + JobServiceGrpc.getGetNasJobMethod = + getGetNasJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetNasJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.GetNasJobRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.NasJob.getDefaultInstance())) + .setSchemaDescriptor(new JobServiceMethodDescriptorSupplier("GetNasJob")) + .build(); + } + } + } + return getGetNasJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListNasJobsRequest, + com.google.cloud.aiplatform.v1.ListNasJobsResponse> + getListNasJobsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListNasJobs", + requestType = com.google.cloud.aiplatform.v1.ListNasJobsRequest.class, + responseType = com.google.cloud.aiplatform.v1.ListNasJobsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListNasJobsRequest, + com.google.cloud.aiplatform.v1.ListNasJobsResponse> + getListNasJobsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListNasJobsRequest, + com.google.cloud.aiplatform.v1.ListNasJobsResponse> + getListNasJobsMethod; + if ((getListNasJobsMethod = JobServiceGrpc.getListNasJobsMethod) == null) { + synchronized (JobServiceGrpc.class) { + if ((getListNasJobsMethod = JobServiceGrpc.getListNasJobsMethod) == null) { + JobServiceGrpc.getListNasJobsMethod = + getListNasJobsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListNasJobs")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.ListNasJobsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.ListNasJobsResponse + .getDefaultInstance())) + .setSchemaDescriptor(new JobServiceMethodDescriptorSupplier("ListNasJobs")) + .build(); + } + } + } + return getListNasJobsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.DeleteNasJobRequest, com.google.longrunning.Operation> + getDeleteNasJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteNasJob", + requestType = com.google.cloud.aiplatform.v1.DeleteNasJobRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.DeleteNasJobRequest, com.google.longrunning.Operation> + getDeleteNasJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.DeleteNasJobRequest, com.google.longrunning.Operation> + getDeleteNasJobMethod; + if ((getDeleteNasJobMethod = JobServiceGrpc.getDeleteNasJobMethod) == null) { + synchronized (JobServiceGrpc.class) { + if ((getDeleteNasJobMethod = JobServiceGrpc.getDeleteNasJobMethod) == null) { + JobServiceGrpc.getDeleteNasJobMethod = + getDeleteNasJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteNasJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.DeleteNasJobRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new JobServiceMethodDescriptorSupplier("DeleteNasJob")) + .build(); + } + } + } + return getDeleteNasJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CancelNasJobRequest, com.google.protobuf.Empty> + getCancelNasJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CancelNasJob", + requestType = com.google.cloud.aiplatform.v1.CancelNasJobRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CancelNasJobRequest, com.google.protobuf.Empty> + getCancelNasJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CancelNasJobRequest, com.google.protobuf.Empty> + getCancelNasJobMethod; + if ((getCancelNasJobMethod = JobServiceGrpc.getCancelNasJobMethod) == null) { + synchronized (JobServiceGrpc.class) { + if ((getCancelNasJobMethod = JobServiceGrpc.getCancelNasJobMethod) == null) { + JobServiceGrpc.getCancelNasJobMethod = + getCancelNasJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CancelNasJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.CancelNasJobRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new JobServiceMethodDescriptorSupplier("CancelNasJob")) + .build(); + } + } + } + return getCancelNasJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetNasTrialDetailRequest, + com.google.cloud.aiplatform.v1.NasTrialDetail> + getGetNasTrialDetailMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetNasTrialDetail", + requestType = com.google.cloud.aiplatform.v1.GetNasTrialDetailRequest.class, + responseType = com.google.cloud.aiplatform.v1.NasTrialDetail.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetNasTrialDetailRequest, + com.google.cloud.aiplatform.v1.NasTrialDetail> + getGetNasTrialDetailMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.GetNasTrialDetailRequest, + com.google.cloud.aiplatform.v1.NasTrialDetail> + getGetNasTrialDetailMethod; + if ((getGetNasTrialDetailMethod = JobServiceGrpc.getGetNasTrialDetailMethod) == null) { + synchronized (JobServiceGrpc.class) { + if ((getGetNasTrialDetailMethod = JobServiceGrpc.getGetNasTrialDetailMethod) == null) { + JobServiceGrpc.getGetNasTrialDetailMethod = + getGetNasTrialDetailMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetNasTrialDetail")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.GetNasTrialDetailRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.NasTrialDetail.getDefaultInstance())) + .setSchemaDescriptor( + new JobServiceMethodDescriptorSupplier("GetNasTrialDetail")) + .build(); + } + } + } + return getGetNasTrialDetailMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListNasTrialDetailsRequest, + com.google.cloud.aiplatform.v1.ListNasTrialDetailsResponse> + getListNasTrialDetailsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListNasTrialDetails", + requestType = com.google.cloud.aiplatform.v1.ListNasTrialDetailsRequest.class, + responseType = com.google.cloud.aiplatform.v1.ListNasTrialDetailsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListNasTrialDetailsRequest, + com.google.cloud.aiplatform.v1.ListNasTrialDetailsResponse> + getListNasTrialDetailsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.ListNasTrialDetailsRequest, + com.google.cloud.aiplatform.v1.ListNasTrialDetailsResponse> + getListNasTrialDetailsMethod; + if ((getListNasTrialDetailsMethod = JobServiceGrpc.getListNasTrialDetailsMethod) == null) { + synchronized (JobServiceGrpc.class) { + if ((getListNasTrialDetailsMethod = JobServiceGrpc.getListNasTrialDetailsMethod) == null) { + JobServiceGrpc.getListNasTrialDetailsMethod = + getListNasTrialDetailsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListNasTrialDetails")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.ListNasTrialDetailsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.ListNasTrialDetailsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new JobServiceMethodDescriptorSupplier("ListNasTrialDetails")) + .build(); + } + } + } + return getListNasTrialDetailsMethod; + } + private static volatile io.grpc.MethodDescriptor< com.google.cloud.aiplatform.v1.CreateBatchPredictionJobRequest, com.google.cloud.aiplatform.v1.BatchPredictionJob> @@ -1720,6 +2028,118 @@ public void cancelHyperparameterTuningJob( getCancelHyperparameterTuningJobMethod(), responseObserver); } + /** + * + * + *
+     * Creates a NasJob
+     * 
+ */ + public void createNasJob( + com.google.cloud.aiplatform.v1.CreateNasJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateNasJobMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets a NasJob
+     * 
+ */ + public void getNasJob( + com.google.cloud.aiplatform.v1.GetNasJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetNasJobMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists NasJobs in a Location.
+     * 
+ */ + public void listNasJobs( + com.google.cloud.aiplatform.v1.ListNasJobsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListNasJobsMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a NasJob.
+     * 
+ */ + public void deleteNasJob( + com.google.cloud.aiplatform.v1.DeleteNasJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteNasJobMethod(), responseObserver); + } + + /** + * + * + *
+     * Cancels a NasJob.
+     * Starts asynchronous cancellation on the NasJob. The server
+     * makes a best effort to cancel the job, but success is not
+     * guaranteed. Clients can use
+     * [JobService.GetNasJob][google.cloud.aiplatform.v1.JobService.GetNasJob] or
+     * other methods to check whether the cancellation succeeded or whether the
+     * job completed despite cancellation. On successful cancellation,
+     * the NasJob is not deleted; instead it becomes a job with
+     * a [NasJob.error][google.cloud.aiplatform.v1.NasJob.error] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`, and
+     * [NasJob.state][google.cloud.aiplatform.v1.NasJob.state] is set to
+     * `CANCELLED`.
+     * 
+ */ + public void cancelNasJob( + com.google.cloud.aiplatform.v1.CancelNasJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCancelNasJobMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets a NasTrialDetail.
+     * 
+ */ + public void getNasTrialDetail( + com.google.cloud.aiplatform.v1.GetNasTrialDetailRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetNasTrialDetailMethod(), responseObserver); + } + + /** + * + * + *
+     * List top NasTrialDetails of a NasJob.
+     * 
+ */ + public void listNasTrialDetails( + com.google.cloud.aiplatform.v1.ListNasTrialDetailsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListNasTrialDetailsMethod(), responseObserver); + } + /** * * @@ -2031,6 +2451,51 @@ public final io.grpc.ServerServiceDefinition bindService() { new MethodHandlers< com.google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest, com.google.protobuf.Empty>(this, METHODID_CANCEL_HYPERPARAMETER_TUNING_JOB))) + .addMethod( + getCreateNasJobMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.CreateNasJobRequest, + com.google.cloud.aiplatform.v1.NasJob>(this, METHODID_CREATE_NAS_JOB))) + .addMethod( + getGetNasJobMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.GetNasJobRequest, + com.google.cloud.aiplatform.v1.NasJob>(this, METHODID_GET_NAS_JOB))) + .addMethod( + getListNasJobsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.ListNasJobsRequest, + com.google.cloud.aiplatform.v1.ListNasJobsResponse>( + this, METHODID_LIST_NAS_JOBS))) + .addMethod( + getDeleteNasJobMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.DeleteNasJobRequest, + com.google.longrunning.Operation>(this, METHODID_DELETE_NAS_JOB))) + .addMethod( + getCancelNasJobMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.CancelNasJobRequest, + com.google.protobuf.Empty>(this, METHODID_CANCEL_NAS_JOB))) + .addMethod( + getGetNasTrialDetailMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.GetNasTrialDetailRequest, + com.google.cloud.aiplatform.v1.NasTrialDetail>( + this, METHODID_GET_NAS_TRIAL_DETAIL))) + .addMethod( + getListNasTrialDetailsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.ListNasTrialDetailsRequest, + com.google.cloud.aiplatform.v1.ListNasTrialDetailsResponse>( + this, METHODID_LIST_NAS_TRIAL_DETAILS))) .addMethod( getCreateBatchPredictionJobMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -2418,6 +2883,131 @@ public void cancelHyperparameterTuningJob( responseObserver); } + /** + * + * + *
+     * Creates a NasJob
+     * 
+ */ + public void createNasJob( + com.google.cloud.aiplatform.v1.CreateNasJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateNasJobMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a NasJob
+     * 
+ */ + public void getNasJob( + com.google.cloud.aiplatform.v1.GetNasJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetNasJobMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Lists NasJobs in a Location.
+     * 
+ */ + public void listNasJobs( + com.google.cloud.aiplatform.v1.ListNasJobsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListNasJobsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a NasJob.
+     * 
+ */ + public void deleteNasJob( + com.google.cloud.aiplatform.v1.DeleteNasJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteNasJobMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Cancels a NasJob.
+     * Starts asynchronous cancellation on the NasJob. The server
+     * makes a best effort to cancel the job, but success is not
+     * guaranteed. Clients can use
+     * [JobService.GetNasJob][google.cloud.aiplatform.v1.JobService.GetNasJob] or
+     * other methods to check whether the cancellation succeeded or whether the
+     * job completed despite cancellation. On successful cancellation,
+     * the NasJob is not deleted; instead it becomes a job with
+     * a [NasJob.error][google.cloud.aiplatform.v1.NasJob.error] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`, and
+     * [NasJob.state][google.cloud.aiplatform.v1.NasJob.state] is set to
+     * `CANCELLED`.
+     * 
+ */ + public void cancelNasJob( + com.google.cloud.aiplatform.v1.CancelNasJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCancelNasJobMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a NasTrialDetail.
+     * 
+ */ + public void getNasTrialDetail( + com.google.cloud.aiplatform.v1.GetNasTrialDetailRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetNasTrialDetailMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * List top NasTrialDetails of a NasJob.
+     * 
+ */ + public void listNasTrialDetails( + com.google.cloud.aiplatform.v1.ListNasTrialDetailsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListNasTrialDetailsMethod(), getCallOptions()), + request, + responseObserver); + } + /** * * @@ -2897,6 +3487,109 @@ public com.google.protobuf.Empty cancelHyperparameterTuningJob( getChannel(), getCancelHyperparameterTuningJobMethod(), getCallOptions(), request); } + /** + * + * + *
+     * Creates a NasJob
+     * 
+ */ + public com.google.cloud.aiplatform.v1.NasJob createNasJob( + com.google.cloud.aiplatform.v1.CreateNasJobRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateNasJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a NasJob
+     * 
+ */ + public com.google.cloud.aiplatform.v1.NasJob getNasJob( + com.google.cloud.aiplatform.v1.GetNasJobRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetNasJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists NasJobs in a Location.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.ListNasJobsResponse listNasJobs( + com.google.cloud.aiplatform.v1.ListNasJobsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListNasJobsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a NasJob.
+     * 
+ */ + public com.google.longrunning.Operation deleteNasJob( + com.google.cloud.aiplatform.v1.DeleteNasJobRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteNasJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Cancels a NasJob.
+     * Starts asynchronous cancellation on the NasJob. The server
+     * makes a best effort to cancel the job, but success is not
+     * guaranteed. Clients can use
+     * [JobService.GetNasJob][google.cloud.aiplatform.v1.JobService.GetNasJob] or
+     * other methods to check whether the cancellation succeeded or whether the
+     * job completed despite cancellation. On successful cancellation,
+     * the NasJob is not deleted; instead it becomes a job with
+     * a [NasJob.error][google.cloud.aiplatform.v1.NasJob.error] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`, and
+     * [NasJob.state][google.cloud.aiplatform.v1.NasJob.state] is set to
+     * `CANCELLED`.
+     * 
+ */ + public com.google.protobuf.Empty cancelNasJob( + com.google.cloud.aiplatform.v1.CancelNasJobRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCancelNasJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a NasTrialDetail.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.NasTrialDetail getNasTrialDetail( + com.google.cloud.aiplatform.v1.GetNasTrialDetailRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetNasTrialDetailMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * List top NasTrialDetails of a NasJob.
+     * 
+ */ + public com.google.cloud.aiplatform.v1.ListNasTrialDetailsResponse listNasTrialDetails( + com.google.cloud.aiplatform.v1.ListNasTrialDetailsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListNasTrialDetailsMethod(), getCallOptions(), request); + } + /** * * @@ -3349,6 +4042,112 @@ protected JobServiceFutureStub build(io.grpc.Channel channel, io.grpc.CallOption request); } + /** + * + * + *
+     * Creates a NasJob
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createNasJob(com.google.cloud.aiplatform.v1.CreateNasJobRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateNasJobMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets a NasJob
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + getNasJob(com.google.cloud.aiplatform.v1.GetNasJobRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetNasJobMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists NasJobs in a Location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.ListNasJobsResponse> + listNasJobs(com.google.cloud.aiplatform.v1.ListNasJobsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListNasJobsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a NasJob.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteNasJob(com.google.cloud.aiplatform.v1.DeleteNasJobRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteNasJobMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Cancels a NasJob.
+     * Starts asynchronous cancellation on the NasJob. The server
+     * makes a best effort to cancel the job, but success is not
+     * guaranteed. Clients can use
+     * [JobService.GetNasJob][google.cloud.aiplatform.v1.JobService.GetNasJob] or
+     * other methods to check whether the cancellation succeeded or whether the
+     * job completed despite cancellation. On successful cancellation,
+     * the NasJob is not deleted; instead it becomes a job with
+     * a [NasJob.error][google.cloud.aiplatform.v1.NasJob.error] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`, and
+     * [NasJob.state][google.cloud.aiplatform.v1.NasJob.state] is set to
+     * `CANCELLED`.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + cancelNasJob(com.google.cloud.aiplatform.v1.CancelNasJobRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCancelNasJobMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets a NasTrialDetail.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.NasTrialDetail> + getNasTrialDetail(com.google.cloud.aiplatform.v1.GetNasTrialDetailRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetNasTrialDetailMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * List top NasTrialDetails of a NasJob.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1.ListNasTrialDetailsResponse> + listNasTrialDetails(com.google.cloud.aiplatform.v1.ListNasTrialDetailsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListNasTrialDetailsMethod(), getCallOptions()), request); + } + /** * * @@ -3581,19 +4380,26 @@ protected JobServiceFutureStub build(io.grpc.Channel channel, io.grpc.CallOption private static final int METHODID_LIST_HYPERPARAMETER_TUNING_JOBS = 12; private static final int METHODID_DELETE_HYPERPARAMETER_TUNING_JOB = 13; private static final int METHODID_CANCEL_HYPERPARAMETER_TUNING_JOB = 14; - private static final int METHODID_CREATE_BATCH_PREDICTION_JOB = 15; - private static final int METHODID_GET_BATCH_PREDICTION_JOB = 16; - private static final int METHODID_LIST_BATCH_PREDICTION_JOBS = 17; - private static final int METHODID_DELETE_BATCH_PREDICTION_JOB = 18; - private static final int METHODID_CANCEL_BATCH_PREDICTION_JOB = 19; - private static final int METHODID_CREATE_MODEL_DEPLOYMENT_MONITORING_JOB = 20; - private static final int METHODID_SEARCH_MODEL_DEPLOYMENT_MONITORING_STATS_ANOMALIES = 21; - private static final int METHODID_GET_MODEL_DEPLOYMENT_MONITORING_JOB = 22; - private static final int METHODID_LIST_MODEL_DEPLOYMENT_MONITORING_JOBS = 23; - private static final int METHODID_UPDATE_MODEL_DEPLOYMENT_MONITORING_JOB = 24; - private static final int METHODID_DELETE_MODEL_DEPLOYMENT_MONITORING_JOB = 25; - private static final int METHODID_PAUSE_MODEL_DEPLOYMENT_MONITORING_JOB = 26; - private static final int METHODID_RESUME_MODEL_DEPLOYMENT_MONITORING_JOB = 27; + private static final int METHODID_CREATE_NAS_JOB = 15; + private static final int METHODID_GET_NAS_JOB = 16; + private static final int METHODID_LIST_NAS_JOBS = 17; + private static final int METHODID_DELETE_NAS_JOB = 18; + private static final int METHODID_CANCEL_NAS_JOB = 19; + private static final int METHODID_GET_NAS_TRIAL_DETAIL = 20; + private static final int METHODID_LIST_NAS_TRIAL_DETAILS = 21; + private static final int METHODID_CREATE_BATCH_PREDICTION_JOB = 22; + private static final int METHODID_GET_BATCH_PREDICTION_JOB = 23; + private static final int METHODID_LIST_BATCH_PREDICTION_JOBS = 24; + private static final int METHODID_DELETE_BATCH_PREDICTION_JOB = 25; + private static final int METHODID_CANCEL_BATCH_PREDICTION_JOB = 26; + private static final int METHODID_CREATE_MODEL_DEPLOYMENT_MONITORING_JOB = 27; + private static final int METHODID_SEARCH_MODEL_DEPLOYMENT_MONITORING_STATS_ANOMALIES = 28; + private static final int METHODID_GET_MODEL_DEPLOYMENT_MONITORING_JOB = 29; + private static final int METHODID_LIST_MODEL_DEPLOYMENT_MONITORING_JOBS = 30; + private static final int METHODID_UPDATE_MODEL_DEPLOYMENT_MONITORING_JOB = 31; + private static final int METHODID_DELETE_MODEL_DEPLOYMENT_MONITORING_JOB = 32; + private static final int METHODID_PAUSE_MODEL_DEPLOYMENT_MONITORING_JOB = 33; + private static final int METHODID_RESUME_MODEL_DEPLOYMENT_MONITORING_JOB = 34; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -3698,6 +4504,47 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.cloud.aiplatform.v1.CancelHyperparameterTuningJobRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_CREATE_NAS_JOB: + serviceImpl.createNasJob( + (com.google.cloud.aiplatform.v1.CreateNasJobRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_NAS_JOB: + serviceImpl.getNasJob( + (com.google.cloud.aiplatform.v1.GetNasJobRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_NAS_JOBS: + serviceImpl.listNasJobs( + (com.google.cloud.aiplatform.v1.ListNasJobsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DELETE_NAS_JOB: + serviceImpl.deleteNasJob( + (com.google.cloud.aiplatform.v1.DeleteNasJobRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CANCEL_NAS_JOB: + serviceImpl.cancelNasJob( + (com.google.cloud.aiplatform.v1.CancelNasJobRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_NAS_TRIAL_DETAIL: + serviceImpl.getNasTrialDetail( + (com.google.cloud.aiplatform.v1.GetNasTrialDetailRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_NAS_TRIAL_DETAILS: + serviceImpl.listNasTrialDetails( + (com.google.cloud.aiplatform.v1.ListNasTrialDetailsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.aiplatform.v1.ListNasTrialDetailsResponse>) + responseObserver); + break; case METHODID_CREATE_BATCH_PREDICTION_JOB: serviceImpl.createBatchPredictionJob( (com.google.cloud.aiplatform.v1.CreateBatchPredictionJobRequest) request, @@ -3856,6 +4703,13 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getListHyperparameterTuningJobsMethod()) .addMethod(getDeleteHyperparameterTuningJobMethod()) .addMethod(getCancelHyperparameterTuningJobMethod()) + .addMethod(getCreateNasJobMethod()) + .addMethod(getGetNasJobMethod()) + .addMethod(getListNasJobsMethod()) + .addMethod(getDeleteNasJobMethod()) + .addMethod(getCancelNasJobMethod()) + .addMethod(getGetNasTrialDetailMethod()) + .addMethod(getListNasTrialDetailsMethod()) .addMethod(getCreateBatchPredictionJobMethod()) .addMethod(getGetBatchPredictionJobMethod()) .addMethod(getListBatchPredictionJobsMethod()) diff --git a/java-aiplatform/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelServiceGrpc.java b/java-aiplatform/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelServiceGrpc.java index 5fa51203415b..28fb8ef4f01f 100644 --- a/java-aiplatform/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelServiceGrpc.java +++ b/java-aiplatform/grpc-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelServiceGrpc.java @@ -431,6 +431,47 @@ private ModelServiceGrpc() {} return getExportModelMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CopyModelRequest, com.google.longrunning.Operation> + getCopyModelMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CopyModel", + requestType = com.google.cloud.aiplatform.v1.CopyModelRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CopyModelRequest, com.google.longrunning.Operation> + getCopyModelMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1.CopyModelRequest, com.google.longrunning.Operation> + getCopyModelMethod; + if ((getCopyModelMethod = ModelServiceGrpc.getCopyModelMethod) == null) { + synchronized (ModelServiceGrpc.class) { + if ((getCopyModelMethod = ModelServiceGrpc.getCopyModelMethod) == null) { + ModelServiceGrpc.getCopyModelMethod = + getCopyModelMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CopyModel")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1.CopyModelRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new ModelServiceMethodDescriptorSupplier("CopyModel")) + .build(); + } + } + } + return getCopyModelMethod; + } + private static volatile io.grpc.MethodDescriptor< com.google.cloud.aiplatform.v1.ImportModelEvaluationRequest, com.google.cloud.aiplatform.v1.ModelEvaluation> @@ -918,6 +959,24 @@ public void exportModel( getExportModelMethod(), responseObserver); } + /** + * + * + *
+     * Copies an already existing Vertex AI Model into the specified Location.
+     * The source Model must exist in the same Project.
+     * When copying custom Models, the users themselves are responsible for
+     * [Model.metadata][google.cloud.aiplatform.v1.Model.metadata] content to be
+     * region-agnostic, as well as making sure that any resources (e.g. files) it
+     * depends on remain accessible.
+     * 
+ */ + public void copyModel( + com.google.cloud.aiplatform.v1.CopyModelRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCopyModelMethod(), responseObserver); + } + /** * * @@ -1069,6 +1128,12 @@ public final io.grpc.ServerServiceDefinition bindService() { new MethodHandlers< com.google.cloud.aiplatform.v1.ExportModelRequest, com.google.longrunning.Operation>(this, METHODID_EXPORT_MODEL))) + .addMethod( + getCopyModelMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1.CopyModelRequest, + com.google.longrunning.Operation>(this, METHODID_COPY_MODEL))) .addMethod( getImportModelEvaluationMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -1288,6 +1353,25 @@ public void exportModel( responseObserver); } + /** + * + * + *
+     * Copies an already existing Vertex AI Model into the specified Location.
+     * The source Model must exist in the same Project.
+     * When copying custom Models, the users themselves are responsible for
+     * [Model.metadata][google.cloud.aiplatform.v1.Model.metadata] content to be
+     * region-agnostic, as well as making sure that any resources (e.g. files) it
+     * depends on remain accessible.
+     * 
+ */ + public void copyModel( + com.google.cloud.aiplatform.v1.CopyModelRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCopyModelMethod(), getCallOptions()), request, responseObserver); + } + /** * * @@ -1542,6 +1626,24 @@ public com.google.longrunning.Operation exportModel( getChannel(), getExportModelMethod(), getCallOptions(), request); } + /** + * + * + *
+     * Copies an already existing Vertex AI Model into the specified Location.
+     * The source Model must exist in the same Project.
+     * When copying custom Models, the users themselves are responsible for
+     * [Model.metadata][google.cloud.aiplatform.v1.Model.metadata] content to be
+     * region-agnostic, as well as making sure that any resources (e.g. files) it
+     * depends on remain accessible.
+     * 
+ */ + public com.google.longrunning.Operation copyModel( + com.google.cloud.aiplatform.v1.CopyModelRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCopyModelMethod(), getCallOptions(), request); + } + /** * * @@ -1774,6 +1876,24 @@ protected ModelServiceFutureStub build( getChannel().newCall(getExportModelMethod(), getCallOptions()), request); } + /** + * + * + *
+     * Copies an already existing Vertex AI Model into the specified Location.
+     * The source Model must exist in the same Project.
+     * When copying custom Models, the users themselves are responsible for
+     * [Model.metadata][google.cloud.aiplatform.v1.Model.metadata] content to be
+     * region-agnostic, as well as making sure that any resources (e.g. files) it
+     * depends on remain accessible.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + copyModel(com.google.cloud.aiplatform.v1.CopyModelRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCopyModelMethod(), getCallOptions()), request); + } + /** * * @@ -1872,12 +1992,13 @@ protected ModelServiceFutureStub build( private static final int METHODID_DELETE_MODEL_VERSION = 6; private static final int METHODID_MERGE_VERSION_ALIASES = 7; private static final int METHODID_EXPORT_MODEL = 8; - private static final int METHODID_IMPORT_MODEL_EVALUATION = 9; - private static final int METHODID_BATCH_IMPORT_MODEL_EVALUATION_SLICES = 10; - private static final int METHODID_GET_MODEL_EVALUATION = 11; - private static final int METHODID_LIST_MODEL_EVALUATIONS = 12; - private static final int METHODID_GET_MODEL_EVALUATION_SLICE = 13; - private static final int METHODID_LIST_MODEL_EVALUATION_SLICES = 14; + private static final int METHODID_COPY_MODEL = 9; + private static final int METHODID_IMPORT_MODEL_EVALUATION = 10; + private static final int METHODID_BATCH_IMPORT_MODEL_EVALUATION_SLICES = 11; + private static final int METHODID_GET_MODEL_EVALUATION = 12; + private static final int METHODID_LIST_MODEL_EVALUATIONS = 13; + private static final int METHODID_GET_MODEL_EVALUATION_SLICE = 14; + private static final int METHODID_LIST_MODEL_EVALUATION_SLICES = 15; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -1944,6 +2065,11 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.cloud.aiplatform.v1.ExportModelRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_COPY_MODEL: + serviceImpl.copyModel( + (com.google.cloud.aiplatform.v1.CopyModelRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; case METHODID_IMPORT_MODEL_EVALUATION: serviceImpl.importModelEvaluation( (com.google.cloud.aiplatform.v1.ImportModelEvaluationRequest) request, @@ -2056,6 +2182,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getDeleteModelVersionMethod()) .addMethod(getMergeVersionAliasesMethod()) .addMethod(getExportModelMethod()) + .addMethod(getCopyModelMethod()) .addMethod(getImportModelEvaluationMethod()) .addMethod(getBatchImportModelEvaluationSlicesMethod()) .addMethod(getGetModelEvaluationMethod()) diff --git a/java-aiplatform/grpc-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/JobServiceGrpc.java b/java-aiplatform/grpc-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/JobServiceGrpc.java index 915da2c4dfa5..89fc7e635e95 100644 --- a/java-aiplatform/grpc-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/JobServiceGrpc.java +++ b/java-aiplatform/grpc-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/JobServiceGrpc.java @@ -759,6 +759,322 @@ private JobServiceGrpc() {} return getCancelHyperparameterTuningJobMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.CreateNasJobRequest, + com.google.cloud.aiplatform.v1beta1.NasJob> + getCreateNasJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateNasJob", + requestType = com.google.cloud.aiplatform.v1beta1.CreateNasJobRequest.class, + responseType = com.google.cloud.aiplatform.v1beta1.NasJob.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.CreateNasJobRequest, + com.google.cloud.aiplatform.v1beta1.NasJob> + getCreateNasJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.CreateNasJobRequest, + com.google.cloud.aiplatform.v1beta1.NasJob> + getCreateNasJobMethod; + if ((getCreateNasJobMethod = JobServiceGrpc.getCreateNasJobMethod) == null) { + synchronized (JobServiceGrpc.class) { + if ((getCreateNasJobMethod = JobServiceGrpc.getCreateNasJobMethod) == null) { + JobServiceGrpc.getCreateNasJobMethod = + getCreateNasJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateNasJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.CreateNasJobRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.NasJob.getDefaultInstance())) + .setSchemaDescriptor(new JobServiceMethodDescriptorSupplier("CreateNasJob")) + .build(); + } + } + } + return getCreateNasJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.GetNasJobRequest, + com.google.cloud.aiplatform.v1beta1.NasJob> + getGetNasJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetNasJob", + requestType = com.google.cloud.aiplatform.v1beta1.GetNasJobRequest.class, + responseType = com.google.cloud.aiplatform.v1beta1.NasJob.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.GetNasJobRequest, + com.google.cloud.aiplatform.v1beta1.NasJob> + getGetNasJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.GetNasJobRequest, + com.google.cloud.aiplatform.v1beta1.NasJob> + getGetNasJobMethod; + if ((getGetNasJobMethod = JobServiceGrpc.getGetNasJobMethod) == null) { + synchronized (JobServiceGrpc.class) { + if ((getGetNasJobMethod = JobServiceGrpc.getGetNasJobMethod) == null) { + JobServiceGrpc.getGetNasJobMethod = + getGetNasJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetNasJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.GetNasJobRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.NasJob.getDefaultInstance())) + .setSchemaDescriptor(new JobServiceMethodDescriptorSupplier("GetNasJob")) + .build(); + } + } + } + return getGetNasJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.ListNasJobsRequest, + com.google.cloud.aiplatform.v1beta1.ListNasJobsResponse> + getListNasJobsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListNasJobs", + requestType = com.google.cloud.aiplatform.v1beta1.ListNasJobsRequest.class, + responseType = com.google.cloud.aiplatform.v1beta1.ListNasJobsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.ListNasJobsRequest, + com.google.cloud.aiplatform.v1beta1.ListNasJobsResponse> + getListNasJobsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.ListNasJobsRequest, + com.google.cloud.aiplatform.v1beta1.ListNasJobsResponse> + getListNasJobsMethod; + if ((getListNasJobsMethod = JobServiceGrpc.getListNasJobsMethod) == null) { + synchronized (JobServiceGrpc.class) { + if ((getListNasJobsMethod = JobServiceGrpc.getListNasJobsMethod) == null) { + JobServiceGrpc.getListNasJobsMethod = + getListNasJobsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListNasJobs")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.ListNasJobsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.ListNasJobsResponse + .getDefaultInstance())) + .setSchemaDescriptor(new JobServiceMethodDescriptorSupplier("ListNasJobs")) + .build(); + } + } + } + return getListNasJobsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.DeleteNasJobRequest, com.google.longrunning.Operation> + getDeleteNasJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteNasJob", + requestType = com.google.cloud.aiplatform.v1beta1.DeleteNasJobRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.DeleteNasJobRequest, com.google.longrunning.Operation> + getDeleteNasJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.DeleteNasJobRequest, + com.google.longrunning.Operation> + getDeleteNasJobMethod; + if ((getDeleteNasJobMethod = JobServiceGrpc.getDeleteNasJobMethod) == null) { + synchronized (JobServiceGrpc.class) { + if ((getDeleteNasJobMethod = JobServiceGrpc.getDeleteNasJobMethod) == null) { + JobServiceGrpc.getDeleteNasJobMethod = + getDeleteNasJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteNasJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.DeleteNasJobRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new JobServiceMethodDescriptorSupplier("DeleteNasJob")) + .build(); + } + } + } + return getDeleteNasJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.CancelNasJobRequest, com.google.protobuf.Empty> + getCancelNasJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CancelNasJob", + requestType = com.google.cloud.aiplatform.v1beta1.CancelNasJobRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.CancelNasJobRequest, com.google.protobuf.Empty> + getCancelNasJobMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.CancelNasJobRequest, com.google.protobuf.Empty> + getCancelNasJobMethod; + if ((getCancelNasJobMethod = JobServiceGrpc.getCancelNasJobMethod) == null) { + synchronized (JobServiceGrpc.class) { + if ((getCancelNasJobMethod = JobServiceGrpc.getCancelNasJobMethod) == null) { + JobServiceGrpc.getCancelNasJobMethod = + getCancelNasJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CancelNasJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.CancelNasJobRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new JobServiceMethodDescriptorSupplier("CancelNasJob")) + .build(); + } + } + } + return getCancelNasJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.GetNasTrialDetailRequest, + com.google.cloud.aiplatform.v1beta1.NasTrialDetail> + getGetNasTrialDetailMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetNasTrialDetail", + requestType = com.google.cloud.aiplatform.v1beta1.GetNasTrialDetailRequest.class, + responseType = com.google.cloud.aiplatform.v1beta1.NasTrialDetail.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.GetNasTrialDetailRequest, + com.google.cloud.aiplatform.v1beta1.NasTrialDetail> + getGetNasTrialDetailMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.GetNasTrialDetailRequest, + com.google.cloud.aiplatform.v1beta1.NasTrialDetail> + getGetNasTrialDetailMethod; + if ((getGetNasTrialDetailMethod = JobServiceGrpc.getGetNasTrialDetailMethod) == null) { + synchronized (JobServiceGrpc.class) { + if ((getGetNasTrialDetailMethod = JobServiceGrpc.getGetNasTrialDetailMethod) == null) { + JobServiceGrpc.getGetNasTrialDetailMethod = + getGetNasTrialDetailMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetNasTrialDetail")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.GetNasTrialDetailRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.NasTrialDetail + .getDefaultInstance())) + .setSchemaDescriptor( + new JobServiceMethodDescriptorSupplier("GetNasTrialDetail")) + .build(); + } + } + } + return getGetNasTrialDetailMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsRequest, + com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsResponse> + getListNasTrialDetailsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListNasTrialDetails", + requestType = com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsRequest.class, + responseType = com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsRequest, + com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsResponse> + getListNasTrialDetailsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsRequest, + com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsResponse> + getListNasTrialDetailsMethod; + if ((getListNasTrialDetailsMethod = JobServiceGrpc.getListNasTrialDetailsMethod) == null) { + synchronized (JobServiceGrpc.class) { + if ((getListNasTrialDetailsMethod = JobServiceGrpc.getListNasTrialDetailsMethod) == null) { + JobServiceGrpc.getListNasTrialDetailsMethod = + getListNasTrialDetailsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListNasTrialDetails")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new JobServiceMethodDescriptorSupplier("ListNasTrialDetails")) + .build(); + } + } + } + return getListNasTrialDetailsMethod; + } + private static volatile io.grpc.MethodDescriptor< com.google.cloud.aiplatform.v1beta1.CreateBatchPredictionJobRequest, com.google.cloud.aiplatform.v1beta1.BatchPredictionJob> @@ -1751,6 +2067,118 @@ public void cancelHyperparameterTuningJob( getCancelHyperparameterTuningJobMethod(), responseObserver); } + /** + * + * + *
+     * Creates a NasJob
+     * 
+ */ + public void createNasJob( + com.google.cloud.aiplatform.v1beta1.CreateNasJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateNasJobMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets a NasJob
+     * 
+ */ + public void getNasJob( + com.google.cloud.aiplatform.v1beta1.GetNasJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetNasJobMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists NasJobs in a Location.
+     * 
+ */ + public void listNasJobs( + com.google.cloud.aiplatform.v1beta1.ListNasJobsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListNasJobsMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a NasJob.
+     * 
+ */ + public void deleteNasJob( + com.google.cloud.aiplatform.v1beta1.DeleteNasJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteNasJobMethod(), responseObserver); + } + + /** + * + * + *
+     * Cancels a NasJob.
+     * Starts asynchronous cancellation on the NasJob. The server
+     * makes a best effort to cancel the job, but success is not
+     * guaranteed. Clients can use
+     * [JobService.GetNasJob][google.cloud.aiplatform.v1beta1.JobService.GetNasJob]
+     * or other methods to check whether the cancellation succeeded or whether the
+     * job completed despite cancellation. On successful cancellation,
+     * the NasJob is not deleted; instead it becomes a job with
+     * a [NasJob.error][google.cloud.aiplatform.v1beta1.NasJob.error] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`, and
+     * [NasJob.state][google.cloud.aiplatform.v1beta1.NasJob.state] is set to
+     * `CANCELLED`.
+     * 
+ */ + public void cancelNasJob( + com.google.cloud.aiplatform.v1beta1.CancelNasJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCancelNasJobMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets a NasTrialDetail.
+     * 
+ */ + public void getNasTrialDetail( + com.google.cloud.aiplatform.v1beta1.GetNasTrialDetailRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetNasTrialDetailMethod(), responseObserver); + } + + /** + * + * + *
+     * List top NasTrialDetails of a NasJob.
+     * 
+ */ + public void listNasTrialDetails( + com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListNasTrialDetailsMethod(), responseObserver); + } + /** * * @@ -2068,6 +2496,51 @@ public final io.grpc.ServerServiceDefinition bindService() { new MethodHandlers< com.google.cloud.aiplatform.v1beta1.CancelHyperparameterTuningJobRequest, com.google.protobuf.Empty>(this, METHODID_CANCEL_HYPERPARAMETER_TUNING_JOB))) + .addMethod( + getCreateNasJobMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1beta1.CreateNasJobRequest, + com.google.cloud.aiplatform.v1beta1.NasJob>(this, METHODID_CREATE_NAS_JOB))) + .addMethod( + getGetNasJobMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1beta1.GetNasJobRequest, + com.google.cloud.aiplatform.v1beta1.NasJob>(this, METHODID_GET_NAS_JOB))) + .addMethod( + getListNasJobsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1beta1.ListNasJobsRequest, + com.google.cloud.aiplatform.v1beta1.ListNasJobsResponse>( + this, METHODID_LIST_NAS_JOBS))) + .addMethod( + getDeleteNasJobMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1beta1.DeleteNasJobRequest, + com.google.longrunning.Operation>(this, METHODID_DELETE_NAS_JOB))) + .addMethod( + getCancelNasJobMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1beta1.CancelNasJobRequest, + com.google.protobuf.Empty>(this, METHODID_CANCEL_NAS_JOB))) + .addMethod( + getGetNasTrialDetailMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1beta1.GetNasTrialDetailRequest, + com.google.cloud.aiplatform.v1beta1.NasTrialDetail>( + this, METHODID_GET_NAS_TRIAL_DETAIL))) + .addMethod( + getListNasTrialDetailsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsRequest, + com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsResponse>( + this, METHODID_LIST_NAS_TRIAL_DETAILS))) .addMethod( getCreateBatchPredictionJobMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -2459,6 +2932,131 @@ public void cancelHyperparameterTuningJob( responseObserver); } + /** + * + * + *
+     * Creates a NasJob
+     * 
+ */ + public void createNasJob( + com.google.cloud.aiplatform.v1beta1.CreateNasJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateNasJobMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a NasJob
+     * 
+ */ + public void getNasJob( + com.google.cloud.aiplatform.v1beta1.GetNasJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetNasJobMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Lists NasJobs in a Location.
+     * 
+ */ + public void listNasJobs( + com.google.cloud.aiplatform.v1beta1.ListNasJobsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListNasJobsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a NasJob.
+     * 
+ */ + public void deleteNasJob( + com.google.cloud.aiplatform.v1beta1.DeleteNasJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteNasJobMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Cancels a NasJob.
+     * Starts asynchronous cancellation on the NasJob. The server
+     * makes a best effort to cancel the job, but success is not
+     * guaranteed. Clients can use
+     * [JobService.GetNasJob][google.cloud.aiplatform.v1beta1.JobService.GetNasJob]
+     * or other methods to check whether the cancellation succeeded or whether the
+     * job completed despite cancellation. On successful cancellation,
+     * the NasJob is not deleted; instead it becomes a job with
+     * a [NasJob.error][google.cloud.aiplatform.v1beta1.NasJob.error] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`, and
+     * [NasJob.state][google.cloud.aiplatform.v1beta1.NasJob.state] is set to
+     * `CANCELLED`.
+     * 
+ */ + public void cancelNasJob( + com.google.cloud.aiplatform.v1beta1.CancelNasJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCancelNasJobMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a NasTrialDetail.
+     * 
+ */ + public void getNasTrialDetail( + com.google.cloud.aiplatform.v1beta1.GetNasTrialDetailRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetNasTrialDetailMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * List top NasTrialDetails of a NasJob.
+     * 
+ */ + public void listNasTrialDetails( + com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListNasTrialDetailsMethod(), getCallOptions()), + request, + responseObserver); + } + /** * * @@ -2943,6 +3541,109 @@ public com.google.protobuf.Empty cancelHyperparameterTuningJob( getChannel(), getCancelHyperparameterTuningJobMethod(), getCallOptions(), request); } + /** + * + * + *
+     * Creates a NasJob
+     * 
+ */ + public com.google.cloud.aiplatform.v1beta1.NasJob createNasJob( + com.google.cloud.aiplatform.v1beta1.CreateNasJobRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateNasJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a NasJob
+     * 
+ */ + public com.google.cloud.aiplatform.v1beta1.NasJob getNasJob( + com.google.cloud.aiplatform.v1beta1.GetNasJobRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetNasJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists NasJobs in a Location.
+     * 
+ */ + public com.google.cloud.aiplatform.v1beta1.ListNasJobsResponse listNasJobs( + com.google.cloud.aiplatform.v1beta1.ListNasJobsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListNasJobsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a NasJob.
+     * 
+ */ + public com.google.longrunning.Operation deleteNasJob( + com.google.cloud.aiplatform.v1beta1.DeleteNasJobRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteNasJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Cancels a NasJob.
+     * Starts asynchronous cancellation on the NasJob. The server
+     * makes a best effort to cancel the job, but success is not
+     * guaranteed. Clients can use
+     * [JobService.GetNasJob][google.cloud.aiplatform.v1beta1.JobService.GetNasJob]
+     * or other methods to check whether the cancellation succeeded or whether the
+     * job completed despite cancellation. On successful cancellation,
+     * the NasJob is not deleted; instead it becomes a job with
+     * a [NasJob.error][google.cloud.aiplatform.v1beta1.NasJob.error] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`, and
+     * [NasJob.state][google.cloud.aiplatform.v1beta1.NasJob.state] is set to
+     * `CANCELLED`.
+     * 
+ */ + public com.google.protobuf.Empty cancelNasJob( + com.google.cloud.aiplatform.v1beta1.CancelNasJobRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCancelNasJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a NasTrialDetail.
+     * 
+ */ + public com.google.cloud.aiplatform.v1beta1.NasTrialDetail getNasTrialDetail( + com.google.cloud.aiplatform.v1beta1.GetNasTrialDetailRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetNasTrialDetailMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * List top NasTrialDetails of a NasJob.
+     * 
+ */ + public com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsResponse listNasTrialDetails( + com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListNasTrialDetailsMethod(), getCallOptions(), request); + } + /** * * @@ -3400,6 +4101,115 @@ protected JobServiceFutureStub build(io.grpc.Channel channel, io.grpc.CallOption request); } + /** + * + * + *
+     * Creates a NasJob
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1beta1.NasJob> + createNasJob(com.google.cloud.aiplatform.v1beta1.CreateNasJobRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateNasJobMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets a NasJob
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1beta1.NasJob> + getNasJob(com.google.cloud.aiplatform.v1beta1.GetNasJobRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetNasJobMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists NasJobs in a Location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1beta1.ListNasJobsResponse> + listNasJobs(com.google.cloud.aiplatform.v1beta1.ListNasJobsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListNasJobsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a NasJob.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteNasJob(com.google.cloud.aiplatform.v1beta1.DeleteNasJobRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteNasJobMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Cancels a NasJob.
+     * Starts asynchronous cancellation on the NasJob. The server
+     * makes a best effort to cancel the job, but success is not
+     * guaranteed. Clients can use
+     * [JobService.GetNasJob][google.cloud.aiplatform.v1beta1.JobService.GetNasJob]
+     * or other methods to check whether the cancellation succeeded or whether the
+     * job completed despite cancellation. On successful cancellation,
+     * the NasJob is not deleted; instead it becomes a job with
+     * a [NasJob.error][google.cloud.aiplatform.v1beta1.NasJob.error] value with a
+     * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
+     * `Code.CANCELLED`, and
+     * [NasJob.state][google.cloud.aiplatform.v1beta1.NasJob.state] is set to
+     * `CANCELLED`.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + cancelNasJob(com.google.cloud.aiplatform.v1beta1.CancelNasJobRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCancelNasJobMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets a NasTrialDetail.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1beta1.NasTrialDetail> + getNasTrialDetail(com.google.cloud.aiplatform.v1beta1.GetNasTrialDetailRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetNasTrialDetailMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * List top NasTrialDetails of a NasJob.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsResponse> + listNasTrialDetails( + com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListNasTrialDetailsMethod(), getCallOptions()), request); + } + /** * * @@ -3634,19 +4444,26 @@ protected JobServiceFutureStub build(io.grpc.Channel channel, io.grpc.CallOption private static final int METHODID_LIST_HYPERPARAMETER_TUNING_JOBS = 12; private static final int METHODID_DELETE_HYPERPARAMETER_TUNING_JOB = 13; private static final int METHODID_CANCEL_HYPERPARAMETER_TUNING_JOB = 14; - private static final int METHODID_CREATE_BATCH_PREDICTION_JOB = 15; - private static final int METHODID_GET_BATCH_PREDICTION_JOB = 16; - private static final int METHODID_LIST_BATCH_PREDICTION_JOBS = 17; - private static final int METHODID_DELETE_BATCH_PREDICTION_JOB = 18; - private static final int METHODID_CANCEL_BATCH_PREDICTION_JOB = 19; - private static final int METHODID_CREATE_MODEL_DEPLOYMENT_MONITORING_JOB = 20; - private static final int METHODID_SEARCH_MODEL_DEPLOYMENT_MONITORING_STATS_ANOMALIES = 21; - private static final int METHODID_GET_MODEL_DEPLOYMENT_MONITORING_JOB = 22; - private static final int METHODID_LIST_MODEL_DEPLOYMENT_MONITORING_JOBS = 23; - private static final int METHODID_UPDATE_MODEL_DEPLOYMENT_MONITORING_JOB = 24; - private static final int METHODID_DELETE_MODEL_DEPLOYMENT_MONITORING_JOB = 25; - private static final int METHODID_PAUSE_MODEL_DEPLOYMENT_MONITORING_JOB = 26; - private static final int METHODID_RESUME_MODEL_DEPLOYMENT_MONITORING_JOB = 27; + private static final int METHODID_CREATE_NAS_JOB = 15; + private static final int METHODID_GET_NAS_JOB = 16; + private static final int METHODID_LIST_NAS_JOBS = 17; + private static final int METHODID_DELETE_NAS_JOB = 18; + private static final int METHODID_CANCEL_NAS_JOB = 19; + private static final int METHODID_GET_NAS_TRIAL_DETAIL = 20; + private static final int METHODID_LIST_NAS_TRIAL_DETAILS = 21; + private static final int METHODID_CREATE_BATCH_PREDICTION_JOB = 22; + private static final int METHODID_GET_BATCH_PREDICTION_JOB = 23; + private static final int METHODID_LIST_BATCH_PREDICTION_JOBS = 24; + private static final int METHODID_DELETE_BATCH_PREDICTION_JOB = 25; + private static final int METHODID_CANCEL_BATCH_PREDICTION_JOB = 26; + private static final int METHODID_CREATE_MODEL_DEPLOYMENT_MONITORING_JOB = 27; + private static final int METHODID_SEARCH_MODEL_DEPLOYMENT_MONITORING_STATS_ANOMALIES = 28; + private static final int METHODID_GET_MODEL_DEPLOYMENT_MONITORING_JOB = 29; + private static final int METHODID_LIST_MODEL_DEPLOYMENT_MONITORING_JOBS = 30; + private static final int METHODID_UPDATE_MODEL_DEPLOYMENT_MONITORING_JOB = 31; + private static final int METHODID_DELETE_MODEL_DEPLOYMENT_MONITORING_JOB = 32; + private static final int METHODID_PAUSE_MODEL_DEPLOYMENT_MONITORING_JOB = 33; + private static final int METHODID_RESUME_MODEL_DEPLOYMENT_MONITORING_JOB = 34; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -3754,6 +4571,47 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.cloud.aiplatform.v1beta1.CancelHyperparameterTuningJobRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_CREATE_NAS_JOB: + serviceImpl.createNasJob( + (com.google.cloud.aiplatform.v1beta1.CreateNasJobRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_NAS_JOB: + serviceImpl.getNasJob( + (com.google.cloud.aiplatform.v1beta1.GetNasJobRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_NAS_JOBS: + serviceImpl.listNasJobs( + (com.google.cloud.aiplatform.v1beta1.ListNasJobsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DELETE_NAS_JOB: + serviceImpl.deleteNasJob( + (com.google.cloud.aiplatform.v1beta1.DeleteNasJobRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CANCEL_NAS_JOB: + serviceImpl.cancelNasJob( + (com.google.cloud.aiplatform.v1beta1.CancelNasJobRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_NAS_TRIAL_DETAIL: + serviceImpl.getNasTrialDetail( + (com.google.cloud.aiplatform.v1beta1.GetNasTrialDetailRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_NAS_TRIAL_DETAILS: + serviceImpl.listNasTrialDetails( + (com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsResponse>) + responseObserver); + break; case METHODID_CREATE_BATCH_PREDICTION_JOB: serviceImpl.createBatchPredictionJob( (com.google.cloud.aiplatform.v1beta1.CreateBatchPredictionJobRequest) request, @@ -3920,6 +4778,13 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getListHyperparameterTuningJobsMethod()) .addMethod(getDeleteHyperparameterTuningJobMethod()) .addMethod(getCancelHyperparameterTuningJobMethod()) + .addMethod(getCreateNasJobMethod()) + .addMethod(getGetNasJobMethod()) + .addMethod(getListNasJobsMethod()) + .addMethod(getDeleteNasJobMethod()) + .addMethod(getCancelNasJobMethod()) + .addMethod(getGetNasTrialDetailMethod()) + .addMethod(getListNasTrialDetailsMethod()) .addMethod(getCreateBatchPredictionJobMethod()) .addMethod(getGetBatchPredictionJobMethod()) .addMethod(getListBatchPredictionJobsMethod()) diff --git a/java-aiplatform/grpc-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelServiceGrpc.java b/java-aiplatform/grpc-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelServiceGrpc.java index 1eb7250a3d8e..1cb57333d8f3 100644 --- a/java-aiplatform/grpc-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelServiceGrpc.java +++ b/java-aiplatform/grpc-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelServiceGrpc.java @@ -490,6 +490,48 @@ private ModelServiceGrpc() {} return getExportModelMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.CopyModelRequest, com.google.longrunning.Operation> + getCopyModelMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CopyModel", + requestType = com.google.cloud.aiplatform.v1beta1.CopyModelRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.CopyModelRequest, com.google.longrunning.Operation> + getCopyModelMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.aiplatform.v1beta1.CopyModelRequest, com.google.longrunning.Operation> + getCopyModelMethod; + if ((getCopyModelMethod = ModelServiceGrpc.getCopyModelMethod) == null) { + synchronized (ModelServiceGrpc.class) { + if ((getCopyModelMethod = ModelServiceGrpc.getCopyModelMethod) == null) { + ModelServiceGrpc.getCopyModelMethod = + getCopyModelMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CopyModel")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.aiplatform.v1beta1.CopyModelRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new ModelServiceMethodDescriptorSupplier("CopyModel")) + .build(); + } + } + } + return getCopyModelMethod; + } + private static volatile io.grpc.MethodDescriptor< com.google.cloud.aiplatform.v1beta1.ImportModelEvaluationRequest, com.google.cloud.aiplatform.v1beta1.ModelEvaluation> @@ -996,6 +1038,24 @@ public void exportModel( getExportModelMethod(), responseObserver); } + /** + * + * + *
+     * Copies an already existing Vertex AI Model into the specified Location.
+     * The source Model must exist in the same Project.
+     * When copying custom Models, the users themselves are responsible for
+     * [Model.metadata][google.cloud.aiplatform.v1beta1.Model.metadata] content to
+     * be region-agnostic, as well as making sure that any resources (e.g. files)
+     * it depends on remain accessible.
+     * 
+ */ + public void copyModel( + com.google.cloud.aiplatform.v1beta1.CopyModelRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCopyModelMethod(), responseObserver); + } + /** * * @@ -1155,6 +1215,12 @@ public final io.grpc.ServerServiceDefinition bindService() { new MethodHandlers< com.google.cloud.aiplatform.v1beta1.ExportModelRequest, com.google.longrunning.Operation>(this, METHODID_EXPORT_MODEL))) + .addMethod( + getCopyModelMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.aiplatform.v1beta1.CopyModelRequest, + com.google.longrunning.Operation>(this, METHODID_COPY_MODEL))) .addMethod( getImportModelEvaluationMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -1390,6 +1456,25 @@ public void exportModel( responseObserver); } + /** + * + * + *
+     * Copies an already existing Vertex AI Model into the specified Location.
+     * The source Model must exist in the same Project.
+     * When copying custom Models, the users themselves are responsible for
+     * [Model.metadata][google.cloud.aiplatform.v1beta1.Model.metadata] content to
+     * be region-agnostic, as well as making sure that any resources (e.g. files)
+     * it depends on remain accessible.
+     * 
+ */ + public void copyModel( + com.google.cloud.aiplatform.v1beta1.CopyModelRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCopyModelMethod(), getCallOptions()), request, responseObserver); + } + /** * * @@ -1658,6 +1743,24 @@ public com.google.longrunning.Operation exportModel( getChannel(), getExportModelMethod(), getCallOptions(), request); } + /** + * + * + *
+     * Copies an already existing Vertex AI Model into the specified Location.
+     * The source Model must exist in the same Project.
+     * When copying custom Models, the users themselves are responsible for
+     * [Model.metadata][google.cloud.aiplatform.v1beta1.Model.metadata] content to
+     * be region-agnostic, as well as making sure that any resources (e.g. files)
+     * it depends on remain accessible.
+     * 
+ */ + public com.google.longrunning.Operation copyModel( + com.google.cloud.aiplatform.v1beta1.CopyModelRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCopyModelMethod(), getCallOptions(), request); + } + /** * * @@ -1908,6 +2011,24 @@ protected ModelServiceFutureStub build( getChannel().newCall(getExportModelMethod(), getCallOptions()), request); } + /** + * + * + *
+     * Copies an already existing Vertex AI Model into the specified Location.
+     * The source Model must exist in the same Project.
+     * When copying custom Models, the users themselves are responsible for
+     * [Model.metadata][google.cloud.aiplatform.v1beta1.Model.metadata] content to
+     * be region-agnostic, as well as making sure that any resources (e.g. files)
+     * it depends on remain accessible.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + copyModel(com.google.cloud.aiplatform.v1beta1.CopyModelRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCopyModelMethod(), getCallOptions()), request); + } + /** * * @@ -2009,12 +2130,13 @@ protected ModelServiceFutureStub build( private static final int METHODID_DELETE_MODEL_VERSION = 7; private static final int METHODID_MERGE_VERSION_ALIASES = 8; private static final int METHODID_EXPORT_MODEL = 9; - private static final int METHODID_IMPORT_MODEL_EVALUATION = 10; - private static final int METHODID_BATCH_IMPORT_MODEL_EVALUATION_SLICES = 11; - private static final int METHODID_GET_MODEL_EVALUATION = 12; - private static final int METHODID_LIST_MODEL_EVALUATIONS = 13; - private static final int METHODID_GET_MODEL_EVALUATION_SLICE = 14; - private static final int METHODID_LIST_MODEL_EVALUATION_SLICES = 15; + private static final int METHODID_COPY_MODEL = 10; + private static final int METHODID_IMPORT_MODEL_EVALUATION = 11; + private static final int METHODID_BATCH_IMPORT_MODEL_EVALUATION_SLICES = 12; + private static final int METHODID_GET_MODEL_EVALUATION = 13; + private static final int METHODID_LIST_MODEL_EVALUATIONS = 14; + private static final int METHODID_GET_MODEL_EVALUATION_SLICE = 15; + private static final int METHODID_LIST_MODEL_EVALUATION_SLICES = 16; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -2089,6 +2211,11 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.cloud.aiplatform.v1beta1.ExportModelRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_COPY_MODEL: + serviceImpl.copyModel( + (com.google.cloud.aiplatform.v1beta1.CopyModelRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; case METHODID_IMPORT_MODEL_EVALUATION: serviceImpl.importModelEvaluation( (com.google.cloud.aiplatform.v1beta1.ImportModelEvaluationRequest) request, @@ -2203,6 +2330,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getDeleteModelVersionMethod()) .addMethod(getMergeVersionAliasesMethod()) .addMethod(getExportModelMethod()) + .addMethod(getCopyModelMethod()) .addMethod(getImportModelEvaluationMethod()) .addMethod(getBatchImportModelEvaluationSlicesMethod()) .addMethod(getGetModelEvaluationMethod()) diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CancelNasJobRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CancelNasJobRequest.java new file mode 100644 index 000000000000..55f258db9655 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CancelNasJobRequest.java @@ -0,0 +1,659 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/job_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for
+ * [JobService.CancelNasJob][google.cloud.aiplatform.v1.JobService.CancelNasJob].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CancelNasJobRequest} + */ +public final class CancelNasJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.CancelNasJobRequest) + CancelNasJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CancelNasJobRequest.newBuilder() to construct. + private CancelNasJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CancelNasJobRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CancelNasJobRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_CancelNasJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_CancelNasJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CancelNasJobRequest.class, + com.google.cloud.aiplatform.v1.CancelNasJobRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the NasJob to cancel.
+   * Format:
+   * `projects/{project}/locations/{location}/nasJobs/{nas_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 NasJob to cancel.
+   * Format:
+   * `projects/{project}/locations/{location}/nasJobs/{nas_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.CancelNasJobRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.CancelNasJobRequest other = + (com.google.cloud.aiplatform.v1.CancelNasJobRequest) 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.CancelNasJobRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CancelNasJobRequest 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.CancelNasJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CancelNasJobRequest 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.CancelNasJobRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CancelNasJobRequest 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.CancelNasJobRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CancelNasJobRequest 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.CancelNasJobRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CancelNasJobRequest 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.CancelNasJobRequest 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.CancelNasJobRequest 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.CancelNasJobRequest 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
+   * [JobService.CancelNasJob][google.cloud.aiplatform.v1.JobService.CancelNasJob].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CancelNasJobRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.CancelNasJobRequest) + com.google.cloud.aiplatform.v1.CancelNasJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_CancelNasJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_CancelNasJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CancelNasJobRequest.class, + com.google.cloud.aiplatform.v1.CancelNasJobRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.CancelNasJobRequest.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.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_CancelNasJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CancelNasJobRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.CancelNasJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CancelNasJobRequest build() { + com.google.cloud.aiplatform.v1.CancelNasJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CancelNasJobRequest buildPartial() { + com.google.cloud.aiplatform.v1.CancelNasJobRequest result = + new com.google.cloud.aiplatform.v1.CancelNasJobRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.CancelNasJobRequest 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.CancelNasJobRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.CancelNasJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.CancelNasJobRequest other) { + if (other == com.google.cloud.aiplatform.v1.CancelNasJobRequest.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 NasJob to cancel.
+     * Format:
+     * `projects/{project}/locations/{location}/nasJobs/{nas_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 NasJob to cancel.
+     * Format:
+     * `projects/{project}/locations/{location}/nasJobs/{nas_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 NasJob to cancel.
+     * Format:
+     * `projects/{project}/locations/{location}/nasJobs/{nas_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 NasJob to cancel.
+     * Format:
+     * `projects/{project}/locations/{location}/nasJobs/{nas_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 NasJob to cancel.
+     * Format:
+     * `projects/{project}/locations/{location}/nasJobs/{nas_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.CancelNasJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.CancelNasJobRequest) + private static final com.google.cloud.aiplatform.v1.CancelNasJobRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.CancelNasJobRequest(); + } + + public static com.google.cloud.aiplatform.v1.CancelNasJobRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CancelNasJobRequest 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.CancelNasJobRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CancelNasJobRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CancelNasJobRequestOrBuilder.java new file mode 100644 index 000000000000..9aa611a3c331 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CancelNasJobRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/job_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface CancelNasJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.CancelNasJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the NasJob to cancel.
+   * Format:
+   * `projects/{project}/locations/{location}/nasJobs/{nas_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 NasJob to cancel.
+   * Format:
+   * `projects/{project}/locations/{location}/nasJobs/{nas_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/CopyModelOperationMetadata.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CopyModelOperationMetadata.java new file mode 100644 index 000000000000..6996f7f026ac --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CopyModelOperationMetadata.java @@ -0,0 +1,723 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/model_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Details of
+ * [ModelService.CopyModel][google.cloud.aiplatform.v1.ModelService.CopyModel]
+ * operation.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CopyModelOperationMetadata} + */ +public final class CopyModelOperationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.CopyModelOperationMetadata) + CopyModelOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use CopyModelOperationMetadata.newBuilder() to construct. + private CopyModelOperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CopyModelOperationMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CopyModelOperationMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_CopyModelOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_CopyModelOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CopyModelOperationMetadata.class, + com.google.cloud.aiplatform.v1.CopyModelOperationMetadata.Builder.class); + } + + public static final int GENERIC_METADATA_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.GenericOperationMetadata genericMetadata_; + /** + * + * + *
+   * The common part of the operation metadata.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + @java.lang.Override + public boolean hasGenericMetadata() { + return genericMetadata_ != null; + } + /** + * + * + *
+   * The common part of the operation metadata.
+   * 
+ * + * .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 common part of the operation metadata.
+   * 
+ * + * .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 (genericMetadata_ != null) { + output.writeMessage(1, getGenericMetadata()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (genericMetadata_ != null) { + 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.CopyModelOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.CopyModelOperationMetadata other = + (com.google.cloud.aiplatform.v1.CopyModelOperationMetadata) 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.CopyModelOperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CopyModelOperationMetadata 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.CopyModelOperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CopyModelOperationMetadata 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.CopyModelOperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CopyModelOperationMetadata 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.CopyModelOperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CopyModelOperationMetadata 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.CopyModelOperationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CopyModelOperationMetadata 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.CopyModelOperationMetadata 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.CopyModelOperationMetadata 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.CopyModelOperationMetadata 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
+   * [ModelService.CopyModel][google.cloud.aiplatform.v1.ModelService.CopyModel]
+   * operation.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CopyModelOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.CopyModelOperationMetadata) + com.google.cloud.aiplatform.v1.CopyModelOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_CopyModelOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_CopyModelOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CopyModelOperationMetadata.class, + com.google.cloud.aiplatform.v1.CopyModelOperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.CopyModelOperationMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @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.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_CopyModelOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CopyModelOperationMetadata getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.CopyModelOperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CopyModelOperationMetadata build() { + com.google.cloud.aiplatform.v1.CopyModelOperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CopyModelOperationMetadata buildPartial() { + com.google.cloud.aiplatform.v1.CopyModelOperationMetadata result = + new com.google.cloud.aiplatform.v1.CopyModelOperationMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.CopyModelOperationMetadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.genericMetadata_ = + genericMetadataBuilder_ == null ? genericMetadata_ : genericMetadataBuilder_.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.CopyModelOperationMetadata) { + return mergeFrom((com.google.cloud.aiplatform.v1.CopyModelOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.CopyModelOperationMetadata other) { + if (other == com.google.cloud.aiplatform.v1.CopyModelOperationMetadata.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 common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + public boolean hasGenericMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .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 common part of the operation metadata.
+     * 
+ * + * .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 common part of the operation metadata.
+     * 
+ * + * .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 common part of the operation metadata.
+     * 
+ * + * .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); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .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 common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1.GenericOperationMetadata.Builder + getGenericMetadataBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getGenericMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .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 common part of the operation metadata.
+     * 
+ * + * .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.CopyModelOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.CopyModelOperationMetadata) + private static final com.google.cloud.aiplatform.v1.CopyModelOperationMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.CopyModelOperationMetadata(); + } + + public static com.google.cloud.aiplatform.v1.CopyModelOperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CopyModelOperationMetadata 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.CopyModelOperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CopyModelOperationMetadataOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CopyModelOperationMetadataOrBuilder.java new file mode 100644 index 000000000000..332c233b3968 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CopyModelOperationMetadataOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/model_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface CopyModelOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.CopyModelOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The common part of the operation metadata.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + boolean hasGenericMetadata(); + /** + * + * + *
+   * The common part of the operation metadata.
+   * 
+ * + * .google.cloud.aiplatform.v1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + com.google.cloud.aiplatform.v1.GenericOperationMetadata getGenericMetadata(); + /** + * + * + *
+   * The common part of the operation metadata.
+   * 
+ * + * .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/CopyModelRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CopyModelRequest.java new file mode 100644 index 000000000000..51affe693d2c --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CopyModelRequest.java @@ -0,0 +1,1750 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/model_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for
+ * [ModelService.CopyModel][google.cloud.aiplatform.v1.ModelService.CopyModel].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CopyModelRequest} + */ +public final class CopyModelRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.CopyModelRequest) + CopyModelRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CopyModelRequest.newBuilder() to construct. + private CopyModelRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CopyModelRequest() { + parent_ = ""; + sourceModel_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CopyModelRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_CopyModelRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_CopyModelRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CopyModelRequest.class, + com.google.cloud.aiplatform.v1.CopyModelRequest.Builder.class); + } + + private int destinationModelCase_ = 0; + private java.lang.Object destinationModel_; + + public enum DestinationModelCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + MODEL_ID(4), + PARENT_MODEL(5), + DESTINATIONMODEL_NOT_SET(0); + private final int value; + + private DestinationModelCase(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 DestinationModelCase valueOf(int value) { + return forNumber(value); + } + + public static DestinationModelCase forNumber(int value) { + switch (value) { + case 4: + return MODEL_ID; + case 5: + return PARENT_MODEL; + case 0: + return DESTINATIONMODEL_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public DestinationModelCase getDestinationModelCase() { + return DestinationModelCase.forNumber(destinationModelCase_); + } + + public static final int MODEL_ID_FIELD_NUMBER = 4; + /** + * + * + *
+   * Optional. Copy source_model into a new Model with this ID. The ID will
+   * become the final component of the model resource name.
+   * This value may be up to 63 characters, and valid characters are
+   * `[a-z0-9_-]`. The first character cannot be a number or hyphen.
+   * 
+ * + * string model_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the modelId field is set. + */ + public boolean hasModelId() { + return destinationModelCase_ == 4; + } + /** + * + * + *
+   * Optional. Copy source_model into a new Model with this ID. The ID will
+   * become the final component of the model resource name.
+   * This value may be up to 63 characters, and valid characters are
+   * `[a-z0-9_-]`. The first character cannot be a number or hyphen.
+   * 
+ * + * string model_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The modelId. + */ + public java.lang.String getModelId() { + java.lang.Object ref = ""; + if (destinationModelCase_ == 4) { + ref = destinationModel_; + } + 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 (destinationModelCase_ == 4) { + destinationModel_ = s; + } + return s; + } + } + /** + * + * + *
+   * Optional. Copy source_model into a new Model with this ID. The ID will
+   * become the final component of the model resource name.
+   * This value may be up to 63 characters, and valid characters are
+   * `[a-z0-9_-]`. The first character cannot be a number or hyphen.
+   * 
+ * + * string model_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for modelId. + */ + public com.google.protobuf.ByteString getModelIdBytes() { + java.lang.Object ref = ""; + if (destinationModelCase_ == 4) { + ref = destinationModel_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (destinationModelCase_ == 4) { + destinationModel_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARENT_MODEL_FIELD_NUMBER = 5; + /** + * + * + *
+   * Optional. Specify this field to copy source_model into this existing
+   * Model as a new version. Format:
+   * `projects/{project}/locations/{location}/models/{model}`
+   * 
+ * + * + * string parent_model = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return Whether the parentModel field is set. + */ + public boolean hasParentModel() { + return destinationModelCase_ == 5; + } + /** + * + * + *
+   * Optional. Specify this field to copy source_model into this existing
+   * Model as a new version. Format:
+   * `projects/{project}/locations/{location}/models/{model}`
+   * 
+ * + * + * string parent_model = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The parentModel. + */ + public java.lang.String getParentModel() { + java.lang.Object ref = ""; + if (destinationModelCase_ == 5) { + ref = destinationModel_; + } + 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 (destinationModelCase_ == 5) { + destinationModel_ = s; + } + return s; + } + } + /** + * + * + *
+   * Optional. Specify this field to copy source_model into this existing
+   * Model as a new version. Format:
+   * `projects/{project}/locations/{location}/models/{model}`
+   * 
+ * + * + * string parent_model = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parentModel. + */ + public com.google.protobuf.ByteString getParentModelBytes() { + java.lang.Object ref = ""; + if (destinationModelCase_ == 5) { + ref = destinationModel_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (destinationModelCase_ == 5) { + destinationModel_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The resource name of the Location into which to copy the Model.
+   * 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 into which to copy the Model.
+   * 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 SOURCE_MODEL_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object sourceModel_ = ""; + /** + * + * + *
+   * Required. The resource name of the Model to copy. That Model must be in the
+   * same Project. Format:
+   * `projects/{project}/locations/{location}/models/{model}`
+   * 
+ * + * + * string source_model = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The sourceModel. + */ + @java.lang.Override + public java.lang.String getSourceModel() { + java.lang.Object 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(); + sourceModel_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the Model to copy. That Model must be in the
+   * same Project. Format:
+   * `projects/{project}/locations/{location}/models/{model}`
+   * 
+ * + * + * string source_model = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for sourceModel. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceModelBytes() { + java.lang.Object ref = sourceModel_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceModel_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENCRYPTION_SPEC_FIELD_NUMBER = 3; + private com.google.cloud.aiplatform.v1.EncryptionSpec encryptionSpec_; + /** + * + * + *
+   * Customer-managed encryption key options. If this is set,
+   * then the Model copy will be encrypted with the provided encryption key.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 3; + * + * @return Whether the encryptionSpec field is set. + */ + @java.lang.Override + public boolean hasEncryptionSpec() { + return encryptionSpec_ != null; + } + /** + * + * + *
+   * Customer-managed encryption key options. If this is set,
+   * then the Model copy will be encrypted with the provided encryption key.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 3; + * + * @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_; + } + /** + * + * + *
+   * Customer-managed encryption key options. If this is set,
+   * then the Model copy will be encrypted with the provided encryption key.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 3; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder getEncryptionSpecOrBuilder() { + return encryptionSpec_ == null + ? com.google.cloud.aiplatform.v1.EncryptionSpec.getDefaultInstance() + : encryptionSpec_; + } + + 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(sourceModel_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, sourceModel_); + } + if (encryptionSpec_ != null) { + output.writeMessage(3, getEncryptionSpec()); + } + if (destinationModelCase_ == 4) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, destinationModel_); + } + if (destinationModelCase_ == 5) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, destinationModel_); + } + 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(sourceModel_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, sourceModel_); + } + if (encryptionSpec_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getEncryptionSpec()); + } + if (destinationModelCase_ == 4) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, destinationModel_); + } + if (destinationModelCase_ == 5) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, destinationModel_); + } + 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.CopyModelRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.CopyModelRequest other = + (com.google.cloud.aiplatform.v1.CopyModelRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getSourceModel().equals(other.getSourceModel())) return false; + if (hasEncryptionSpec() != other.hasEncryptionSpec()) return false; + if (hasEncryptionSpec()) { + if (!getEncryptionSpec().equals(other.getEncryptionSpec())) return false; + } + if (!getDestinationModelCase().equals(other.getDestinationModelCase())) return false; + switch (destinationModelCase_) { + case 4: + if (!getModelId().equals(other.getModelId())) return false; + break; + case 5: + if (!getParentModel().equals(other.getParentModel())) 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(); + hash = (37 * hash) + SOURCE_MODEL_FIELD_NUMBER; + hash = (53 * hash) + getSourceModel().hashCode(); + if (hasEncryptionSpec()) { + hash = (37 * hash) + ENCRYPTION_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getEncryptionSpec().hashCode(); + } + switch (destinationModelCase_) { + case 4: + hash = (37 * hash) + MODEL_ID_FIELD_NUMBER; + hash = (53 * hash) + getModelId().hashCode(); + break; + case 5: + hash = (37 * hash) + PARENT_MODEL_FIELD_NUMBER; + hash = (53 * hash) + getParentModel().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.CopyModelRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CopyModelRequest 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.CopyModelRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CopyModelRequest 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.CopyModelRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CopyModelRequest 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.CopyModelRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CopyModelRequest 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.CopyModelRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CopyModelRequest 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.CopyModelRequest 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.CopyModelRequest 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.CopyModelRequest 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
+   * [ModelService.CopyModel][google.cloud.aiplatform.v1.ModelService.CopyModel].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CopyModelRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.CopyModelRequest) + com.google.cloud.aiplatform.v1.CopyModelRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_CopyModelRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_CopyModelRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CopyModelRequest.class, + com.google.cloud.aiplatform.v1.CopyModelRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.CopyModelRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + sourceModel_ = ""; + encryptionSpec_ = null; + if (encryptionSpecBuilder_ != null) { + encryptionSpecBuilder_.dispose(); + encryptionSpecBuilder_ = null; + } + destinationModelCase_ = 0; + destinationModel_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_CopyModelRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CopyModelRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.CopyModelRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CopyModelRequest build() { + com.google.cloud.aiplatform.v1.CopyModelRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CopyModelRequest buildPartial() { + com.google.cloud.aiplatform.v1.CopyModelRequest result = + new com.google.cloud.aiplatform.v1.CopyModelRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.CopyModelRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.sourceModel_ = sourceModel_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.encryptionSpec_ = + encryptionSpecBuilder_ == null ? encryptionSpec_ : encryptionSpecBuilder_.build(); + } + } + + private void buildPartialOneofs(com.google.cloud.aiplatform.v1.CopyModelRequest result) { + result.destinationModelCase_ = destinationModelCase_; + result.destinationModel_ = this.destinationModel_; + } + + @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.CopyModelRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.CopyModelRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.CopyModelRequest other) { + if (other == com.google.cloud.aiplatform.v1.CopyModelRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getSourceModel().isEmpty()) { + sourceModel_ = other.sourceModel_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.hasEncryptionSpec()) { + mergeEncryptionSpec(other.getEncryptionSpec()); + } + switch (other.getDestinationModelCase()) { + case MODEL_ID: + { + destinationModelCase_ = 4; + destinationModel_ = other.destinationModel_; + onChanged(); + break; + } + case PARENT_MODEL: + { + destinationModelCase_ = 5; + destinationModel_ = other.destinationModel_; + onChanged(); + break; + } + case DESTINATIONMODEL_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_ |= 0x00000004; + break; + } // case 10 + case 18: + { + sourceModel_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 18 + case 26: + { + input.readMessage(getEncryptionSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + destinationModelCase_ = 4; + destinationModel_ = s; + break; + } // case 34 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + destinationModelCase_ = 5; + destinationModel_ = s; + 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 destinationModelCase_ = 0; + private java.lang.Object destinationModel_; + + public DestinationModelCase getDestinationModelCase() { + return DestinationModelCase.forNumber(destinationModelCase_); + } + + public Builder clearDestinationModel() { + destinationModelCase_ = 0; + destinationModel_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * Optional. Copy source_model into a new Model with this ID. The ID will
+     * become the final component of the model resource name.
+     * This value may be up to 63 characters, and valid characters are
+     * `[a-z0-9_-]`. The first character cannot be a number or hyphen.
+     * 
+ * + * string model_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the modelId field is set. + */ + @java.lang.Override + public boolean hasModelId() { + return destinationModelCase_ == 4; + } + /** + * + * + *
+     * Optional. Copy source_model into a new Model with this ID. The ID will
+     * become the final component of the model resource name.
+     * This value may be up to 63 characters, and valid characters are
+     * `[a-z0-9_-]`. The first character cannot be a number or hyphen.
+     * 
+ * + * string model_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The modelId. + */ + @java.lang.Override + public java.lang.String getModelId() { + java.lang.Object ref = ""; + if (destinationModelCase_ == 4) { + ref = destinationModel_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (destinationModelCase_ == 4) { + destinationModel_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Copy source_model into a new Model with this ID. The ID will
+     * become the final component of the model resource name.
+     * This value may be up to 63 characters, and valid characters are
+     * `[a-z0-9_-]`. The first character cannot be a number or hyphen.
+     * 
+ * + * string model_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for modelId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getModelIdBytes() { + java.lang.Object ref = ""; + if (destinationModelCase_ == 4) { + ref = destinationModel_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (destinationModelCase_ == 4) { + destinationModel_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Copy source_model into a new Model with this ID. The ID will
+     * become the final component of the model resource name.
+     * This value may be up to 63 characters, and valid characters are
+     * `[a-z0-9_-]`. The first character cannot be a number or hyphen.
+     * 
+ * + * string model_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The modelId to set. + * @return This builder for chaining. + */ + public Builder setModelId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + destinationModelCase_ = 4; + destinationModel_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Copy source_model into a new Model with this ID. The ID will
+     * become the final component of the model resource name.
+     * This value may be up to 63 characters, and valid characters are
+     * `[a-z0-9_-]`. The first character cannot be a number or hyphen.
+     * 
+ * + * string model_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearModelId() { + if (destinationModelCase_ == 4) { + destinationModelCase_ = 0; + destinationModel_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. Copy source_model into a new Model with this ID. The ID will
+     * become the final component of the model resource name.
+     * This value may be up to 63 characters, and valid characters are
+     * `[a-z0-9_-]`. The first character cannot be a number or hyphen.
+     * 
+ * + * string model_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for modelId to set. + * @return This builder for chaining. + */ + public Builder setModelIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + destinationModelCase_ = 4; + destinationModel_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specify this field to copy source_model into this existing
+     * Model as a new version. Format:
+     * `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * + * string parent_model = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return Whether the parentModel field is set. + */ + @java.lang.Override + public boolean hasParentModel() { + return destinationModelCase_ == 5; + } + /** + * + * + *
+     * Optional. Specify this field to copy source_model into this existing
+     * Model as a new version. Format:
+     * `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * + * string parent_model = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The parentModel. + */ + @java.lang.Override + public java.lang.String getParentModel() { + java.lang.Object ref = ""; + if (destinationModelCase_ == 5) { + ref = destinationModel_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (destinationModelCase_ == 5) { + destinationModel_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Specify this field to copy source_model into this existing
+     * Model as a new version. Format:
+     * `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * + * string parent_model = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parentModel. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentModelBytes() { + java.lang.Object ref = ""; + if (destinationModelCase_ == 5) { + ref = destinationModel_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (destinationModelCase_ == 5) { + destinationModel_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Specify this field to copy source_model into this existing
+     * Model as a new version. Format:
+     * `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * + * string parent_model = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The parentModel to set. + * @return This builder for chaining. + */ + public Builder setParentModel(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + destinationModelCase_ = 5; + destinationModel_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Specify this field to copy source_model into this existing
+     * Model as a new version. Format:
+     * `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * + * string parent_model = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParentModel() { + if (destinationModelCase_ == 5) { + destinationModelCase_ = 0; + destinationModel_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. Specify this field to copy source_model into this existing
+     * Model as a new version. Format:
+     * `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * + * string parent_model = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parentModel to set. + * @return This builder for chaining. + */ + public Builder setParentModelBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + destinationModelCase_ = 5; + destinationModel_ = value; + onChanged(); + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the Location into which to copy the Model.
+     * 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 into which to copy the Model.
+     * 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 into which to copy the Model.
+     * 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_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location into which to copy the Model.
+     * 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_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location into which to copy the Model.
+     * 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_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object sourceModel_ = ""; + /** + * + * + *
+     * Required. The resource name of the Model to copy. That Model must be in the
+     * same Project. Format:
+     * `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * + * string source_model = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The sourceModel. + */ + public java.lang.String getSourceModel() { + java.lang.Object ref = sourceModel_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceModel_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Model to copy. That Model must be in the
+     * same Project. Format:
+     * `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * + * string source_model = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for sourceModel. + */ + public com.google.protobuf.ByteString getSourceModelBytes() { + java.lang.Object ref = sourceModel_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceModel_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Model to copy. That Model must be in the
+     * same Project. Format:
+     * `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * + * string source_model = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The sourceModel to set. + * @return This builder for chaining. + */ + public Builder setSourceModel(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sourceModel_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Model to copy. That Model must be in the
+     * same Project. Format:
+     * `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * + * string source_model = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearSourceModel() { + sourceModel_ = getDefaultInstance().getSourceModel(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Model to copy. That Model must be in the
+     * same Project. Format:
+     * `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * + * string source_model = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for sourceModel to set. + * @return This builder for chaining. + */ + public Builder setSourceModelBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sourceModel_ = value; + bitField0_ |= 0x00000008; + 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_; + /** + * + * + *
+     * Customer-managed encryption key options. If this is set,
+     * then the Model copy will be encrypted with the provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 3; + * + * @return Whether the encryptionSpec field is set. + */ + public boolean hasEncryptionSpec() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Customer-managed encryption key options. If this is set,
+     * then the Model copy will be encrypted with the provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 3; + * + * @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(); + } + } + /** + * + * + *
+     * Customer-managed encryption key options. If this is set,
+     * then the Model copy will be encrypted with the provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 3; + */ + 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_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Customer-managed encryption key options. If this is set,
+     * then the Model copy will be encrypted with the provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 3; + */ + public Builder setEncryptionSpec( + com.google.cloud.aiplatform.v1.EncryptionSpec.Builder builderForValue) { + if (encryptionSpecBuilder_ == null) { + encryptionSpec_ = builderForValue.build(); + } else { + encryptionSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Customer-managed encryption key options. If this is set,
+     * then the Model copy will be encrypted with the provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 3; + */ + public Builder mergeEncryptionSpec(com.google.cloud.aiplatform.v1.EncryptionSpec value) { + if (encryptionSpecBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && encryptionSpec_ != null + && encryptionSpec_ + != com.google.cloud.aiplatform.v1.EncryptionSpec.getDefaultInstance()) { + getEncryptionSpecBuilder().mergeFrom(value); + } else { + encryptionSpec_ = value; + } + } else { + encryptionSpecBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Customer-managed encryption key options. If this is set,
+     * then the Model copy will be encrypted with the provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 3; + */ + public Builder clearEncryptionSpec() { + bitField0_ = (bitField0_ & ~0x00000010); + encryptionSpec_ = null; + if (encryptionSpecBuilder_ != null) { + encryptionSpecBuilder_.dispose(); + encryptionSpecBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Customer-managed encryption key options. If this is set,
+     * then the Model copy will be encrypted with the provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 3; + */ + public com.google.cloud.aiplatform.v1.EncryptionSpec.Builder getEncryptionSpecBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getEncryptionSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Customer-managed encryption key options. If this is set,
+     * then the Model copy will be encrypted with the provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 3; + */ + 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_; + } + } + /** + * + * + *
+     * Customer-managed encryption key options. If this is set,
+     * then the Model copy will be encrypted with the provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 3; + */ + 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_; + } + + @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.CopyModelRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.CopyModelRequest) + private static final com.google.cloud.aiplatform.v1.CopyModelRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.CopyModelRequest(); + } + + public static com.google.cloud.aiplatform.v1.CopyModelRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CopyModelRequest 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.CopyModelRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CopyModelRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CopyModelRequestOrBuilder.java new file mode 100644 index 000000000000..4e031d93d7a3 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CopyModelRequestOrBuilder.java @@ -0,0 +1,225 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/model_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface CopyModelRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.CopyModelRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Copy source_model into a new Model with this ID. The ID will
+   * become the final component of the model resource name.
+   * This value may be up to 63 characters, and valid characters are
+   * `[a-z0-9_-]`. The first character cannot be a number or hyphen.
+   * 
+ * + * string model_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the modelId field is set. + */ + boolean hasModelId(); + /** + * + * + *
+   * Optional. Copy source_model into a new Model with this ID. The ID will
+   * become the final component of the model resource name.
+   * This value may be up to 63 characters, and valid characters are
+   * `[a-z0-9_-]`. The first character cannot be a number or hyphen.
+   * 
+ * + * string model_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The modelId. + */ + java.lang.String getModelId(); + /** + * + * + *
+   * Optional. Copy source_model into a new Model with this ID. The ID will
+   * become the final component of the model resource name.
+   * This value may be up to 63 characters, and valid characters are
+   * `[a-z0-9_-]`. The first character cannot be a number or hyphen.
+   * 
+ * + * string model_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for modelId. + */ + com.google.protobuf.ByteString getModelIdBytes(); + + /** + * + * + *
+   * Optional. Specify this field to copy source_model into this existing
+   * Model as a new version. Format:
+   * `projects/{project}/locations/{location}/models/{model}`
+   * 
+ * + * + * string parent_model = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return Whether the parentModel field is set. + */ + boolean hasParentModel(); + /** + * + * + *
+   * Optional. Specify this field to copy source_model into this existing
+   * Model as a new version. Format:
+   * `projects/{project}/locations/{location}/models/{model}`
+   * 
+ * + * + * string parent_model = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The parentModel. + */ + java.lang.String getParentModel(); + /** + * + * + *
+   * Optional. Specify this field to copy source_model into this existing
+   * Model as a new version. Format:
+   * `projects/{project}/locations/{location}/models/{model}`
+   * 
+ * + * + * string parent_model = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parentModel. + */ + com.google.protobuf.ByteString getParentModelBytes(); + + /** + * + * + *
+   * Required. The resource name of the Location into which to copy the Model.
+   * 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 into which to copy the Model.
+   * 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 Model to copy. That Model must be in the
+   * same Project. Format:
+   * `projects/{project}/locations/{location}/models/{model}`
+   * 
+ * + * + * string source_model = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The sourceModel. + */ + java.lang.String getSourceModel(); + /** + * + * + *
+   * Required. The resource name of the Model to copy. That Model must be in the
+   * same Project. Format:
+   * `projects/{project}/locations/{location}/models/{model}`
+   * 
+ * + * + * string source_model = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for sourceModel. + */ + com.google.protobuf.ByteString getSourceModelBytes(); + + /** + * + * + *
+   * Customer-managed encryption key options. If this is set,
+   * then the Model copy will be encrypted with the provided encryption key.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 3; + * + * @return Whether the encryptionSpec field is set. + */ + boolean hasEncryptionSpec(); + /** + * + * + *
+   * Customer-managed encryption key options. If this is set,
+   * then the Model copy will be encrypted with the provided encryption key.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 3; + * + * @return The encryptionSpec. + */ + com.google.cloud.aiplatform.v1.EncryptionSpec getEncryptionSpec(); + /** + * + * + *
+   * Customer-managed encryption key options. If this is set,
+   * then the Model copy will be encrypted with the provided encryption key.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 3; + */ + com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder getEncryptionSpecOrBuilder(); + + public com.google.cloud.aiplatform.v1.CopyModelRequest.DestinationModelCase + getDestinationModelCase(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CopyModelResponse.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CopyModelResponse.java new file mode 100644 index 000000000000..c05f1bc9844c --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CopyModelResponse.java @@ -0,0 +1,822 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/model_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Response message of
+ * [ModelService.CopyModel][google.cloud.aiplatform.v1.ModelService.CopyModel]
+ * operation.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CopyModelResponse} + */ +public final class CopyModelResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.CopyModelResponse) + CopyModelResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use CopyModelResponse.newBuilder() to construct. + private CopyModelResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CopyModelResponse() { + model_ = ""; + modelVersionId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CopyModelResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_CopyModelResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_CopyModelResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CopyModelResponse.class, + com.google.cloud.aiplatform.v1.CopyModelResponse.Builder.class); + } + + public static final int MODEL_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object model_ = ""; + /** + * + * + *
+   * The name of the copied Model resource.
+   * Format: `projects/{project}/locations/{location}/models/{model}`
+   * 
+ * + * string model = 1 [(.google.api.resource_reference) = { ... } + * + * @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 name of the copied Model resource.
+   * Format: `projects/{project}/locations/{location}/models/{model}`
+   * 
+ * + * string model = 1 [(.google.api.resource_reference) = { ... } + * + * @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 MODEL_VERSION_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object modelVersionId_ = ""; + /** + * + * + *
+   * Output only. The version ID of the model that is copied.
+   * 
+ * + * string model_version_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The modelVersionId. + */ + @java.lang.Override + public java.lang.String getModelVersionId() { + java.lang.Object ref = modelVersionId_; + 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(); + modelVersionId_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The version ID of the model that is copied.
+   * 
+ * + * string model_version_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for modelVersionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getModelVersionIdBytes() { + java.lang.Object ref = modelVersionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + modelVersionId_ = 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(model_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, model_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(modelVersionId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, modelVersionId_); + } + 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(model_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, model_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(modelVersionId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, modelVersionId_); + } + 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.CopyModelResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.CopyModelResponse other = + (com.google.cloud.aiplatform.v1.CopyModelResponse) obj; + + if (!getModel().equals(other.getModel())) return false; + if (!getModelVersionId().equals(other.getModelVersionId())) 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) + MODEL_FIELD_NUMBER; + hash = (53 * hash) + getModel().hashCode(); + hash = (37 * hash) + MODEL_VERSION_ID_FIELD_NUMBER; + hash = (53 * hash) + getModelVersionId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.CopyModelResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CopyModelResponse 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.CopyModelResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CopyModelResponse 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.CopyModelResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CopyModelResponse 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.CopyModelResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CopyModelResponse 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.CopyModelResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CopyModelResponse 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.CopyModelResponse 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.CopyModelResponse 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.CopyModelResponse 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 of
+   * [ModelService.CopyModel][google.cloud.aiplatform.v1.ModelService.CopyModel]
+   * operation.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CopyModelResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.CopyModelResponse) + com.google.cloud.aiplatform.v1.CopyModelResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_CopyModelResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_CopyModelResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CopyModelResponse.class, + com.google.cloud.aiplatform.v1.CopyModelResponse.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.CopyModelResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + model_ = ""; + modelVersionId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1_CopyModelResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CopyModelResponse getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.CopyModelResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CopyModelResponse build() { + com.google.cloud.aiplatform.v1.CopyModelResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CopyModelResponse buildPartial() { + com.google.cloud.aiplatform.v1.CopyModelResponse result = + new com.google.cloud.aiplatform.v1.CopyModelResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.CopyModelResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.model_ = model_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.modelVersionId_ = modelVersionId_; + } + } + + @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.CopyModelResponse) { + return mergeFrom((com.google.cloud.aiplatform.v1.CopyModelResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.CopyModelResponse other) { + if (other == com.google.cloud.aiplatform.v1.CopyModelResponse.getDefaultInstance()) + return this; + if (!other.getModel().isEmpty()) { + model_ = other.model_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getModelVersionId().isEmpty()) { + modelVersionId_ = other.modelVersionId_; + 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: + { + model_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + modelVersionId_ = 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 model_ = ""; + /** + * + * + *
+     * The name of the copied Model resource.
+     * Format: `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * string model = 1 [(.google.api.resource_reference) = { ... } + * + * @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 name of the copied Model resource.
+     * Format: `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * string model = 1 [(.google.api.resource_reference) = { ... } + * + * @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 name of the copied Model resource.
+     * Format: `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * string model = 1 [(.google.api.resource_reference) = { ... } + * + * @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_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the copied Model resource.
+     * Format: `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * string model = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearModel() { + model_ = getDefaultInstance().getModel(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the copied Model resource.
+     * Format: `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * string model = 1 [(.google.api.resource_reference) = { ... } + * + * @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_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object modelVersionId_ = ""; + /** + * + * + *
+     * Output only. The version ID of the model that is copied.
+     * 
+ * + * string model_version_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The modelVersionId. + */ + public java.lang.String getModelVersionId() { + java.lang.Object ref = modelVersionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + modelVersionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The version ID of the model that is copied.
+     * 
+ * + * string model_version_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for modelVersionId. + */ + public com.google.protobuf.ByteString getModelVersionIdBytes() { + java.lang.Object ref = modelVersionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + modelVersionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The version ID of the model that is copied.
+     * 
+ * + * string model_version_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The modelVersionId to set. + * @return This builder for chaining. + */ + public Builder setModelVersionId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + modelVersionId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The version ID of the model that is copied.
+     * 
+ * + * string model_version_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearModelVersionId() { + modelVersionId_ = getDefaultInstance().getModelVersionId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The version ID of the model that is copied.
+     * 
+ * + * string model_version_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for modelVersionId to set. + * @return This builder for chaining. + */ + public Builder setModelVersionIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + modelVersionId_ = 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.CopyModelResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.CopyModelResponse) + private static final com.google.cloud.aiplatform.v1.CopyModelResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.CopyModelResponse(); + } + + public static com.google.cloud.aiplatform.v1.CopyModelResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CopyModelResponse 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.CopyModelResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CopyModelResponseOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CopyModelResponseOrBuilder.java new file mode 100644 index 000000000000..b26ebc806c83 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CopyModelResponseOrBuilder.java @@ -0,0 +1,77 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/model_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface CopyModelResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.CopyModelResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The name of the copied Model resource.
+   * Format: `projects/{project}/locations/{location}/models/{model}`
+   * 
+ * + * string model = 1 [(.google.api.resource_reference) = { ... } + * + * @return The model. + */ + java.lang.String getModel(); + /** + * + * + *
+   * The name of the copied Model resource.
+   * Format: `projects/{project}/locations/{location}/models/{model}`
+   * 
+ * + * string model = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for model. + */ + com.google.protobuf.ByteString getModelBytes(); + + /** + * + * + *
+   * Output only. The version ID of the model that is copied.
+   * 
+ * + * string model_version_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The modelVersionId. + */ + java.lang.String getModelVersionId(); + /** + * + * + *
+   * Output only. The version ID of the model that is copied.
+   * 
+ * + * string model_version_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for modelVersionId. + */ + com.google.protobuf.ByteString getModelVersionIdBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateNasJobRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateNasJobRequest.java new file mode 100644 index 000000000000..69aac420265f --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateNasJobRequest.java @@ -0,0 +1,933 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/job_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for
+ * [JobService.CreateNasJob][google.cloud.aiplatform.v1.JobService.CreateNasJob].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CreateNasJobRequest} + */ +public final class CreateNasJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.CreateNasJobRequest) + CreateNasJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateNasJobRequest.newBuilder() to construct. + private CreateNasJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateNasJobRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateNasJobRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateNasJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateNasJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CreateNasJobRequest.class, + com.google.cloud.aiplatform.v1.CreateNasJobRequest.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 create the NasJob 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 NasJob 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 NAS_JOB_FIELD_NUMBER = 2; + private com.google.cloud.aiplatform.v1.NasJob nasJob_; + /** + * + * + *
+   * Required. The NasJob to create.
+   * 
+ * + * .google.cloud.aiplatform.v1.NasJob nas_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the nasJob field is set. + */ + @java.lang.Override + public boolean hasNasJob() { + return nasJob_ != null; + } + /** + * + * + *
+   * Required. The NasJob to create.
+   * 
+ * + * .google.cloud.aiplatform.v1.NasJob nas_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The nasJob. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasJob getNasJob() { + return nasJob_ == null ? com.google.cloud.aiplatform.v1.NasJob.getDefaultInstance() : nasJob_; + } + /** + * + * + *
+   * Required. The NasJob to create.
+   * 
+ * + * .google.cloud.aiplatform.v1.NasJob nas_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasJobOrBuilder getNasJobOrBuilder() { + return nasJob_ == null ? com.google.cloud.aiplatform.v1.NasJob.getDefaultInstance() : nasJob_; + } + + 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 (nasJob_ != null) { + output.writeMessage(2, getNasJob()); + } + 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 (nasJob_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getNasJob()); + } + 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.CreateNasJobRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.CreateNasJobRequest other = + (com.google.cloud.aiplatform.v1.CreateNasJobRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasNasJob() != other.hasNasJob()) return false; + if (hasNasJob()) { + if (!getNasJob().equals(other.getNasJob())) 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 (hasNasJob()) { + hash = (37 * hash) + NAS_JOB_FIELD_NUMBER; + hash = (53 * hash) + getNasJob().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.CreateNasJobRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateNasJobRequest 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.CreateNasJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateNasJobRequest 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.CreateNasJobRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.CreateNasJobRequest 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.CreateNasJobRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateNasJobRequest 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.CreateNasJobRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.CreateNasJobRequest 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.CreateNasJobRequest 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.CreateNasJobRequest 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.CreateNasJobRequest 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
+   * [JobService.CreateNasJob][google.cloud.aiplatform.v1.JobService.CreateNasJob].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.CreateNasJobRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.CreateNasJobRequest) + com.google.cloud.aiplatform.v1.CreateNasJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateNasJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateNasJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.CreateNasJobRequest.class, + com.google.cloud.aiplatform.v1.CreateNasJobRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.CreateNasJobRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + nasJob_ = null; + if (nasJobBuilder_ != null) { + nasJobBuilder_.dispose(); + nasJobBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_CreateNasJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateNasJobRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.CreateNasJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateNasJobRequest build() { + com.google.cloud.aiplatform.v1.CreateNasJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.CreateNasJobRequest buildPartial() { + com.google.cloud.aiplatform.v1.CreateNasJobRequest result = + new com.google.cloud.aiplatform.v1.CreateNasJobRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.CreateNasJobRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nasJob_ = nasJobBuilder_ == null ? nasJob_ : nasJobBuilder_.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.CreateNasJobRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.CreateNasJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.CreateNasJobRequest other) { + if (other == com.google.cloud.aiplatform.v1.CreateNasJobRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasNasJob()) { + mergeNasJob(other.getNasJob()); + } + 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(getNasJobFieldBuilder().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 NasJob 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 NasJob 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 NasJob 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 NasJob 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 NasJob 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.NasJob nasJob_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.NasJob, + com.google.cloud.aiplatform.v1.NasJob.Builder, + com.google.cloud.aiplatform.v1.NasJobOrBuilder> + nasJobBuilder_; + /** + * + * + *
+     * Required. The NasJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJob nas_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the nasJob field is set. + */ + public boolean hasNasJob() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The NasJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJob nas_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The nasJob. + */ + public com.google.cloud.aiplatform.v1.NasJob getNasJob() { + if (nasJobBuilder_ == null) { + return nasJob_ == null + ? com.google.cloud.aiplatform.v1.NasJob.getDefaultInstance() + : nasJob_; + } else { + return nasJobBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The NasJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJob nas_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setNasJob(com.google.cloud.aiplatform.v1.NasJob value) { + if (nasJobBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + nasJob_ = value; + } else { + nasJobBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The NasJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJob nas_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setNasJob(com.google.cloud.aiplatform.v1.NasJob.Builder builderForValue) { + if (nasJobBuilder_ == null) { + nasJob_ = builderForValue.build(); + } else { + nasJobBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The NasJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJob nas_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeNasJob(com.google.cloud.aiplatform.v1.NasJob value) { + if (nasJobBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && nasJob_ != null + && nasJob_ != com.google.cloud.aiplatform.v1.NasJob.getDefaultInstance()) { + getNasJobBuilder().mergeFrom(value); + } else { + nasJob_ = value; + } + } else { + nasJobBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The NasJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJob nas_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearNasJob() { + bitField0_ = (bitField0_ & ~0x00000002); + nasJob_ = null; + if (nasJobBuilder_ != null) { + nasJobBuilder_.dispose(); + nasJobBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The NasJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJob nas_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.NasJob.Builder getNasJobBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getNasJobFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The NasJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJob nas_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.NasJobOrBuilder getNasJobOrBuilder() { + if (nasJobBuilder_ != null) { + return nasJobBuilder_.getMessageOrBuilder(); + } else { + return nasJob_ == null + ? com.google.cloud.aiplatform.v1.NasJob.getDefaultInstance() + : nasJob_; + } + } + /** + * + * + *
+     * Required. The NasJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJob nas_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.NasJob, + com.google.cloud.aiplatform.v1.NasJob.Builder, + com.google.cloud.aiplatform.v1.NasJobOrBuilder> + getNasJobFieldBuilder() { + if (nasJobBuilder_ == null) { + nasJobBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.NasJob, + com.google.cloud.aiplatform.v1.NasJob.Builder, + com.google.cloud.aiplatform.v1.NasJobOrBuilder>( + getNasJob(), getParentForChildren(), isClean()); + nasJob_ = null; + } + return nasJobBuilder_; + } + + @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.CreateNasJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.CreateNasJobRequest) + private static final com.google.cloud.aiplatform.v1.CreateNasJobRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.CreateNasJobRequest(); + } + + public static com.google.cloud.aiplatform.v1.CreateNasJobRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateNasJobRequest 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.CreateNasJobRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateNasJobRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateNasJobRequestOrBuilder.java new file mode 100644 index 000000000000..46c934b2865f --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/CreateNasJobRequestOrBuilder.java @@ -0,0 +1,94 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/job_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface CreateNasJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.CreateNasJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the Location to create the NasJob 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 NasJob 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 NasJob to create.
+   * 
+ * + * .google.cloud.aiplatform.v1.NasJob nas_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the nasJob field is set. + */ + boolean hasNasJob(); + /** + * + * + *
+   * Required. The NasJob to create.
+   * 
+ * + * .google.cloud.aiplatform.v1.NasJob nas_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The nasJob. + */ + com.google.cloud.aiplatform.v1.NasJob getNasJob(); + /** + * + * + *
+   * Required. The NasJob to create.
+   * 
+ * + * .google.cloud.aiplatform.v1.NasJob nas_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.NasJobOrBuilder getNasJobOrBuilder(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteNasJobRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteNasJobRequest.java new file mode 100644 index 000000000000..147cd2ef2e10 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteNasJobRequest.java @@ -0,0 +1,659 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/job_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for
+ * [JobService.DeleteNasJob][google.cloud.aiplatform.v1.JobService.DeleteNasJob].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.DeleteNasJobRequest} + */ +public final class DeleteNasJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.DeleteNasJobRequest) + DeleteNasJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteNasJobRequest.newBuilder() to construct. + private DeleteNasJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteNasJobRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteNasJobRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteNasJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteNasJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.DeleteNasJobRequest.class, + com.google.cloud.aiplatform.v1.DeleteNasJobRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the NasJob resource to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/nasJobs/{nas_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 NasJob resource to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/nasJobs/{nas_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.DeleteNasJobRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.DeleteNasJobRequest other = + (com.google.cloud.aiplatform.v1.DeleteNasJobRequest) 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.DeleteNasJobRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeleteNasJobRequest 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.DeleteNasJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeleteNasJobRequest 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.DeleteNasJobRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.DeleteNasJobRequest 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.DeleteNasJobRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeleteNasJobRequest 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.DeleteNasJobRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.DeleteNasJobRequest 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.DeleteNasJobRequest 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.DeleteNasJobRequest 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.DeleteNasJobRequest 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
+   * [JobService.DeleteNasJob][google.cloud.aiplatform.v1.JobService.DeleteNasJob].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.DeleteNasJobRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.DeleteNasJobRequest) + com.google.cloud.aiplatform.v1.DeleteNasJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteNasJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteNasJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.DeleteNasJobRequest.class, + com.google.cloud.aiplatform.v1.DeleteNasJobRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.DeleteNasJobRequest.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.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_DeleteNasJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeleteNasJobRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.DeleteNasJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeleteNasJobRequest build() { + com.google.cloud.aiplatform.v1.DeleteNasJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.DeleteNasJobRequest buildPartial() { + com.google.cloud.aiplatform.v1.DeleteNasJobRequest result = + new com.google.cloud.aiplatform.v1.DeleteNasJobRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.DeleteNasJobRequest 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.DeleteNasJobRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.DeleteNasJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.DeleteNasJobRequest other) { + if (other == com.google.cloud.aiplatform.v1.DeleteNasJobRequest.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 NasJob resource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/nasJobs/{nas_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 NasJob resource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/nasJobs/{nas_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 NasJob resource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/nasJobs/{nas_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 NasJob resource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/nasJobs/{nas_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 NasJob resource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/nasJobs/{nas_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.DeleteNasJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.DeleteNasJobRequest) + private static final com.google.cloud.aiplatform.v1.DeleteNasJobRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.DeleteNasJobRequest(); + } + + public static com.google.cloud.aiplatform.v1.DeleteNasJobRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteNasJobRequest 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.DeleteNasJobRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteNasJobRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteNasJobRequestOrBuilder.java new file mode 100644 index 000000000000..aeb53e785836 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeleteNasJobRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/job_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface DeleteNasJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.DeleteNasJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the NasJob resource to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/nasJobs/{nas_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 NasJob resource to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/nasJobs/{nas_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/DeployedIndex.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployedIndex.java index 64568deb36c9..fa26696f314a 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployedIndex.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployedIndex.java @@ -542,9 +542,9 @@ public com.google.cloud.aiplatform.v1.AutomaticResources getAutomaticResources() * Available machine types for MEDIUM shard: * e2-standard-16 and all machine types available for LARGE shard. * Available machine types for LARGE shard: - * e2-standard-32, e2-highmem-16, n2d-standard-32. + * e2-highmem-16, n2d-standard-32. * n1-standard-16 and n1-standard-32 are still available, but we recommend - * e2-standard-16 and e2-standard-32 for cost efficiency. + * e2-standard-16 and e2-highmem-16 for cost efficiency. * * * @@ -571,9 +571,9 @@ public boolean hasDedicatedResources() { * Available machine types for MEDIUM shard: * e2-standard-16 and all machine types available for LARGE shard. * Available machine types for LARGE shard: - * e2-standard-32, e2-highmem-16, n2d-standard-32. + * e2-highmem-16, n2d-standard-32. * n1-standard-16 and n1-standard-32 are still available, but we recommend - * e2-standard-16 and e2-standard-32 for cost efficiency. + * e2-standard-16 and e2-highmem-16 for cost efficiency. * * * @@ -602,9 +602,9 @@ public com.google.cloud.aiplatform.v1.DedicatedResources getDedicatedResources() * Available machine types for MEDIUM shard: * e2-standard-16 and all machine types available for LARGE shard. * Available machine types for LARGE shard: - * e2-standard-32, e2-highmem-16, n2d-standard-32. + * e2-highmem-16, n2d-standard-32. * n1-standard-16 and n1-standard-32 are still available, but we recommend - * e2-standard-16 and e2-standard-32 for cost efficiency. + * e2-standard-16 and e2-highmem-16 for cost efficiency. * * * @@ -2935,9 +2935,9 @@ public Builder clearAutomaticResources() { * Available machine types for MEDIUM shard: * e2-standard-16 and all machine types available for LARGE shard. * Available machine types for LARGE shard: - * e2-standard-32, e2-highmem-16, n2d-standard-32. + * e2-highmem-16, n2d-standard-32. * n1-standard-16 and n1-standard-32 are still available, but we recommend - * e2-standard-16 and e2-standard-32 for cost efficiency. + * e2-standard-16 and e2-highmem-16 for cost efficiency. * * * @@ -2963,9 +2963,9 @@ public boolean hasDedicatedResources() { * Available machine types for MEDIUM shard: * e2-standard-16 and all machine types available for LARGE shard. * Available machine types for LARGE shard: - * e2-standard-32, e2-highmem-16, n2d-standard-32. + * e2-highmem-16, n2d-standard-32. * n1-standard-16 and n1-standard-32 are still available, but we recommend - * e2-standard-16 and e2-standard-32 for cost efficiency. + * e2-standard-16 and e2-highmem-16 for cost efficiency. * * * @@ -2997,9 +2997,9 @@ public com.google.cloud.aiplatform.v1.DedicatedResources getDedicatedResources() * Available machine types for MEDIUM shard: * e2-standard-16 and all machine types available for LARGE shard. * Available machine types for LARGE shard: - * e2-standard-32, e2-highmem-16, n2d-standard-32. + * e2-highmem-16, n2d-standard-32. * n1-standard-16 and n1-standard-32 are still available, but we recommend - * e2-standard-16 and e2-standard-32 for cost efficiency. + * e2-standard-16 and e2-highmem-16 for cost efficiency. * * * @@ -3033,9 +3033,9 @@ public Builder setDedicatedResources(com.google.cloud.aiplatform.v1.DedicatedRes * Available machine types for MEDIUM shard: * e2-standard-16 and all machine types available for LARGE shard. * Available machine types for LARGE shard: - * e2-standard-32, e2-highmem-16, n2d-standard-32. + * e2-highmem-16, n2d-standard-32. * n1-standard-16 and n1-standard-32 are still available, but we recommend - * e2-standard-16 and e2-standard-32 for cost efficiency. + * e2-standard-16 and e2-highmem-16 for cost efficiency. * * * @@ -3067,9 +3067,9 @@ public Builder setDedicatedResources( * Available machine types for MEDIUM shard: * e2-standard-16 and all machine types available for LARGE shard. * Available machine types for LARGE shard: - * e2-standard-32, e2-highmem-16, n2d-standard-32. + * e2-highmem-16, n2d-standard-32. * n1-standard-16 and n1-standard-32 are still available, but we recommend - * e2-standard-16 and e2-standard-32 for cost efficiency. + * e2-standard-16 and e2-highmem-16 for cost efficiency. * * * @@ -3108,9 +3108,9 @@ public Builder mergeDedicatedResources( * Available machine types for MEDIUM shard: * e2-standard-16 and all machine types available for LARGE shard. * Available machine types for LARGE shard: - * e2-standard-32, e2-highmem-16, n2d-standard-32. + * e2-highmem-16, n2d-standard-32. * n1-standard-16 and n1-standard-32 are still available, but we recommend - * e2-standard-16 and e2-standard-32 for cost efficiency. + * e2-standard-16 and e2-highmem-16 for cost efficiency. * * * @@ -3141,9 +3141,9 @@ public Builder clearDedicatedResources() { * Available machine types for MEDIUM shard: * e2-standard-16 and all machine types available for LARGE shard. * Available machine types for LARGE shard: - * e2-standard-32, e2-highmem-16, n2d-standard-32. + * e2-highmem-16, n2d-standard-32. * n1-standard-16 and n1-standard-32 are still available, but we recommend - * e2-standard-16 and e2-standard-32 for cost efficiency. + * e2-standard-16 and e2-highmem-16 for cost efficiency. * * * @@ -3170,9 +3170,9 @@ public Builder clearDedicatedResources() { * Available machine types for MEDIUM shard: * e2-standard-16 and all machine types available for LARGE shard. * Available machine types for LARGE shard: - * e2-standard-32, e2-highmem-16, n2d-standard-32. + * e2-highmem-16, n2d-standard-32. * n1-standard-16 and n1-standard-32 are still available, but we recommend - * e2-standard-16 and e2-standard-32 for cost efficiency. + * e2-standard-16 and e2-highmem-16 for cost efficiency. * * * @@ -3203,9 +3203,9 @@ public Builder clearDedicatedResources() { * Available machine types for MEDIUM shard: * e2-standard-16 and all machine types available for LARGE shard. * Available machine types for LARGE shard: - * e2-standard-32, e2-highmem-16, n2d-standard-32. + * e2-highmem-16, n2d-standard-32. * n1-standard-16 and n1-standard-32 are still available, but we recommend - * e2-standard-16 and e2-standard-32 for cost efficiency. + * e2-standard-16 and e2-highmem-16 for cost efficiency. * * * diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployedIndexOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployedIndexOrBuilder.java index f3b6d45ca45f..93c38fa1c848 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployedIndexOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/DeployedIndexOrBuilder.java @@ -356,9 +356,9 @@ public interface DeployedIndexOrBuilder * Available machine types for MEDIUM shard: * e2-standard-16 and all machine types available for LARGE shard. * Available machine types for LARGE shard: - * e2-standard-32, e2-highmem-16, n2d-standard-32. + * e2-highmem-16, n2d-standard-32. * n1-standard-16 and n1-standard-32 are still available, but we recommend - * e2-standard-16 and e2-standard-32 for cost efficiency. + * e2-standard-16 and e2-highmem-16 for cost efficiency. * * * @@ -382,9 +382,9 @@ public interface DeployedIndexOrBuilder * Available machine types for MEDIUM shard: * e2-standard-16 and all machine types available for LARGE shard. * Available machine types for LARGE shard: - * e2-standard-32, e2-highmem-16, n2d-standard-32. + * e2-highmem-16, n2d-standard-32. * n1-standard-16 and n1-standard-32 are still available, but we recommend - * e2-standard-16 and e2-standard-32 for cost efficiency. + * e2-standard-16 and e2-highmem-16 for cost efficiency. * * * @@ -408,9 +408,9 @@ public interface DeployedIndexOrBuilder * Available machine types for MEDIUM shard: * e2-standard-16 and all machine types available for LARGE shard. * Available machine types for LARGE shard: - * e2-standard-32, e2-highmem-16, n2d-standard-32. + * e2-highmem-16, n2d-standard-32. * n1-standard-16 and n1-standard-32 are still available, but we recommend - * e2-standard-16 and e2-standard-32 for cost efficiency. + * e2-standard-16 and e2-highmem-16 for cost efficiency. * * * 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 3317b2a63c1a..117e43a98b18 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 @@ -684,6 +684,8 @@ public boolean getDisableContainerLogging() { * * *
+   * If true, online prediction access logs are sent to StackDriver
+   * Logging.
    * These logs are like standard server access logs, containing
    * information like timestamp and latency for each prediction request.
    * Note that Stackdriver logs may incur a cost, especially if your project
@@ -3087,6 +3089,8 @@ public Builder clearDisableContainerLogging() {
      *
      *
      * 
+     * If true, online prediction access logs are sent to StackDriver
+     * Logging.
      * These logs are like standard server access logs, containing
      * information like timestamp and latency for each prediction request.
      * Note that Stackdriver logs may incur a cost, especially if your project
@@ -3106,6 +3110,8 @@ public boolean getEnableAccessLogging() {
      *
      *
      * 
+     * If true, online prediction access logs are sent to StackDriver
+     * Logging.
      * These logs are like standard server access logs, containing
      * information like timestamp and latency for each prediction request.
      * Note that Stackdriver logs may incur a cost, especially if your project
@@ -3129,6 +3135,8 @@ public Builder setEnableAccessLogging(boolean value) {
      *
      *
      * 
+     * If true, online prediction access logs are sent to StackDriver
+     * Logging.
      * These logs are like standard server access logs, containing
      * information like timestamp and latency for each prediction request.
      * Note that Stackdriver logs may incur a cost, especially if your project
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 d8f5298d7dd4..c85bf4bb144f 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
@@ -392,6 +392,8 @@ public interface DeployedModelOrBuilder
    *
    *
    * 
+   * If true, online prediction access logs are sent to StackDriver
+   * Logging.
    * These logs are like standard server access logs, containing
    * information like timestamp and latency for each prediction request.
    * Note that Stackdriver logs may incur a cost, especially if your project
diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Endpoint.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Endpoint.java
index d40659f35df2..b3e3a4b1cace 100644
--- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Endpoint.java
+++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Endpoint.java
@@ -805,7 +805,7 @@ public com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder getEncryptionSpecO
    *
    *
    * 
-   * The full name of the Google Compute Engine
+   * Optional. The full name of the Google Compute Engine
    * [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks)
    * to which the Endpoint should be peered.
    * Private services access must already be configured for the network. If left
@@ -820,7 +820,9 @@ public com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder getEncryptionSpecO
    * network name.
    * 
* - * string network = 13 [(.google.api.resource_reference) = { ... } + * + * string network = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The network. */ @@ -840,7 +842,7 @@ public java.lang.String getNetwork() { * * *
-   * The full name of the Google Compute Engine
+   * Optional. The full name of the Google Compute Engine
    * [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks)
    * to which the Endpoint should be peered.
    * Private services access must already be configured for the network. If left
@@ -855,7 +857,9 @@ public java.lang.String getNetwork() {
    * network name.
    * 
* - * string network = 13 [(.google.api.resource_reference) = { ... } + * + * string network = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The bytes for network. */ @@ -888,7 +892,7 @@ public com.google.protobuf.ByteString getNetworkBytes() { * bool enable_private_service_connect = 17 [deprecated = true]; * * @deprecated google.cloud.aiplatform.v1.Endpoint.enable_private_service_connect is deprecated. - * See google/cloud/aiplatform/v1/endpoint.proto;l=124 + * See google/cloud/aiplatform/v1/endpoint.proto;l=125 * @return The enablePrivateServiceConnect. */ @java.lang.Override @@ -3726,7 +3730,7 @@ public com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder getEncryptionSpecO * * *
-     * The full name of the Google Compute Engine
+     * Optional. The full name of the Google Compute Engine
      * [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks)
      * to which the Endpoint should be peered.
      * Private services access must already be configured for the network. If left
@@ -3741,7 +3745,9 @@ public com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder getEncryptionSpecO
      * network name.
      * 
* - * string network = 13 [(.google.api.resource_reference) = { ... } + * + * string network = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The network. */ @@ -3760,7 +3766,7 @@ public java.lang.String getNetwork() { * * *
-     * The full name of the Google Compute Engine
+     * Optional. The full name of the Google Compute Engine
      * [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks)
      * to which the Endpoint should be peered.
      * Private services access must already be configured for the network. If left
@@ -3775,7 +3781,9 @@ public java.lang.String getNetwork() {
      * network name.
      * 
* - * string network = 13 [(.google.api.resource_reference) = { ... } + * + * string network = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The bytes for network. */ @@ -3794,7 +3802,7 @@ public com.google.protobuf.ByteString getNetworkBytes() { * * *
-     * The full name of the Google Compute Engine
+     * Optional. The full name of the Google Compute Engine
      * [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks)
      * to which the Endpoint should be peered.
      * Private services access must already be configured for the network. If left
@@ -3809,7 +3817,9 @@ public com.google.protobuf.ByteString getNetworkBytes() {
      * network name.
      * 
* - * string network = 13 [(.google.api.resource_reference) = { ... } + * + * string network = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @param value The network to set. * @return This builder for chaining. @@ -3827,7 +3837,7 @@ public Builder setNetwork(java.lang.String value) { * * *
-     * The full name of the Google Compute Engine
+     * Optional. The full name of the Google Compute Engine
      * [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks)
      * to which the Endpoint should be peered.
      * Private services access must already be configured for the network. If left
@@ -3842,7 +3852,9 @@ public Builder setNetwork(java.lang.String value) {
      * network name.
      * 
* - * string network = 13 [(.google.api.resource_reference) = { ... } + * + * string network = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -3856,7 +3868,7 @@ public Builder clearNetwork() { * * *
-     * The full name of the Google Compute Engine
+     * Optional. The full name of the Google Compute Engine
      * [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks)
      * to which the Endpoint should be peered.
      * Private services access must already be configured for the network. If left
@@ -3871,7 +3883,9 @@ public Builder clearNetwork() {
      * network name.
      * 
* - * string network = 13 [(.google.api.resource_reference) = { ... } + * + * string network = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for network to set. * @return This builder for chaining. @@ -3902,7 +3916,7 @@ public Builder setNetworkBytes(com.google.protobuf.ByteString value) { * bool enable_private_service_connect = 17 [deprecated = true]; * * @deprecated google.cloud.aiplatform.v1.Endpoint.enable_private_service_connect is deprecated. - * See google/cloud/aiplatform/v1/endpoint.proto;l=124 + * See google/cloud/aiplatform/v1/endpoint.proto;l=125 * @return The enablePrivateServiceConnect. */ @java.lang.Override @@ -3924,7 +3938,7 @@ public boolean getEnablePrivateServiceConnect() { * bool enable_private_service_connect = 17 [deprecated = true]; * * @deprecated google.cloud.aiplatform.v1.Endpoint.enable_private_service_connect is deprecated. - * See google/cloud/aiplatform/v1/endpoint.proto;l=124 + * See google/cloud/aiplatform/v1/endpoint.proto;l=125 * @param value The enablePrivateServiceConnect to set. * @return This builder for chaining. */ @@ -3950,7 +3964,7 @@ public Builder setEnablePrivateServiceConnect(boolean value) { * bool enable_private_service_connect = 17 [deprecated = true]; * * @deprecated google.cloud.aiplatform.v1.Endpoint.enable_private_service_connect is deprecated. - * See google/cloud/aiplatform/v1/endpoint.proto;l=124 + * See google/cloud/aiplatform/v1/endpoint.proto;l=125 * @return This builder for chaining. */ @java.lang.Deprecated diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EndpointOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EndpointOrBuilder.java index e3182e398d62..f57fff6f9680 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EndpointOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/EndpointOrBuilder.java @@ -494,7 +494,7 @@ java.lang.String getLabelsOrDefault( * * *
-   * The full name of the Google Compute Engine
+   * Optional. The full name of the Google Compute Engine
    * [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks)
    * to which the Endpoint should be peered.
    * Private services access must already be configured for the network. If left
@@ -509,7 +509,9 @@ java.lang.String getLabelsOrDefault(
    * network name.
    * 
* - * string network = 13 [(.google.api.resource_reference) = { ... } + * + * string network = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The network. */ @@ -518,7 +520,7 @@ java.lang.String getLabelsOrDefault( * * *
-   * The full name of the Google Compute Engine
+   * Optional. The full name of the Google Compute Engine
    * [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks)
    * to which the Endpoint should be peered.
    * Private services access must already be configured for the network. If left
@@ -533,7 +535,9 @@ java.lang.String getLabelsOrDefault(
    * network name.
    * 
* - * string network = 13 [(.google.api.resource_reference) = { ... } + * + * string network = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The bytes for network. */ @@ -553,7 +557,7 @@ java.lang.String getLabelsOrDefault( * bool enable_private_service_connect = 17 [deprecated = true]; * * @deprecated google.cloud.aiplatform.v1.Endpoint.enable_private_service_connect is deprecated. - * See google/cloud/aiplatform/v1/endpoint.proto;l=124 + * See google/cloud/aiplatform/v1/endpoint.proto;l=125 * @return The enablePrivateServiceConnect. */ @java.lang.Deprecated 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 691b5ef17555..a7d8fc07c0e3 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 @@ -68,7 +68,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "atform/v1/explanation.proto\032#google/clou" + "d/aiplatform/v1/io.proto\0322google/cloud/a" + "iplatform/v1/machine_resources.proto\032\037go" - + "ogle/protobuf/timestamp.proto\"\356\007\n\010Endpoi" + + "ogle/protobuf/timestamp.proto\"\361\007\n\010Endpoi" + "nt\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\022G\n\017deploye" + "d_models\030\004 \003(\0132).google.cloud.aiplatform" @@ -80,49 +80,49 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n\013u" + "pdate_time\030\t \001(\0132\032.google.protobuf.Times" + "tampB\003\340A\003\022C\n\017encryption_spec\030\n \001(\0132*.goo" - + "gle.cloud.aiplatform.v1.EncryptionSpec\0224" - + "\n\007network\030\r \001(\tB#\372A \n\036compute.googleapis" - + ".com/Network\022*\n\036enable_private_service_c" - + "onnect\030\021 \001(\010B\002\030\001\022g\n\037model_deployment_mon" - + "itoring_job\030\016 \001(\tB>\340A\003\372A8\n6aiplatform.go" - + "ogleapis.com/ModelDeploymentMonitoringJo" - + "b\022p\n\'predict_request_response_logging_co" - + "nfig\030\022 \001(\0132?.google.cloud.aiplatform.v1." - + "PredictRequestResponseLoggingConfig\0323\n\021T" - + "rafficSplitEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002" - + " \001(\005:\0028\001\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005" - + "value\030\002 \001(\t:\0028\001:e\352Ab\n\"aiplatform.googlea" - + "pis.com/Endpoint\022cloud.google.com/go/aip" - + "latform/apiv1/aiplatformpb;aiplatformpb\252" - + "\002\032Google.Cloud.AIPlatform.V1\312\002\032Google\\Cl" - + "oud\\AIPlatform\\V1\352\002\035Google::Cloud::AIPla" - + "tform::V1b\006proto3" + + "gle.cloud.aiplatform.v1.EncryptionSpec\0227" + + "\n\007network\030\r \001(\tB&\340A\001\372A \n\036compute.googlea" + + "pis.com/Network\022*\n\036enable_private_servic" + + "e_connect\030\021 \001(\010B\002\030\001\022g\n\037model_deployment_" + + "monitoring_job\030\016 \001(\tB>\340A\003\372A8\n6aiplatform" + + ".googleapis.com/ModelDeploymentMonitorin" + + "gJob\022p\n\'predict_request_response_logging" + + "_config\030\022 \001(\0132?.google.cloud.aiplatform." + + "v1.PredictRequestResponseLoggingConfig\0323" + + "\n\021TrafficSplitEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005valu" + + "e\030\002 \001(\005:\0028\001\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022" + + "\r\n\005value\030\002 \001(\t:\0028\001:e\352Ab\n\"aiplatform.goog" + + "leapis.com/Endpoint\022cloud.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( diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetNasJobRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetNasJobRequest.java new file mode 100644 index 000000000000..ab09cc88a116 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetNasJobRequest.java @@ -0,0 +1,659 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/job_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for
+ * [JobService.GetNasJob][google.cloud.aiplatform.v1.JobService.GetNasJob].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.GetNasJobRequest} + */ +public final class GetNasJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.GetNasJobRequest) + GetNasJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetNasJobRequest.newBuilder() to construct. + private GetNasJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetNasJobRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetNasJobRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_GetNasJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_GetNasJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.GetNasJobRequest.class, + com.google.cloud.aiplatform.v1.GetNasJobRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the NasJob resource.
+   * Format:
+   * `projects/{project}/locations/{location}/nasJobs/{nas_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 NasJob resource.
+   * Format:
+   * `projects/{project}/locations/{location}/nasJobs/{nas_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.GetNasJobRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.GetNasJobRequest other = + (com.google.cloud.aiplatform.v1.GetNasJobRequest) 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.GetNasJobRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetNasJobRequest 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.GetNasJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetNasJobRequest 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.GetNasJobRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetNasJobRequest 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.GetNasJobRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetNasJobRequest 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.GetNasJobRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetNasJobRequest 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.GetNasJobRequest 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.GetNasJobRequest 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.GetNasJobRequest 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
+   * [JobService.GetNasJob][google.cloud.aiplatform.v1.JobService.GetNasJob].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.GetNasJobRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.GetNasJobRequest) + com.google.cloud.aiplatform.v1.GetNasJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_GetNasJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_GetNasJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.GetNasJobRequest.class, + com.google.cloud.aiplatform.v1.GetNasJobRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.GetNasJobRequest.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.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_GetNasJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetNasJobRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.GetNasJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetNasJobRequest build() { + com.google.cloud.aiplatform.v1.GetNasJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetNasJobRequest buildPartial() { + com.google.cloud.aiplatform.v1.GetNasJobRequest result = + new com.google.cloud.aiplatform.v1.GetNasJobRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.GetNasJobRequest 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.GetNasJobRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.GetNasJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.GetNasJobRequest other) { + if (other == com.google.cloud.aiplatform.v1.GetNasJobRequest.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 NasJob resource.
+     * Format:
+     * `projects/{project}/locations/{location}/nasJobs/{nas_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 NasJob resource.
+     * Format:
+     * `projects/{project}/locations/{location}/nasJobs/{nas_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 NasJob resource.
+     * Format:
+     * `projects/{project}/locations/{location}/nasJobs/{nas_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 NasJob resource.
+     * Format:
+     * `projects/{project}/locations/{location}/nasJobs/{nas_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 NasJob resource.
+     * Format:
+     * `projects/{project}/locations/{location}/nasJobs/{nas_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.GetNasJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.GetNasJobRequest) + private static final com.google.cloud.aiplatform.v1.GetNasJobRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.GetNasJobRequest(); + } + + public static com.google.cloud.aiplatform.v1.GetNasJobRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetNasJobRequest 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.GetNasJobRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetNasJobRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetNasJobRequestOrBuilder.java new file mode 100644 index 000000000000..da9e7a3521d1 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetNasJobRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/job_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface GetNasJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.GetNasJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the NasJob resource.
+   * Format:
+   * `projects/{project}/locations/{location}/nasJobs/{nas_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 NasJob resource.
+   * Format:
+   * `projects/{project}/locations/{location}/nasJobs/{nas_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/GetNasTrialDetailRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetNasTrialDetailRequest.java new file mode 100644 index 000000000000..f7f7dda34270 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetNasTrialDetailRequest.java @@ -0,0 +1,660 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/job_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for
+ * [JobService.GetNasTrialDetail][google.cloud.aiplatform.v1.JobService.GetNasTrialDetail].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.GetNasTrialDetailRequest} + */ +public final class GetNasTrialDetailRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.GetNasTrialDetailRequest) + GetNasTrialDetailRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetNasTrialDetailRequest.newBuilder() to construct. + private GetNasTrialDetailRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetNasTrialDetailRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetNasTrialDetailRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_GetNasTrialDetailRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_GetNasTrialDetailRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.GetNasTrialDetailRequest.class, + com.google.cloud.aiplatform.v1.GetNasTrialDetailRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the NasTrialDetail resource.
+   * Format:
+   * `projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}`
+   * 
+ * + * + * 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 NasTrialDetail resource.
+   * Format:
+   * `projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}`
+   * 
+ * + * + * 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.GetNasTrialDetailRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.GetNasTrialDetailRequest other = + (com.google.cloud.aiplatform.v1.GetNasTrialDetailRequest) 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.GetNasTrialDetailRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetNasTrialDetailRequest 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.GetNasTrialDetailRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetNasTrialDetailRequest 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.GetNasTrialDetailRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.GetNasTrialDetailRequest 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.GetNasTrialDetailRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetNasTrialDetailRequest 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.GetNasTrialDetailRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.GetNasTrialDetailRequest 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.GetNasTrialDetailRequest 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.GetNasTrialDetailRequest 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.GetNasTrialDetailRequest 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
+   * [JobService.GetNasTrialDetail][google.cloud.aiplatform.v1.JobService.GetNasTrialDetail].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.GetNasTrialDetailRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.GetNasTrialDetailRequest) + com.google.cloud.aiplatform.v1.GetNasTrialDetailRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_GetNasTrialDetailRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_GetNasTrialDetailRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.GetNasTrialDetailRequest.class, + com.google.cloud.aiplatform.v1.GetNasTrialDetailRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.GetNasTrialDetailRequest.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.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_GetNasTrialDetailRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetNasTrialDetailRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.GetNasTrialDetailRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetNasTrialDetailRequest build() { + com.google.cloud.aiplatform.v1.GetNasTrialDetailRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.GetNasTrialDetailRequest buildPartial() { + com.google.cloud.aiplatform.v1.GetNasTrialDetailRequest result = + new com.google.cloud.aiplatform.v1.GetNasTrialDetailRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.GetNasTrialDetailRequest 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.GetNasTrialDetailRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.GetNasTrialDetailRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.GetNasTrialDetailRequest other) { + if (other == com.google.cloud.aiplatform.v1.GetNasTrialDetailRequest.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 NasTrialDetail resource.
+     * Format:
+     * `projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}`
+     * 
+ * + * + * 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 NasTrialDetail resource.
+     * Format:
+     * `projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}`
+     * 
+ * + * + * 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 NasTrialDetail resource.
+     * Format:
+     * `projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}`
+     * 
+ * + * + * 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 NasTrialDetail resource.
+     * Format:
+     * `projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}`
+     * 
+ * + * + * 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 NasTrialDetail resource.
+     * Format:
+     * `projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}`
+     * 
+ * + * + * 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.GetNasTrialDetailRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.GetNasTrialDetailRequest) + private static final com.google.cloud.aiplatform.v1.GetNasTrialDetailRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.GetNasTrialDetailRequest(); + } + + public static com.google.cloud.aiplatform.v1.GetNasTrialDetailRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetNasTrialDetailRequest 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.GetNasTrialDetailRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetNasTrialDetailRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetNasTrialDetailRequestOrBuilder.java new file mode 100644 index 000000000000..d37869996720 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/GetNasTrialDetailRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/job_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface GetNasTrialDetailRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.GetNasTrialDetailRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the NasTrialDetail resource.
+   * Format:
+   * `projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the NasTrialDetail resource.
+   * Format:
+   * `projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}`
+   * 
+ * + * + * 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/IndexEndpoint.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/IndexEndpoint.java index 084e03fb7608..816d98676a9e 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/IndexEndpoint.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/IndexEndpoint.java @@ -693,7 +693,7 @@ public com.google.protobuf.ByteString getNetworkBytes() { *
* * @deprecated google.cloud.aiplatform.v1.IndexEndpoint.enable_private_service_connect is - * deprecated. See google/cloud/aiplatform/v1/index_endpoint.proto;l=102 + * deprecated. See google/cloud/aiplatform/v1/index_endpoint.proto;l=103 * @return The enablePrivateServiceConnect. */ @java.lang.Override @@ -702,6 +702,73 @@ public boolean getEnablePrivateServiceConnect() { return enablePrivateServiceConnect_; } + public static final int PRIVATE_SERVICE_CONNECT_CONFIG_FIELD_NUMBER = 12; + private com.google.cloud.aiplatform.v1.PrivateServiceConnectConfig privateServiceConnectConfig_; + /** + * + * + *
+   * Optional. Configuration for private service connect.
+   * [network][google.cloud.aiplatform.v1.IndexEndpoint.network] and
+   * [private_service_connect_config][google.cloud.aiplatform.v1.IndexEndpoint.private_service_connect_config]
+   * are mutually exclusive.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.PrivateServiceConnectConfig private_service_connect_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the privateServiceConnectConfig field is set. + */ + @java.lang.Override + public boolean hasPrivateServiceConnectConfig() { + return privateServiceConnectConfig_ != null; + } + /** + * + * + *
+   * Optional. Configuration for private service connect.
+   * [network][google.cloud.aiplatform.v1.IndexEndpoint.network] and
+   * [private_service_connect_config][google.cloud.aiplatform.v1.IndexEndpoint.private_service_connect_config]
+   * are mutually exclusive.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.PrivateServiceConnectConfig private_service_connect_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The privateServiceConnectConfig. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.PrivateServiceConnectConfig + getPrivateServiceConnectConfig() { + return privateServiceConnectConfig_ == null + ? com.google.cloud.aiplatform.v1.PrivateServiceConnectConfig.getDefaultInstance() + : privateServiceConnectConfig_; + } + /** + * + * + *
+   * Optional. Configuration for private service connect.
+   * [network][google.cloud.aiplatform.v1.IndexEndpoint.network] and
+   * [private_service_connect_config][google.cloud.aiplatform.v1.IndexEndpoint.private_service_connect_config]
+   * are mutually exclusive.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.PrivateServiceConnectConfig private_service_connect_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.PrivateServiceConnectConfigOrBuilder + getPrivateServiceConnectConfigOrBuilder() { + return privateServiceConnectConfig_ == null + ? com.google.cloud.aiplatform.v1.PrivateServiceConnectConfig.getDefaultInstance() + : privateServiceConnectConfig_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -745,6 +812,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (enablePrivateServiceConnect_ != false) { output.writeBool(10, enablePrivateServiceConnect_); } + if (privateServiceConnectConfig_ != null) { + output.writeMessage(12, getPrivateServiceConnectConfig()); + } getUnknownFields().writeTo(output); } @@ -792,6 +862,11 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(10, enablePrivateServiceConnect_); } + if (privateServiceConnectConfig_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 12, getPrivateServiceConnectConfig()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -824,6 +899,11 @@ public boolean equals(final java.lang.Object obj) { } if (!getNetwork().equals(other.getNetwork())) return false; if (getEnablePrivateServiceConnect() != other.getEnablePrivateServiceConnect()) return false; + if (hasPrivateServiceConnectConfig() != other.hasPrivateServiceConnectConfig()) return false; + if (hasPrivateServiceConnectConfig()) { + if (!getPrivateServiceConnectConfig().equals(other.getPrivateServiceConnectConfig())) + return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -863,6 +943,10 @@ public int hashCode() { hash = (53 * hash) + getNetwork().hashCode(); hash = (37 * hash) + ENABLE_PRIVATE_SERVICE_CONNECT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnablePrivateServiceConnect()); + if (hasPrivateServiceConnectConfig()) { + hash = (37 * hash) + PRIVATE_SERVICE_CONNECT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getPrivateServiceConnectConfig().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -1047,6 +1131,11 @@ public Builder clear() { } network_ = ""; enablePrivateServiceConnect_ = false; + privateServiceConnectConfig_ = null; + if (privateServiceConnectConfigBuilder_ != null) { + privateServiceConnectConfigBuilder_.dispose(); + privateServiceConnectConfigBuilder_ = null; + } return this; } @@ -1124,6 +1213,12 @@ private void buildPartial0(com.google.cloud.aiplatform.v1.IndexEndpoint result) if (((from_bitField0_ & 0x00000200) != 0)) { result.enablePrivateServiceConnect_ = enablePrivateServiceConnect_; } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.privateServiceConnectConfig_ = + privateServiceConnectConfigBuilder_ == null + ? privateServiceConnectConfig_ + : privateServiceConnectConfigBuilder_.build(); + } } @java.lang.Override @@ -1234,6 +1329,9 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1.IndexEndpoint other) { if (other.getEnablePrivateServiceConnect() != false) { setEnablePrivateServiceConnect(other.getEnablePrivateServiceConnect()); } + if (other.hasPrivateServiceConnectConfig()) { + mergePrivateServiceConnectConfig(other.getPrivateServiceConnectConfig()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1333,6 +1431,13 @@ public Builder mergeFrom( bitField0_ |= 0x00000200; break; } // case 80 + case 98: + { + input.readMessage( + getPrivateServiceConnectConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000400; + break; + } // case 98 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -2985,7 +3090,7 @@ public Builder setNetworkBytes(com.google.protobuf.ByteString value) { *
* * @deprecated google.cloud.aiplatform.v1.IndexEndpoint.enable_private_service_connect is - * deprecated. See google/cloud/aiplatform/v1/index_endpoint.proto;l=102 + * deprecated. See google/cloud/aiplatform/v1/index_endpoint.proto;l=103 * @return The enablePrivateServiceConnect. */ @java.lang.Override @@ -3010,7 +3115,7 @@ public boolean getEnablePrivateServiceConnect() { * * * @deprecated google.cloud.aiplatform.v1.IndexEndpoint.enable_private_service_connect is - * deprecated. See google/cloud/aiplatform/v1/index_endpoint.proto;l=102 + * deprecated. See google/cloud/aiplatform/v1/index_endpoint.proto;l=103 * @param value The enablePrivateServiceConnect to set. * @return This builder for chaining. */ @@ -3039,7 +3144,7 @@ public Builder setEnablePrivateServiceConnect(boolean value) { * * * @deprecated google.cloud.aiplatform.v1.IndexEndpoint.enable_private_service_connect is - * deprecated. See google/cloud/aiplatform/v1/index_endpoint.proto;l=102 + * deprecated. See google/cloud/aiplatform/v1/index_endpoint.proto;l=103 * @return This builder for chaining. */ @java.lang.Deprecated @@ -3050,6 +3155,242 @@ public Builder clearEnablePrivateServiceConnect() { return this; } + private com.google.cloud.aiplatform.v1.PrivateServiceConnectConfig privateServiceConnectConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.PrivateServiceConnectConfig, + com.google.cloud.aiplatform.v1.PrivateServiceConnectConfig.Builder, + com.google.cloud.aiplatform.v1.PrivateServiceConnectConfigOrBuilder> + privateServiceConnectConfigBuilder_; + /** + * + * + *
+     * Optional. Configuration for private service connect.
+     * [network][google.cloud.aiplatform.v1.IndexEndpoint.network] and
+     * [private_service_connect_config][google.cloud.aiplatform.v1.IndexEndpoint.private_service_connect_config]
+     * are mutually exclusive.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.PrivateServiceConnectConfig private_service_connect_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the privateServiceConnectConfig field is set. + */ + public boolean hasPrivateServiceConnectConfig() { + return ((bitField0_ & 0x00000400) != 0); + } + /** + * + * + *
+     * Optional. Configuration for private service connect.
+     * [network][google.cloud.aiplatform.v1.IndexEndpoint.network] and
+     * [private_service_connect_config][google.cloud.aiplatform.v1.IndexEndpoint.private_service_connect_config]
+     * are mutually exclusive.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.PrivateServiceConnectConfig private_service_connect_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The privateServiceConnectConfig. + */ + public com.google.cloud.aiplatform.v1.PrivateServiceConnectConfig + getPrivateServiceConnectConfig() { + if (privateServiceConnectConfigBuilder_ == null) { + return privateServiceConnectConfig_ == null + ? com.google.cloud.aiplatform.v1.PrivateServiceConnectConfig.getDefaultInstance() + : privateServiceConnectConfig_; + } else { + return privateServiceConnectConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Configuration for private service connect.
+     * [network][google.cloud.aiplatform.v1.IndexEndpoint.network] and
+     * [private_service_connect_config][google.cloud.aiplatform.v1.IndexEndpoint.private_service_connect_config]
+     * are mutually exclusive.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.PrivateServiceConnectConfig private_service_connect_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPrivateServiceConnectConfig( + com.google.cloud.aiplatform.v1.PrivateServiceConnectConfig value) { + if (privateServiceConnectConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + privateServiceConnectConfig_ = value; + } else { + privateServiceConnectConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Configuration for private service connect.
+     * [network][google.cloud.aiplatform.v1.IndexEndpoint.network] and
+     * [private_service_connect_config][google.cloud.aiplatform.v1.IndexEndpoint.private_service_connect_config]
+     * are mutually exclusive.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.PrivateServiceConnectConfig private_service_connect_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPrivateServiceConnectConfig( + com.google.cloud.aiplatform.v1.PrivateServiceConnectConfig.Builder builderForValue) { + if (privateServiceConnectConfigBuilder_ == null) { + privateServiceConnectConfig_ = builderForValue.build(); + } else { + privateServiceConnectConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Configuration for private service connect.
+     * [network][google.cloud.aiplatform.v1.IndexEndpoint.network] and
+     * [private_service_connect_config][google.cloud.aiplatform.v1.IndexEndpoint.private_service_connect_config]
+     * are mutually exclusive.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.PrivateServiceConnectConfig private_service_connect_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergePrivateServiceConnectConfig( + com.google.cloud.aiplatform.v1.PrivateServiceConnectConfig value) { + if (privateServiceConnectConfigBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0) + && privateServiceConnectConfig_ != null + && privateServiceConnectConfig_ + != com.google.cloud.aiplatform.v1.PrivateServiceConnectConfig + .getDefaultInstance()) { + getPrivateServiceConnectConfigBuilder().mergeFrom(value); + } else { + privateServiceConnectConfig_ = value; + } + } else { + privateServiceConnectConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Configuration for private service connect.
+     * [network][google.cloud.aiplatform.v1.IndexEndpoint.network] and
+     * [private_service_connect_config][google.cloud.aiplatform.v1.IndexEndpoint.private_service_connect_config]
+     * are mutually exclusive.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.PrivateServiceConnectConfig private_service_connect_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearPrivateServiceConnectConfig() { + bitField0_ = (bitField0_ & ~0x00000400); + privateServiceConnectConfig_ = null; + if (privateServiceConnectConfigBuilder_ != null) { + privateServiceConnectConfigBuilder_.dispose(); + privateServiceConnectConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Configuration for private service connect.
+     * [network][google.cloud.aiplatform.v1.IndexEndpoint.network] and
+     * [private_service_connect_config][google.cloud.aiplatform.v1.IndexEndpoint.private_service_connect_config]
+     * are mutually exclusive.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.PrivateServiceConnectConfig private_service_connect_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.PrivateServiceConnectConfig.Builder + getPrivateServiceConnectConfigBuilder() { + bitField0_ |= 0x00000400; + onChanged(); + return getPrivateServiceConnectConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Configuration for private service connect.
+     * [network][google.cloud.aiplatform.v1.IndexEndpoint.network] and
+     * [private_service_connect_config][google.cloud.aiplatform.v1.IndexEndpoint.private_service_connect_config]
+     * are mutually exclusive.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.PrivateServiceConnectConfig private_service_connect_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1.PrivateServiceConnectConfigOrBuilder + getPrivateServiceConnectConfigOrBuilder() { + if (privateServiceConnectConfigBuilder_ != null) { + return privateServiceConnectConfigBuilder_.getMessageOrBuilder(); + } else { + return privateServiceConnectConfig_ == null + ? com.google.cloud.aiplatform.v1.PrivateServiceConnectConfig.getDefaultInstance() + : privateServiceConnectConfig_; + } + } + /** + * + * + *
+     * Optional. Configuration for private service connect.
+     * [network][google.cloud.aiplatform.v1.IndexEndpoint.network] and
+     * [private_service_connect_config][google.cloud.aiplatform.v1.IndexEndpoint.private_service_connect_config]
+     * are mutually exclusive.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.PrivateServiceConnectConfig private_service_connect_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.PrivateServiceConnectConfig, + com.google.cloud.aiplatform.v1.PrivateServiceConnectConfig.Builder, + com.google.cloud.aiplatform.v1.PrivateServiceConnectConfigOrBuilder> + getPrivateServiceConnectConfigFieldBuilder() { + if (privateServiceConnectConfigBuilder_ == null) { + privateServiceConnectConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.PrivateServiceConnectConfig, + com.google.cloud.aiplatform.v1.PrivateServiceConnectConfig.Builder, + com.google.cloud.aiplatform.v1.PrivateServiceConnectConfigOrBuilder>( + getPrivateServiceConnectConfig(), getParentForChildren(), isClean()); + privateServiceConnectConfig_ = null; + } + return privateServiceConnectConfigBuilder_; + } + @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/IndexEndpointOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/IndexEndpointOrBuilder.java index 47da3ba8ad28..da0b3b180b8f 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/IndexEndpointOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/IndexEndpointOrBuilder.java @@ -418,9 +418,60 @@ java.lang.String getLabelsOrDefault( * * * @deprecated google.cloud.aiplatform.v1.IndexEndpoint.enable_private_service_connect is - * deprecated. See google/cloud/aiplatform/v1/index_endpoint.proto;l=102 + * deprecated. See google/cloud/aiplatform/v1/index_endpoint.proto;l=103 * @return The enablePrivateServiceConnect. */ @java.lang.Deprecated boolean getEnablePrivateServiceConnect(); + + /** + * + * + *
+   * Optional. Configuration for private service connect.
+   * [network][google.cloud.aiplatform.v1.IndexEndpoint.network] and
+   * [private_service_connect_config][google.cloud.aiplatform.v1.IndexEndpoint.private_service_connect_config]
+   * are mutually exclusive.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.PrivateServiceConnectConfig private_service_connect_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the privateServiceConnectConfig field is set. + */ + boolean hasPrivateServiceConnectConfig(); + /** + * + * + *
+   * Optional. Configuration for private service connect.
+   * [network][google.cloud.aiplatform.v1.IndexEndpoint.network] and
+   * [private_service_connect_config][google.cloud.aiplatform.v1.IndexEndpoint.private_service_connect_config]
+   * are mutually exclusive.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.PrivateServiceConnectConfig private_service_connect_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The privateServiceConnectConfig. + */ + com.google.cloud.aiplatform.v1.PrivateServiceConnectConfig getPrivateServiceConnectConfig(); + /** + * + * + *
+   * Optional. Configuration for private service connect.
+   * [network][google.cloud.aiplatform.v1.IndexEndpoint.network] and
+   * [private_service_connect_config][google.cloud.aiplatform.v1.IndexEndpoint.private_service_connect_config]
+   * are mutually exclusive.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.PrivateServiceConnectConfig private_service_connect_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.aiplatform.v1.PrivateServiceConnectConfigOrBuilder + getPrivateServiceConnectConfigOrBuilder(); } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/IndexEndpointProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/IndexEndpointProto.java index 15f8065273cd..b90ff7a79cf5 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/IndexEndpointProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/IndexEndpointProto.java @@ -64,52 +64,55 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "int.proto\022\032google.cloud.aiplatform.v1\032\037g" + "oogle/api/field_behavior.proto\032\031google/a" + "pi/resource.proto\0322google/cloud/aiplatfo" - + "rm/v1/machine_resources.proto\032\037google/pr" - + "otobuf/timestamp.proto\"\310\004\n\rIndexEndpoint" - + "\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\022H\n\020deployed_" - + "indexes\030\004 \003(\0132).google.cloud.aiplatform." - + "v1.DeployedIndexB\003\340A\003\022\014\n\004etag\030\005 \001(\t\022E\n\006l" - + "abels\030\006 \003(\01325.google.cloud.aiplatform.v1" - + ".IndexEndpoint.LabelsEntry\0224\n\013create_tim" - + "e\030\007 \001(\0132\032.google.protobuf.TimestampB\003\340A\003" - + "\0224\n\013update_time\030\010 \001(\0132\032.google.protobuf." - + "TimestampB\003\340A\003\022\024\n\007network\030\t \001(\tB\003\340A\001\022-\n\036" - + "enable_private_service_connect\030\n \001(\010B\005\030\001" - + "\340A\001\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value" - + "\030\002 \001(\t:\0028\001:u\352Ar\n\'aiplatform.googleapis.c" - + "om/IndexEndpoint\022Gprojects/{project}/loc" - + "ations/{location}/indexEndpoints/{index_" - + "endpoint}\"\227\005\n\rDeployedIndex\022\017\n\002id\030\001 \001(\tB" - + "\003\340A\002\0226\n\005index\030\002 \001(\tB\'\340A\002\372A!\n\037aiplatform." - + "googleapis.com/Index\022\024\n\014display_name\030\003 \001" - + "(\t\0224\n\013create_time\030\004 \001(\0132\032.google.protobu" - + "f.TimestampB\003\340A\003\022Q\n\021private_endpoints\030\005 " - + "\001(\01321.google.cloud.aiplatform.v1.IndexPr" - + "ivateEndpointsB\003\340A\003\0228\n\017index_sync_time\030\006" - + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022P\n" - + "\023automatic_resources\030\007 \001(\0132..google.clou" - + "d.aiplatform.v1.AutomaticResourcesB\003\340A\001\022" - + "P\n\023dedicated_resources\030\020 \001(\0132..google.cl" - + "oud.aiplatform.v1.DedicatedResourcesB\003\340A" - + "\001\022\"\n\025enable_access_logging\030\010 \001(\010B\003\340A\001\022\\\n" - + "\032deployed_index_auth_config\030\t \001(\01323.goog" - + "le.cloud.aiplatform.v1.DeployedIndexAuth" - + "ConfigB\003\340A\001\022\037\n\022reserved_ip_ranges\030\n \003(\tB" - + "\003\340A\001\022\035\n\020deployment_group\030\013 \001(\tB\003\340A\001\"\256\001\n\027" - + "DeployedIndexAuthConfig\022W\n\rauth_provider" - + "\030\001 \001(\0132@.google.cloud.aiplatform.v1.Depl" - + "oyedIndexAuthConfig.AuthProvider\032:\n\014Auth" - + "Provider\022\021\n\taudiences\030\001 \003(\t\022\027\n\017allowed_i" - + "ssuers\030\002 \003(\t\"Y\n\025IndexPrivateEndpoints\022\037\n" - + "\022match_grpc_address\030\001 \001(\tB\003\340A\003\022\037\n\022servic" - + "e_attachment\030\002 \001(\tB\003\340A\003B\320\001\n\036com.google.c" - + "loud.aiplatform.v1B\022IndexEndpointProtoP\001" - + "Z>cloud.google.com/go/aiplatform/apiv1/a" - + "iplatformpb;aiplatformpb\252\002\032Google.Cloud." - + "AIPlatform.V1\312\002\032Google\\Cloud\\AIPlatform\\" - + "V1\352\002\035Google::Cloud::AIPlatform::V1b\006prot" - + "o3" + + "rm/v1/machine_resources.proto\0323google/cl" + + "oud/aiplatform/v1/service_networking.pro" + + "to\032\037google/protobuf/timestamp.proto\"\256\005\n\r" + + "IndexEndpoint\022\021\n\004name\030\001 \001(\tB\003\340A\003\022\031\n\014disp" + + "lay_name\030\002 \001(\tB\003\340A\002\022\023\n\013description\030\003 \001(\t" + + "\022H\n\020deployed_indexes\030\004 \003(\0132).google.clou" + + "d.aiplatform.v1.DeployedIndexB\003\340A\003\022\014\n\004et" + + "ag\030\005 \001(\t\022E\n\006labels\030\006 \003(\01325.google.cloud." + + "aiplatform.v1.IndexEndpoint.LabelsEntry\022" + + "4\n\013create_time\030\007 \001(\0132\032.google.protobuf.T" + + "imestampB\003\340A\003\0224\n\013update_time\030\010 \001(\0132\032.goo" + + "gle.protobuf.TimestampB\003\340A\003\022\024\n\007network\030\t" + + " \001(\tB\003\340A\001\022-\n\036enable_private_service_conn" + + "ect\030\n \001(\010B\005\030\001\340A\001\022d\n\036private_service_conn" + + "ect_config\030\014 \001(\01327.google.cloud.aiplatfo" + + "rm.v1.PrivateServiceConnectConfigB\003\340A\001\032-" + + "\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(" + + "\t:\0028\001:u\352Ar\n\'aiplatform.googleapis.com/In" + + "dexEndpoint\022Gprojects/{project}/location" + + "s/{location}/indexEndpoints/{index_endpo" + + "int}\"\227\005\n\rDeployedIndex\022\017\n\002id\030\001 \001(\tB\003\340A\002\022" + + "6\n\005index\030\002 \001(\tB\'\340A\002\372A!\n\037aiplatform.googl" + + "eapis.com/Index\022\024\n\014display_name\030\003 \001(\t\0224\n" + + "\013create_time\030\004 \001(\0132\032.google.protobuf.Tim" + + "estampB\003\340A\003\022Q\n\021private_endpoints\030\005 \001(\01321" + + ".google.cloud.aiplatform.v1.IndexPrivate" + + "EndpointsB\003\340A\003\0228\n\017index_sync_time\030\006 \001(\0132" + + "\032.google.protobuf.TimestampB\003\340A\003\022P\n\023auto" + + "matic_resources\030\007 \001(\0132..google.cloud.aip" + + "latform.v1.AutomaticResourcesB\003\340A\001\022P\n\023de" + + "dicated_resources\030\020 \001(\0132..google.cloud.a" + + "iplatform.v1.DedicatedResourcesB\003\340A\001\022\"\n\025" + + "enable_access_logging\030\010 \001(\010B\003\340A\001\022\\\n\032depl" + + "oyed_index_auth_config\030\t \001(\01323.google.cl" + + "oud.aiplatform.v1.DeployedIndexAuthConfi" + + "gB\003\340A\001\022\037\n\022reserved_ip_ranges\030\n \003(\tB\003\340A\001\022" + + "\035\n\020deployment_group\030\013 \001(\tB\003\340A\001\"\256\001\n\027Deplo" + + "yedIndexAuthConfig\022W\n\rauth_provider\030\001 \001(" + + "\0132@.google.cloud.aiplatform.v1.DeployedI" + + "ndexAuthConfig.AuthProvider\032:\n\014AuthProvi" + + "der\022\021\n\taudiences\030\001 \003(\t\022\027\n\017allowed_issuer" + + "s\030\002 \003(\t\"Y\n\025IndexPrivateEndpoints\022\037\n\022matc" + + "h_grpc_address\030\001 \001(\tB\003\340A\003\022\037\n\022service_att" + + "achment\030\002 \001(\tB\003\340A\003B\320\001\n\036com.google.cloud." + + "aiplatform.v1B\022IndexEndpointProtoP\001Z>clo" + + "ud.google.com/go/aiplatform/apiv1/aiplat" + + "formpb;aiplatformpb\252\002\032Google.Cloud.AIPla" + + "tform.V1\312\002\032Google\\Cloud\\AIPlatform\\V1\352\002\035" + + "Google::Cloud::AIPlatform::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -118,6 +121,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), com.google.cloud.aiplatform.v1.MachineResourcesProto.getDescriptor(), + com.google.cloud.aiplatform.v1.ServiceNetworkingProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), }); internal_static_google_cloud_aiplatform_v1_IndexEndpoint_descriptor = @@ -136,6 +140,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "UpdateTime", "Network", "EnablePrivateServiceConnect", + "PrivateServiceConnectConfig", }); internal_static_google_cloud_aiplatform_v1_IndexEndpoint_LabelsEntry_descriptor = internal_static_google_cloud_aiplatform_v1_IndexEndpoint_descriptor.getNestedTypes().get(0); @@ -200,6 +205,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); com.google.cloud.aiplatform.v1.MachineResourcesProto.getDescriptor(); + com.google.cloud.aiplatform.v1.ServiceNetworkingProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/JobServiceProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/JobServiceProto.java index 825597ae62d5..736507de4e94 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/JobServiceProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/JobServiceProto.java @@ -99,6 +99,42 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_aiplatform_v1_CancelHyperparameterTuningJobRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_aiplatform_v1_CancelHyperparameterTuningJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_CreateNasJobRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_CreateNasJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_GetNasJobRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_GetNasJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ListNasJobsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ListNasJobsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ListNasJobsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ListNasJobsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_DeleteNasJobRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_DeleteNasJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_CancelNasJobRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_CancelNasJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_GetNasTrialDetailRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_GetNasTrialDetailRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ListNasTrialDetailsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ListNasTrialDetailsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_ListNasTrialDetailsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_ListNasTrialDetailsResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_aiplatform_v1_CreateBatchPredictionJobRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -191,323 +227,383 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ta_labeling_job.proto\032:google/cloud/aipl" + "atform/v1/hyperparameter_tuning_job.prot" + "o\032@google/cloud/aiplatform/v1/model_depl" - + "oyment_monitoring_job.proto\032*google/clou" - + "d/aiplatform/v1/operation.proto\032#google/" - + "longrunning/operations.proto\032\033google/pro" - + "tobuf/empty.proto\032 google/protobuf/field" - + "_mask.proto\032\037google/protobuf/timestamp.p" - + "roto\"\223\001\n\026CreateCustomJobRequest\0229\n\006paren" - + "t\030\001 \001(\tB)\340A\002\372A#\n!locations.googleapis.co" - + "m/Location\022>\n\ncustom_job\030\002 \001(\0132%.google." - + "cloud.aiplatform.v1.CustomJobB\003\340A\002\"P\n\023Ge" - + "tCustomJobRequest\0229\n\004name\030\001 \001(\tB+\340A\002\372A%\n" - + "#aiplatform.googleapis.com/CustomJob\"\270\001\n" - + "\025ListCustomJobsRequest\0229\n\006parent\030\001 \001(\tB)" - + "\340A\002\372A#\n!locations.googleapis.com/Locatio" - + "n\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022\022\n\n" - + "page_token\030\004 \001(\t\022-\n\tread_mask\030\005 \001(\0132\032.go" - + "ogle.protobuf.FieldMask\"m\n\026ListCustomJob" - + "sResponse\022:\n\013custom_jobs\030\001 \003(\0132%.google." - + "cloud.aiplatform.v1.CustomJob\022\027\n\017next_pa" - + "ge_token\030\002 \001(\t\"S\n\026DeleteCustomJobRequest" - + "\0229\n\004name\030\001 \001(\tB+\340A\002\372A%\n#aiplatform.googl" - + "eapis.com/CustomJob\"S\n\026CancelCustomJobRe" - + "quest\0229\n\004name\030\001 \001(\tB+\340A\002\372A%\n#aiplatform." - + "googleapis.com/CustomJob\"\246\001\n\034CreateDataL" - + "abelingJobRequest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A" - + "#\n!locations.googleapis.com/Location\022K\n\021" - + "data_labeling_job\030\002 \001(\0132+.google.cloud.a" - + "iplatform.v1.DataLabelingJobB\003\340A\002\"\\\n\031Get" - + "DataLabelingJobRequest\022?\n\004name\030\001 \001(\tB1\340A" - + "\002\372A+\n)aiplatform.googleapis.com/DataLabe" - + "lingJob\"\320\001\n\033ListDataLabelingJobsRequest\022" - + "9\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!locations.googl" - + "eapis.com/Location\022\016\n\006filter\030\002 \001(\t\022\021\n\tpa" - + "ge_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\022-\n\trea" - + "d_mask\030\005 \001(\0132\032.google.protobuf.FieldMask" - + "\022\020\n\010order_by\030\006 \001(\t\"\200\001\n\034ListDataLabelingJ" - + "obsResponse\022G\n\022data_labeling_jobs\030\001 \003(\0132" - + "+.google.cloud.aiplatform.v1.DataLabelin" - + "gJob\022\027\n\017next_page_token\030\002 \001(\t\"_\n\034DeleteD" - + "ataLabelingJobRequest\022?\n\004name\030\001 \001(\tB1\340A\002" - + "\372A+\n)aiplatform.googleapis.com/DataLabel" - + "ingJob\"_\n\034CancelDataLabelingJobRequest\022?" - + "\n\004name\030\001 \001(\tB1\340A\002\372A+\n)aiplatform.googlea" - + "pis.com/DataLabelingJob\"\276\001\n$CreateHyperp" - + "arameterTuningJobRequest\0229\n\006parent\030\001 \001(\t" - + "B)\340A\002\372A#\n!locations.googleapis.com/Locat" - + "ion\022[\n\031hyperparameter_tuning_job\030\002 \001(\01323" - + ".google.cloud.aiplatform.v1.Hyperparamet" - + "erTuningJobB\003\340A\002\"l\n!GetHyperparameterTun" - + "ingJobRequest\022G\n\004name\030\001 \001(\tB9\340A\002\372A3\n1aip" - + "latform.googleapis.com/HyperparameterTun" - + "ingJob\"\306\001\n#ListHyperparameterTuningJobsR" - + "equest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!location" - + "s.googleapis.com/Location\022\016\n\006filter\030\002 \001(" - + "\t\022\021\n\tpage_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t" - + "\022-\n\tread_mask\030\005 \001(\0132\032.google.protobuf.Fi" - + "eldMask\"\230\001\n$ListHyperparameterTuningJobs" - + "Response\022W\n\032hyperparameter_tuning_jobs\030\001" - + " \003(\01323.google.cloud.aiplatform.v1.Hyperp" - + "arameterTuningJob\022\027\n\017next_page_token\030\002 \001" - + "(\t\"o\n$DeleteHyperparameterTuningJobReque" - + "st\022G\n\004name\030\001 \001(\tB9\340A\002\372A3\n1aiplatform.goo" - + "gleapis.com/HyperparameterTuningJob\"o\n$C" - + "ancelHyperparameterTuningJobRequest\022G\n\004n" - + "ame\030\001 \001(\tB9\340A\002\372A3\n1aiplatform.googleapis" - + ".com/HyperparameterTuningJob\"\257\001\n\037CreateB" - + "atchPredictionJobRequest\0229\n\006parent\030\001 \001(\t" + + "oyment_monitoring_job.proto\032(google/clou" + + "d/aiplatform/v1/nas_job.proto\032*google/cl" + + "oud/aiplatform/v1/operation.proto\032#googl" + + "e/longrunning/operations.proto\032\033google/p" + + "rotobuf/empty.proto\032 google/protobuf/fie" + + "ld_mask.proto\032\037google/protobuf/timestamp" + + ".proto\"\223\001\n\026CreateCustomJobRequest\0229\n\006par" + + "ent\030\001 \001(\tB)\340A\002\372A#\n!locations.googleapis." + + "com/Location\022>\n\ncustom_job\030\002 \001(\0132%.googl" + + "e.cloud.aiplatform.v1.CustomJobB\003\340A\002\"P\n\023" + + "GetCustomJobRequest\0229\n\004name\030\001 \001(\tB+\340A\002\372A" + + "%\n#aiplatform.googleapis.com/CustomJob\"\270" + + "\001\n\025ListCustomJobsRequest\0229\n\006parent\030\001 \001(\t" + "B)\340A\002\372A#\n!locations.googleapis.com/Locat" - + "ion\022Q\n\024batch_prediction_job\030\002 \001(\0132..goog" - + "le.cloud.aiplatform.v1.BatchPredictionJo" - + "bB\003\340A\002\"b\n\034GetBatchPredictionJobRequest\022B" - + "\n\004name\030\001 \001(\tB4\340A\002\372A.\n,aiplatform.googlea" - + "pis.com/BatchPredictionJob\"\301\001\n\036ListBatch" - + "PredictionJobsRequest\0229\n\006parent\030\001 \001(\tB)\340" - + "A\002\372A#\n!locations.googleapis.com/Location" - + "\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022\022\n\np" - + "age_token\030\004 \001(\t\022-\n\tread_mask\030\005 \001(\0132\032.goo" - + "gle.protobuf.FieldMask\"\211\001\n\037ListBatchPred" - + "ictionJobsResponse\022M\n\025batch_prediction_j" - + "obs\030\001 \003(\0132..google.cloud.aiplatform.v1.B" - + "atchPredictionJob\022\027\n\017next_page_token\030\002 \001" - + "(\t\"e\n\037DeleteBatchPredictionJobRequest\022B\n" - + "\004name\030\001 \001(\tB4\340A\002\372A.\n,aiplatform.googleap" - + "is.com/BatchPredictionJob\"e\n\037CancelBatch" - + "PredictionJobRequest\022B\n\004name\030\001 \001(\tB4\340A\002\372" - + "A.\n,aiplatform.googleapis.com/BatchPredi" - + "ctionJob\"\316\001\n)CreateModelDeploymentMonito" - + "ringJobRequest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!" - + "locations.googleapis.com/Location\022f\n\037mod" - + "el_deployment_monitoring_job\030\002 \001(\01328.goo" + + "ion\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022\022" + + "\n\npage_token\030\004 \001(\t\022-\n\tread_mask\030\005 \001(\0132\032." + + "google.protobuf.FieldMask\"m\n\026ListCustomJ" + + "obsResponse\022:\n\013custom_jobs\030\001 \003(\0132%.googl" + + "e.cloud.aiplatform.v1.CustomJob\022\027\n\017next_" + + "page_token\030\002 \001(\t\"S\n\026DeleteCustomJobReque" + + "st\0229\n\004name\030\001 \001(\tB+\340A\002\372A%\n#aiplatform.goo" + + "gleapis.com/CustomJob\"S\n\026CancelCustomJob" + + "Request\0229\n\004name\030\001 \001(\tB+\340A\002\372A%\n#aiplatfor" + + "m.googleapis.com/CustomJob\"\246\001\n\034CreateDat" + + "aLabelingJobRequest\0229\n\006parent\030\001 \001(\tB)\340A\002" + + "\372A#\n!locations.googleapis.com/Location\022K" + + "\n\021data_labeling_job\030\002 \001(\0132+.google.cloud" + + ".aiplatform.v1.DataLabelingJobB\003\340A\002\"\\\n\031G" + + "etDataLabelingJobRequest\022?\n\004name\030\001 \001(\tB1" + + "\340A\002\372A+\n)aiplatform.googleapis.com/DataLa" + + "belingJob\"\320\001\n\033ListDataLabelingJobsReques" + + "t\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!locations.goo" + + "gleapis.com/Location\022\016\n\006filter\030\002 \001(\t\022\021\n\t" + + "page_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\022-\n\tr" + + "ead_mask\030\005 \001(\0132\032.google.protobuf.FieldMa" + + "sk\022\020\n\010order_by\030\006 \001(\t\"\200\001\n\034ListDataLabelin" + + "gJobsResponse\022G\n\022data_labeling_jobs\030\001 \003(" + + "\0132+.google.cloud.aiplatform.v1.DataLabel" + + "ingJob\022\027\n\017next_page_token\030\002 \001(\t\"_\n\034Delet" + + "eDataLabelingJobRequest\022?\n\004name\030\001 \001(\tB1\340" + + "A\002\372A+\n)aiplatform.googleapis.com/DataLab" + + "elingJob\"_\n\034CancelDataLabelingJobRequest" + + "\022?\n\004name\030\001 \001(\tB1\340A\002\372A+\n)aiplatform.googl" + + "eapis.com/DataLabelingJob\"\276\001\n$CreateHype" + + "rparameterTuningJobRequest\0229\n\006parent\030\001 \001" + + "(\tB)\340A\002\372A#\n!locations.googleapis.com/Loc" + + "ation\022[\n\031hyperparameter_tuning_job\030\002 \001(\013" + + "23.google.cloud.aiplatform.v1.Hyperparam" + + "eterTuningJobB\003\340A\002\"l\n!GetHyperparameterT" + + "uningJobRequest\022G\n\004name\030\001 \001(\tB9\340A\002\372A3\n1a" + + "iplatform.googleapis.com/HyperparameterT" + + "uningJob\"\306\001\n#ListHyperparameterTuningJob" + + "sRequest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!locati" + + "ons.googleapis.com/Location\022\016\n\006filter\030\002 " + + "\001(\t\022\021\n\tpage_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001" + + "(\t\022-\n\tread_mask\030\005 \001(\0132\032.google.protobuf." + + "FieldMask\"\230\001\n$ListHyperparameterTuningJo" + + "bsResponse\022W\n\032hyperparameter_tuning_jobs" + + "\030\001 \003(\01323.google.cloud.aiplatform.v1.Hype" + + "rparameterTuningJob\022\027\n\017next_page_token\030\002" + + " \001(\t\"o\n$DeleteHyperparameterTuningJobReq" + + "uest\022G\n\004name\030\001 \001(\tB9\340A\002\372A3\n1aiplatform.g" + + "oogleapis.com/HyperparameterTuningJob\"o\n" + + "$CancelHyperparameterTuningJobRequest\022G\n" + + "\004name\030\001 \001(\tB9\340A\002\372A3\n1aiplatform.googleap" + + "is.com/HyperparameterTuningJob\"\212\001\n\023Creat" + + "eNasJobRequest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!" + + "locations.googleapis.com/Location\0228\n\007nas" + + "_job\030\002 \001(\0132\".google.cloud.aiplatform.v1." + + "NasJobB\003\340A\002\"J\n\020GetNasJobRequest\0226\n\004name\030" + + "\001 \001(\tB(\340A\002\372A\"\n aiplatform.googleapis.com" + + "/NasJob\"\265\001\n\022ListNasJobsRequest\0229\n\006parent" + + "\030\001 \001(\tB)\340A\002\372A#\n!locations.googleapis.com" + + "/Location\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage_size\030\003" + + " \001(\005\022\022\n\npage_token\030\004 \001(\t\022-\n\tread_mask\030\005 " + + "\001(\0132\032.google.protobuf.FieldMask\"d\n\023ListN" + + "asJobsResponse\0224\n\010nas_jobs\030\001 \003(\0132\".googl" + + "e.cloud.aiplatform.v1.NasJob\022\027\n\017next_pag" + + "e_token\030\002 \001(\t\"M\n\023DeleteNasJobRequest\0226\n\004" + + "name\030\001 \001(\tB(\340A\002\372A\"\n aiplatform.googleapi" + + "s.com/NasJob\"M\n\023CancelNasJobRequest\0226\n\004n" + + "ame\030\001 \001(\tB(\340A\002\372A\"\n aiplatform.googleapis" + + ".com/NasJob\"Z\n\030GetNasTrialDetailRequest\022" + + ">\n\004name\030\001 \001(\tB0\340A\002\372A*\n(aiplatform.google" + + "apis.com/NasTrialDetail\"}\n\032ListNasTrialD" + + "etailsRequest\0228\n\006parent\030\001 \001(\tB(\340A\002\372A\"\n a" + + "iplatform.googleapis.com/NasJob\022\021\n\tpage_" + + "size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"}\n\033ListNa" + + "sTrialDetailsResponse\022E\n\021nas_trial_detai" + + "ls\030\001 \003(\0132*.google.cloud.aiplatform.v1.Na" + + "sTrialDetail\022\027\n\017next_page_token\030\002 \001(\t\"\257\001" + + "\n\037CreateBatchPredictionJobRequest\0229\n\006par" + + "ent\030\001 \001(\tB)\340A\002\372A#\n!locations.googleapis." + + "com/Location\022Q\n\024batch_prediction_job\030\002 \001" + + "(\0132..google.cloud.aiplatform.v1.BatchPre" + + "dictionJobB\003\340A\002\"b\n\034GetBatchPredictionJob" + + "Request\022B\n\004name\030\001 \001(\tB4\340A\002\372A.\n,aiplatfor" + + "m.googleapis.com/BatchPredictionJob\"\301\001\n\036" + + "ListBatchPredictionJobsRequest\0229\n\006parent" + + "\030\001 \001(\tB)\340A\002\372A#\n!locations.googleapis.com" + + "/Location\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage_size\030\003" + + " \001(\005\022\022\n\npage_token\030\004 \001(\t\022-\n\tread_mask\030\005 " + + "\001(\0132\032.google.protobuf.FieldMask\"\211\001\n\037List" + + "BatchPredictionJobsResponse\022M\n\025batch_pre" + + "diction_jobs\030\001 \003(\0132..google.cloud.aiplat" + + "form.v1.BatchPredictionJob\022\027\n\017next_page_" + + "token\030\002 \001(\t\"e\n\037DeleteBatchPredictionJobR" + + "equest\022B\n\004name\030\001 \001(\tB4\340A\002\372A.\n,aiplatform" + + ".googleapis.com/BatchPredictionJob\"e\n\037Ca" + + "ncelBatchPredictionJobRequest\022B\n\004name\030\001 " + + "\001(\tB4\340A\002\372A.\n,aiplatform.googleapis.com/B" + + "atchPredictionJob\"\316\001\n)CreateModelDeploym" + + "entMonitoringJobRequest\0229\n\006parent\030\001 \001(\tB" + + ")\340A\002\372A#\n!locations.googleapis.com/Locati" + + "on\022f\n\037model_deployment_monitoring_job\030\002 " + + "\001(\01328.google.cloud.aiplatform.v1.ModelDe" + + "ploymentMonitoringJobB\003\340A\002\"\357\004\n4SearchMod" + + "elDeploymentMonitoringStatsAnomaliesRequ" + + "est\022g\n\037model_deployment_monitoring_job\030\001" + + " \001(\tB>\340A\002\372A8\n6aiplatform.googleapis.com/" + + "ModelDeploymentMonitoringJob\022\036\n\021deployed" + + "_model_id\030\002 \001(\tB\003\340A\002\022\034\n\024feature_display_" + + "name\030\003 \001(\t\022\201\001\n\nobjectives\030\004 \003(\0132h.google" + + ".cloud.aiplatform.v1.SearchModelDeployme" + + "ntMonitoringStatsAnomaliesRequest.StatsA" + + "nomaliesObjectiveB\003\340A\002\022\021\n\tpage_size\030\005 \001(" + + "\005\022\022\n\npage_token\030\006 \001(\t\022.\n\nstart_time\030\007 \001(" + + "\0132\032.google.protobuf.Timestamp\022,\n\010end_tim" + + "e\030\010 \001(\0132\032.google.protobuf.Timestamp\032\206\001\n\027" + + "StatsAnomaliesObjective\022P\n\004type\030\001 \001(\0162B." + + "google.cloud.aiplatform.v1.ModelDeployme" + + "ntMonitoringObjectiveType\022\031\n\021top_feature" + + "_count\030\004 \001(\005\"\245\001\n5SearchModelDeploymentMo" + + "nitoringStatsAnomaliesResponse\022S\n\020monito" + + "ring_stats\030\001 \003(\01329.google.cloud.aiplatfo" + + "rm.v1.ModelMonitoringStatsAnomalies\022\027\n\017n" + + "ext_page_token\030\002 \001(\t\"v\n&GetModelDeployme" + + "ntMonitoringJobRequest\022L\n\004name\030\001 \001(\tB>\340A" + + "\002\372A8\n6aiplatform.googleapis.com/ModelDep" + + "loymentMonitoringJob\"\313\001\n(ListModelDeploy" + + "mentMonitoringJobsRequest\0229\n\006parent\030\001 \001(" + + "\tB)\340A\002\372A#\n!locations.googleapis.com/Loca" + + "tion\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022" + + "\022\n\npage_token\030\004 \001(\t\022-\n\tread_mask\030\005 \001(\0132\032" + + ".google.protobuf.FieldMask\"\250\001\n)ListModel" + + "DeploymentMonitoringJobsResponse\022b\n mode" + + "l_deployment_monitoring_jobs\030\001 \003(\01328.goo" + "gle.cloud.aiplatform.v1.ModelDeploymentM" - + "onitoringJobB\003\340A\002\"\357\004\n4SearchModelDeploym" - + "entMonitoringStatsAnomaliesRequest\022g\n\037mo" - + "del_deployment_monitoring_job\030\001 \001(\tB>\340A\002" - + "\372A8\n6aiplatform.googleapis.com/ModelDepl" - + "oymentMonitoringJob\022\036\n\021deployed_model_id" - + "\030\002 \001(\tB\003\340A\002\022\034\n\024feature_display_name\030\003 \001(" - + "\t\022\201\001\n\nobjectives\030\004 \003(\0132h.google.cloud.ai" - + "platform.v1.SearchModelDeploymentMonitor" - + "ingStatsAnomaliesRequest.StatsAnomaliesO" - + "bjectiveB\003\340A\002\022\021\n\tpage_size\030\005 \001(\005\022\022\n\npage" - + "_token\030\006 \001(\t\022.\n\nstart_time\030\007 \001(\0132\032.googl" - + "e.protobuf.Timestamp\022,\n\010end_time\030\010 \001(\0132\032" - + ".google.protobuf.Timestamp\032\206\001\n\027StatsAnom" - + "aliesObjective\022P\n\004type\030\001 \001(\0162B.google.cl" - + "oud.aiplatform.v1.ModelDeploymentMonitor" - + "ingObjectiveType\022\031\n\021top_feature_count\030\004 " - + "\001(\005\"\245\001\n5SearchModelDeploymentMonitoringS" - + "tatsAnomaliesResponse\022S\n\020monitoring_stat" - + "s\030\001 \003(\01329.google.cloud.aiplatform.v1.Mod" - + "elMonitoringStatsAnomalies\022\027\n\017next_page_" - + "token\030\002 \001(\t\"v\n&GetModelDeploymentMonitor" - + "ingJobRequest\022L\n\004name\030\001 \001(\tB>\340A\002\372A8\n6aip" - + "latform.googleapis.com/ModelDeploymentMo" - + "nitoringJob\"\313\001\n(ListModelDeploymentMonit" - + "oringJobsRequest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#" - + "\n!locations.googleapis.com/Location\022\016\n\006f" - + "ilter\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022\022\n\npage_t" - + "oken\030\004 \001(\t\022-\n\tread_mask\030\005 \001(\0132\032.google.p" - + "rotobuf.FieldMask\"\250\001\n)ListModelDeploymen" - + "tMonitoringJobsResponse\022b\n model_deploym" - + "ent_monitoring_jobs\030\001 \003(\01328.google.cloud" - + ".aiplatform.v1.ModelDeploymentMonitoring" - + "Job\022\027\n\017next_page_token\030\002 \001(\t\"\311\001\n)UpdateM" - + "odelDeploymentMonitoringJobRequest\022f\n\037mo" - + "del_deployment_monitoring_job\030\001 \001(\01328.go" - + "ogle.cloud.aiplatform.v1.ModelDeployment" - + "MonitoringJobB\003\340A\002\0224\n\013update_mask\030\002 \001(\0132" - + "\032.google.protobuf.FieldMaskB\003\340A\002\"y\n)Dele" - + "teModelDeploymentMonitoringJobRequest\022L\n" - + "\004name\030\001 \001(\tB>\340A\002\372A8\n6aiplatform.googleap" - + "is.com/ModelDeploymentMonitoringJob\"x\n(P" - + "auseModelDeploymentMonitoringJobRequest\022" - + "L\n\004name\030\001 \001(\tB>\340A\002\372A8\n6aiplatform.google" - + "apis.com/ModelDeploymentMonitoringJob\"y\n" - + ")ResumeModelDeploymentMonitoringJobReque" - + "st\022L\n\004name\030\001 \001(\tB>\340A\002\372A8\n6aiplatform.goo" - + "gleapis.com/ModelDeploymentMonitoringJob" - + "\"\205\001\n3UpdateModelDeploymentMonitoringJobO" - + "perationMetadata\022N\n\020generic_metadata\030\001 \001" - + "(\01324.google.cloud.aiplatform.v1.GenericO" - + "perationMetadata2\2475\n\nJobService\022\304\001\n\017Crea" - + "teCustomJob\0222.google.cloud.aiplatform.v1" - + ".CreateCustomJobRequest\032%.google.cloud.a" - + "iplatform.v1.CustomJob\"V\202\323\344\223\002<\"./v1/{par" - + "ent=projects/*/locations/*}/customJobs:\n" - + "custom_job\332A\021parent,custom_job\022\245\001\n\014GetCu" - + "stomJob\022/.google.cloud.aiplatform.v1.Get" - + "CustomJobRequest\032%.google.cloud.aiplatfo" - + "rm.v1.CustomJob\"=\202\323\344\223\0020\022./v1/{name=proje" - + "cts/*/locations/*/customJobs/*}\332A\004name\022\270" - + "\001\n\016ListCustomJobs\0221.google.cloud.aiplatf" - + "orm.v1.ListCustomJobsRequest\0322.google.cl" - + "oud.aiplatform.v1.ListCustomJobsResponse" - + "\"?\202\323\344\223\0020\022./v1/{parent=projects/*/locatio" - + "ns/*}/customJobs\332A\006parent\022\326\001\n\017DeleteCust" - + "omJob\0222.google.cloud.aiplatform.v1.Delet" - + "eCustomJobRequest\032\035.google.longrunning.O" - + "peration\"p\202\323\344\223\0020*./v1/{name=projects/*/l" - + "ocations/*/customJobs/*}\332A\004name\312A0\n\025goog" - + "le.protobuf.Empty\022\027DeleteOperationMetada" - + "ta\022\246\001\n\017CancelCustomJob\0222.google.cloud.ai" - + "platform.v1.CancelCustomJobRequest\032\026.goo" - + "gle.protobuf.Empty\"G\202\323\344\223\002:\"5/v1/{name=pr" - + "ojects/*/locations/*/customJobs/*}:cance" - + "l:\001*\332A\004name\022\352\001\n\025CreateDataLabelingJob\0228." - + "google.cloud.aiplatform.v1.CreateDataLab" + + "onitoringJob\022\027\n\017next_page_token\030\002 \001(\t\"\311\001" + + "\n)UpdateModelDeploymentMonitoringJobRequ" + + "est\022f\n\037model_deployment_monitoring_job\030\001" + + " \001(\01328.google.cloud.aiplatform.v1.ModelD" + + "eploymentMonitoringJobB\003\340A\002\0224\n\013update_ma" + + "sk\030\002 \001(\0132\032.google.protobuf.FieldMaskB\003\340A" + + "\002\"y\n)DeleteModelDeploymentMonitoringJobR" + + "equest\022L\n\004name\030\001 \001(\tB>\340A\002\372A8\n6aiplatform" + + ".googleapis.com/ModelDeploymentMonitorin" + + "gJob\"x\n(PauseModelDeploymentMonitoringJo" + + "bRequest\022L\n\004name\030\001 \001(\tB>\340A\002\372A8\n6aiplatfo" + + "rm.googleapis.com/ModelDeploymentMonitor" + + "ingJob\"y\n)ResumeModelDeploymentMonitorin" + + "gJobRequest\022L\n\004name\030\001 \001(\tB>\340A\002\372A8\n6aipla" + + "tform.googleapis.com/ModelDeploymentMoni" + + "toringJob\"\205\001\n3UpdateModelDeploymentMonit" + + "oringJobOperationMetadata\022N\n\020generic_met" + + "adata\030\001 \001(\01324.google.cloud.aiplatform.v1" + + ".GenericOperationMetadata2\360?\n\nJobService" + + "\022\304\001\n\017CreateCustomJob\0222.google.cloud.aipl" + + "atform.v1.CreateCustomJobRequest\032%.googl" + + "e.cloud.aiplatform.v1.CustomJob\"V\202\323\344\223\002<\"" + + "./v1/{parent=projects/*/locations/*}/cus" + + "tomJobs:\ncustom_job\332A\021parent,custom_job\022" + + "\245\001\n\014GetCustomJob\022/.google.cloud.aiplatfo" + + "rm.v1.GetCustomJobRequest\032%.google.cloud" + + ".aiplatform.v1.CustomJob\"=\202\323\344\223\0020\022./v1/{n" + + "ame=projects/*/locations/*/customJobs/*}" + + "\332A\004name\022\270\001\n\016ListCustomJobs\0221.google.clou" + + "d.aiplatform.v1.ListCustomJobsRequest\0322." + + "google.cloud.aiplatform.v1.ListCustomJob" + + "sResponse\"?\202\323\344\223\0020\022./v1/{parent=projects/" + + "*/locations/*}/customJobs\332A\006parent\022\326\001\n\017D" + + "eleteCustomJob\0222.google.cloud.aiplatform" + + ".v1.DeleteCustomJobRequest\032\035.google.long" + + "running.Operation\"p\202\323\344\223\0020*./v1/{name=pro" + + "jects/*/locations/*/customJobs/*}\332A\004name" + + "\312A0\n\025google.protobuf.Empty\022\027DeleteOperat" + + "ionMetadata\022\246\001\n\017CancelCustomJob\0222.google" + + ".cloud.aiplatform.v1.CancelCustomJobRequ" + + "est\032\026.google.protobuf.Empty\"G\202\323\344\223\002:\"5/v1" + + "/{name=projects/*/locations/*/customJobs" + + "/*}:cancel:\001*\332A\004name\022\352\001\n\025CreateDataLabel" + + "ingJob\0228.google.cloud.aiplatform.v1.Crea" + + "teDataLabelingJobRequest\032+.google.cloud." + + "aiplatform.v1.DataLabelingJob\"j\202\323\344\223\002I\"4/" + + "v1/{parent=projects/*/locations/*}/dataL" + + "abelingJobs:\021data_labeling_job\332A\030parent," + + "data_labeling_job\022\275\001\n\022GetDataLabelingJob" + + "\0225.google.cloud.aiplatform.v1.GetDataLab" + "elingJobRequest\032+.google.cloud.aiplatfor" - + "m.v1.DataLabelingJob\"j\202\323\344\223\002I\"4/v1/{paren" - + "t=projects/*/locations/*}/dataLabelingJo" - + "bs:\021data_labeling_job\332A\030parent,data_labe" - + "ling_job\022\275\001\n\022GetDataLabelingJob\0225.google" - + ".cloud.aiplatform.v1.GetDataLabelingJobR" - + "equest\032+.google.cloud.aiplatform.v1.Data" - + "LabelingJob\"C\202\323\344\223\0026\0224/v1/{name=projects/" - + "*/locations/*/dataLabelingJobs/*}\332A\004name" - + "\022\320\001\n\024ListDataLabelingJobs\0227.google.cloud" - + ".aiplatform.v1.ListDataLabelingJobsReque" - + "st\0328.google.cloud.aiplatform.v1.ListData" - + "LabelingJobsResponse\"E\202\323\344\223\0026\0224/v1/{paren" - + "t=projects/*/locations/*}/dataLabelingJo" - + "bs\332A\006parent\022\350\001\n\025DeleteDataLabelingJob\0228." - + "google.cloud.aiplatform.v1.DeleteDataLab" - + "elingJobRequest\032\035.google.longrunning.Ope" - + "ration\"v\202\323\344\223\0026*4/v1/{name=projects/*/loc" - + "ations/*/dataLabelingJobs/*}\332A\004name\312A0\n\025" + + "m.v1.DataLabelingJob\"C\202\323\344\223\0026\0224/v1/{name=" + + "projects/*/locations/*/dataLabelingJobs/" + + "*}\332A\004name\022\320\001\n\024ListDataLabelingJobs\0227.goo" + + "gle.cloud.aiplatform.v1.ListDataLabeling" + + "JobsRequest\0328.google.cloud.aiplatform.v1" + + ".ListDataLabelingJobsResponse\"E\202\323\344\223\0026\0224/" + + "v1/{parent=projects/*/locations/*}/dataL" + + "abelingJobs\332A\006parent\022\350\001\n\025DeleteDataLabel" + + "ingJob\0228.google.cloud.aiplatform.v1.Dele" + + "teDataLabelingJobRequest\032\035.google.longru" + + "nning.Operation\"v\202\323\344\223\0026*4/v1/{name=proje" + + "cts/*/locations/*/dataLabelingJobs/*}\332A\004" + + "name\312A0\n\025google.protobuf.Empty\022\027DeleteOp" + + "erationMetadata\022\270\001\n\025CancelDataLabelingJo" + + "b\0228.google.cloud.aiplatform.v1.CancelDat" + + "aLabelingJobRequest\032\026.google.protobuf.Em" + + "pty\"M\202\323\344\223\002@\";/v1/{name=projects/*/locati" + + "ons/*/dataLabelingJobs/*}:cancel:\001*\332A\004na" + + "me\022\233\002\n\035CreateHyperparameterTuningJob\022@.g" + + "oogle.cloud.aiplatform.v1.CreateHyperpar" + + "ameterTuningJobRequest\0323.google.cloud.ai" + + "platform.v1.HyperparameterTuningJob\"\202\001\202\323" + + "\344\223\002Y\"\022\022*\022\022*/v1/{name=proj" - + "ects/*/locations/*/batchPredictionJobs/*" - + "}:cancel:\001*\332A\004name\022\273\002\n\"CreateModelDeploy" - + "mentMonitoringJob\022E.google.cloud.aiplatf" - + "orm.v1.CreateModelDeploymentMonitoringJo" - + "bRequest\0328.google.cloud.aiplatform.v1.Mo" - + "delDeploymentMonitoringJob\"\223\001\202\323\344\223\002d\"A/v1" - + "/{parent=projects/*/locations/*}/modelDe" - + "ploymentMonitoringJobs:\037model_deployment" - + "_monitoring_job\332A&parent,model_deploymen" - + "t_monitoring_job\022\242\003\n-SearchModelDeployme" - + "ntMonitoringStatsAnomalies\022P.google.clou" - + "d.aiplatform.v1.SearchModelDeploymentMon" - + "itoringStatsAnomaliesRequest\032Q.google.cl" - + "oud.aiplatform.v1.SearchModelDeploymentM" - + "onitoringStatsAnomaliesResponse\"\313\001\202\323\344\223\002\220" - + "\001\"\212\001/v1/{model_deployment_monitoring_job" - + "=projects/*/locations/*/modelDeploymentM" - + "onitoringJobs/*}:searchModelDeploymentMo" - + "nitoringStatsAnomalies:\001*\332A1model_deploy" - + "ment_monitoring_job,deployed_model_id\022\361\001" - + "\n\037GetModelDeploymentMonitoringJob\022B.goog" - + "le.cloud.aiplatform.v1.GetModelDeploymen" - + "tMonitoringJobRequest\0328.google.cloud.aip" - + "latform.v1.ModelDeploymentMonitoringJob\"" - + "P\202\323\344\223\002C\022A/v1/{name=projects/*/locations/" - + "*/modelDeploymentMonitoringJobs/*}\332A\004nam" - + "e\022\204\002\n!ListModelDeploymentMonitoringJobs\022" - + "D.google.cloud.aiplatform.v1.ListModelDe" - + "ploymentMonitoringJobsRequest\032E.google.c" - + "loud.aiplatform.v1.ListModelDeploymentMo" - + "nitoringJobsResponse\"R\202\323\344\223\002C\022A/v1/{paren" - + "t=projects/*/locations/*}/modelDeploymen" - + "tMonitoringJobs\332A\006parent\022\234\003\n\"UpdateModel" - + "DeploymentMonitoringJob\022E.google.cloud.a" - + "iplatform.v1.UpdateModelDeploymentMonito" - + "ringJobRequest\032\035.google.longrunning.Oper" - + "ation\"\217\002\202\323\344\223\002\204\0012a/v1/{model_deployment_m" - + "onitoring_job.name=projects/*/locations/" - + "*/modelDeploymentMonitoringJobs/*}:\037mode" - + "l_deployment_monitoring_job\332A+model_depl" - + "oyment_monitoring_job,update_mask\312AS\n\034Mo" - + "delDeploymentMonitoringJob\0223UpdateModelD" - + "eploymentMonitoringJobOperationMetadata\022" - + "\220\002\n\"DeleteModelDeploymentMonitoringJob\022E" - + ".google.cloud.aiplatform.v1.DeleteModelD" - + "eploymentMonitoringJobRequest\032\035.google.l" - + "ongrunning.Operation\"\203\001\202\323\344\223\002C*A/v1/{name" - + "=projects/*/locations/*/modelDeploymentM" - + "onitoringJobs/*}\332A\004name\312A0\n\025google.proto" - + "buf.Empty\022\027DeleteOperationMetadata\022\334\001\n!P" - + "auseModelDeploymentMonitoringJob\022D.googl" - + "e.cloud.aiplatform.v1.PauseModelDeployme" - + "ntMonitoringJobRequest\032\026.google.protobuf" - + ".Empty\"Y\202\323\344\223\002L\"G/v1/{name=projects/*/loc" - + "ations/*/modelDeploymentMonitoringJobs/*" - + "}:pause:\001*\332A\004name\022\337\001\n\"ResumeModelDeploym" - + "entMonitoringJob\022E.google.cloud.aiplatfo" - + "rm.v1.ResumeModelDeploymentMonitoringJob" - + "Request\032\026.google.protobuf.Empty\"Z\202\323\344\223\002M\"" - + "H/v1/{name=projects/*/locations/*/modelD" - + "eploymentMonitoringJobs/*}:resume:\001*\332A\004n" - + "ame\032M\312A\031aiplatform.googleapis.com\322A.http" - + "s://www.googleapis.com/auth/cloud-platfo" - + "rmB\315\001\n\036com.google.cloud.aiplatform.v1B\017J" - + "obServiceProtoP\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" + + "tadata\022\301\001\n\030CancelBatchPredictionJob\022;.go" + + "ogle.cloud.aiplatform.v1.CancelBatchPred" + + "ictionJobRequest\032\026.google.protobuf.Empty" + + "\"P\202\323\344\223\002C\">/v1/{name=projects/*/locations" + + "/*/batchPredictionJobs/*}:cancel:\001*\332A\004na" + + "me\022\273\002\n\"CreateModelDeploymentMonitoringJo" + + "b\022E.google.cloud.aiplatform.v1.CreateMod" + + "elDeploymentMonitoringJobRequest\0328.googl" + + "e.cloud.aiplatform.v1.ModelDeploymentMon" + + "itoringJob\"\223\001\202\323\344\223\002d\"A/v1/{parent=project" + + "s/*/locations/*}/modelDeploymentMonitori" + + "ngJobs:\037model_deployment_monitoring_job\332" + + "A&parent,model_deployment_monitoring_job" + + "\022\242\003\n-SearchModelDeploymentMonitoringStat" + + "sAnomalies\022P.google.cloud.aiplatform.v1." + + "SearchModelDeploymentMonitoringStatsAnom" + + "aliesRequest\032Q.google.cloud.aiplatform.v" + + "1.SearchModelDeploymentMonitoringStatsAn" + + "omaliesResponse\"\313\001\202\323\344\223\002\220\001\"\212\001/v1/{model_d" + + "eployment_monitoring_job=projects/*/loca" + + "tions/*/modelDeploymentMonitoringJobs/*}" + + ":searchModelDeploymentMonitoringStatsAno" + + "malies:\001*\332A1model_deployment_monitoring_" + + "job,deployed_model_id\022\361\001\n\037GetModelDeploy" + + "mentMonitoringJob\022B.google.cloud.aiplatf" + + "orm.v1.GetModelDeploymentMonitoringJobRe" + + "quest\0328.google.cloud.aiplatform.v1.Model" + + "DeploymentMonitoringJob\"P\202\323\344\223\002C\022A/v1/{na" + + "me=projects/*/locations/*/modelDeploymen" + + "tMonitoringJobs/*}\332A\004name\022\204\002\n!ListModelD" + + "eploymentMonitoringJobs\022D.google.cloud.a" + + "iplatform.v1.ListModelDeploymentMonitori" + + "ngJobsRequest\032E.google.cloud.aiplatform." + + "v1.ListModelDeploymentMonitoringJobsResp" + + "onse\"R\202\323\344\223\002C\022A/v1/{parent=projects/*/loc" + + "ations/*}/modelDeploymentMonitoringJobs\332" + + "A\006parent\022\234\003\n\"UpdateModelDeploymentMonito" + + "ringJob\022E.google.cloud.aiplatform.v1.Upd" + + "ateModelDeploymentMonitoringJobRequest\032\035" + + ".google.longrunning.Operation\"\217\002\202\323\344\223\002\204\0012" + + "a/v1/{model_deployment_monitoring_job.na" + + "me=projects/*/locations/*/modelDeploymen" + + "tMonitoringJobs/*}:\037model_deployment_mon" + + "itoring_job\332A+model_deployment_monitorin" + + "g_job,update_mask\312AS\n\034ModelDeploymentMon" + + "itoringJob\0223UpdateModelDeploymentMonitor" + + "ingJobOperationMetadata\022\220\002\n\"DeleteModelD" + + "eploymentMonitoringJob\022E.google.cloud.ai" + + "platform.v1.DeleteModelDeploymentMonitor" + + "ingJobRequest\032\035.google.longrunning.Opera" + + "tion\"\203\001\202\323\344\223\002C*A/v1/{name=projects/*/loca" + + "tions/*/modelDeploymentMonitoringJobs/*}" + + "\332A\004name\312A0\n\025google.protobuf.Empty\022\027Delet" + + "eOperationMetadata\022\334\001\n!PauseModelDeploym" + + "entMonitoringJob\022D.google.cloud.aiplatfo" + + "rm.v1.PauseModelDeploymentMonitoringJobR" + + "equest\032\026.google.protobuf.Empty\"Y\202\323\344\223\002L\"G" + + "/v1/{name=projects/*/locations/*/modelDe" + + "ploymentMonitoringJobs/*}:pause:\001*\332A\004nam" + + "e\022\337\001\n\"ResumeModelDeploymentMonitoringJob" + + "\022E.google.cloud.aiplatform.v1.ResumeMode" + + "lDeploymentMonitoringJobRequest\032\026.google" + + ".protobuf.Empty\"Z\202\323\344\223\002M\"H/v1/{name=proje" + + "cts/*/locations/*/modelDeploymentMonitor" + + "ingJobs/*}:resume:\001*\332A\004name\032\206\001\312A\031aiplatf" + + "orm.googleapis.com\322Aghttps://www.googlea" + + "pis.com/auth/cloud-platform,https://www." + + "googleapis.com/auth/cloud-platform.read-" + + "onlyB\315\001\n\036com.google.cloud.aiplatform.v1B" + + "\017JobServiceProtoP\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( @@ -522,6 +618,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.cloud.aiplatform.v1.DataLabelingJobProto.getDescriptor(), com.google.cloud.aiplatform.v1.HyperparameterTuningJobProto.getDescriptor(), com.google.cloud.aiplatform.v1.ModelDeploymentMonitoringJobProto.getDescriptor(), + com.google.cloud.aiplatform.v1.NasJobProto.getDescriptor(), com.google.cloud.aiplatform.v1.OperationProto.getDescriptor(), com.google.longrunning.OperationsProto.getDescriptor(), com.google.protobuf.EmptyProto.getDescriptor(), @@ -672,8 +769,80 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Name", }); - internal_static_google_cloud_aiplatform_v1_CreateBatchPredictionJobRequest_descriptor = + internal_static_google_cloud_aiplatform_v1_CreateNasJobRequest_descriptor = getDescriptor().getMessageTypes().get(18); + internal_static_google_cloud_aiplatform_v1_CreateNasJobRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_CreateNasJobRequest_descriptor, + new java.lang.String[] { + "Parent", "NasJob", + }); + internal_static_google_cloud_aiplatform_v1_GetNasJobRequest_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_google_cloud_aiplatform_v1_GetNasJobRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_GetNasJobRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_aiplatform_v1_ListNasJobsRequest_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_google_cloud_aiplatform_v1_ListNasJobsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ListNasJobsRequest_descriptor, + new java.lang.String[] { + "Parent", "Filter", "PageSize", "PageToken", "ReadMask", + }); + internal_static_google_cloud_aiplatform_v1_ListNasJobsResponse_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_google_cloud_aiplatform_v1_ListNasJobsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ListNasJobsResponse_descriptor, + new java.lang.String[] { + "NasJobs", "NextPageToken", + }); + internal_static_google_cloud_aiplatform_v1_DeleteNasJobRequest_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_google_cloud_aiplatform_v1_DeleteNasJobRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_DeleteNasJobRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_aiplatform_v1_CancelNasJobRequest_descriptor = + getDescriptor().getMessageTypes().get(23); + internal_static_google_cloud_aiplatform_v1_CancelNasJobRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_CancelNasJobRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_aiplatform_v1_GetNasTrialDetailRequest_descriptor = + getDescriptor().getMessageTypes().get(24); + internal_static_google_cloud_aiplatform_v1_GetNasTrialDetailRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_GetNasTrialDetailRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_aiplatform_v1_ListNasTrialDetailsRequest_descriptor = + getDescriptor().getMessageTypes().get(25); + internal_static_google_cloud_aiplatform_v1_ListNasTrialDetailsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ListNasTrialDetailsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_aiplatform_v1_ListNasTrialDetailsResponse_descriptor = + getDescriptor().getMessageTypes().get(26); + internal_static_google_cloud_aiplatform_v1_ListNasTrialDetailsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_ListNasTrialDetailsResponse_descriptor, + new java.lang.String[] { + "NasTrialDetails", "NextPageToken", + }); + internal_static_google_cloud_aiplatform_v1_CreateBatchPredictionJobRequest_descriptor = + getDescriptor().getMessageTypes().get(27); internal_static_google_cloud_aiplatform_v1_CreateBatchPredictionJobRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_CreateBatchPredictionJobRequest_descriptor, @@ -681,7 +850,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "BatchPredictionJob", }); internal_static_google_cloud_aiplatform_v1_GetBatchPredictionJobRequest_descriptor = - getDescriptor().getMessageTypes().get(19); + getDescriptor().getMessageTypes().get(28); internal_static_google_cloud_aiplatform_v1_GetBatchPredictionJobRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_GetBatchPredictionJobRequest_descriptor, @@ -689,7 +858,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_aiplatform_v1_ListBatchPredictionJobsRequest_descriptor = - getDescriptor().getMessageTypes().get(20); + getDescriptor().getMessageTypes().get(29); internal_static_google_cloud_aiplatform_v1_ListBatchPredictionJobsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_ListBatchPredictionJobsRequest_descriptor, @@ -697,7 +866,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "Filter", "PageSize", "PageToken", "ReadMask", }); internal_static_google_cloud_aiplatform_v1_ListBatchPredictionJobsResponse_descriptor = - getDescriptor().getMessageTypes().get(21); + getDescriptor().getMessageTypes().get(30); internal_static_google_cloud_aiplatform_v1_ListBatchPredictionJobsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_ListBatchPredictionJobsResponse_descriptor, @@ -705,7 +874,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "BatchPredictionJobs", "NextPageToken", }); internal_static_google_cloud_aiplatform_v1_DeleteBatchPredictionJobRequest_descriptor = - getDescriptor().getMessageTypes().get(22); + getDescriptor().getMessageTypes().get(31); internal_static_google_cloud_aiplatform_v1_DeleteBatchPredictionJobRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_DeleteBatchPredictionJobRequest_descriptor, @@ -713,7 +882,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_aiplatform_v1_CancelBatchPredictionJobRequest_descriptor = - getDescriptor().getMessageTypes().get(23); + getDescriptor().getMessageTypes().get(32); internal_static_google_cloud_aiplatform_v1_CancelBatchPredictionJobRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_CancelBatchPredictionJobRequest_descriptor, @@ -721,7 +890,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_aiplatform_v1_CreateModelDeploymentMonitoringJobRequest_descriptor = - getDescriptor().getMessageTypes().get(24); + getDescriptor().getMessageTypes().get(33); internal_static_google_cloud_aiplatform_v1_CreateModelDeploymentMonitoringJobRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_CreateModelDeploymentMonitoringJobRequest_descriptor, @@ -729,7 +898,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "ModelDeploymentMonitoringJob", }); internal_static_google_cloud_aiplatform_v1_SearchModelDeploymentMonitoringStatsAnomaliesRequest_descriptor = - getDescriptor().getMessageTypes().get(25); + getDescriptor().getMessageTypes().get(34); internal_static_google_cloud_aiplatform_v1_SearchModelDeploymentMonitoringStatsAnomaliesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_SearchModelDeploymentMonitoringStatsAnomaliesRequest_descriptor, @@ -754,7 +923,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Type", "TopFeatureCount", }); internal_static_google_cloud_aiplatform_v1_SearchModelDeploymentMonitoringStatsAnomaliesResponse_descriptor = - getDescriptor().getMessageTypes().get(26); + getDescriptor().getMessageTypes().get(35); internal_static_google_cloud_aiplatform_v1_SearchModelDeploymentMonitoringStatsAnomaliesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_SearchModelDeploymentMonitoringStatsAnomaliesResponse_descriptor, @@ -762,7 +931,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "MonitoringStats", "NextPageToken", }); internal_static_google_cloud_aiplatform_v1_GetModelDeploymentMonitoringJobRequest_descriptor = - getDescriptor().getMessageTypes().get(27); + getDescriptor().getMessageTypes().get(36); internal_static_google_cloud_aiplatform_v1_GetModelDeploymentMonitoringJobRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_GetModelDeploymentMonitoringJobRequest_descriptor, @@ -770,7 +939,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_aiplatform_v1_ListModelDeploymentMonitoringJobsRequest_descriptor = - getDescriptor().getMessageTypes().get(28); + getDescriptor().getMessageTypes().get(37); internal_static_google_cloud_aiplatform_v1_ListModelDeploymentMonitoringJobsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_ListModelDeploymentMonitoringJobsRequest_descriptor, @@ -778,7 +947,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "Filter", "PageSize", "PageToken", "ReadMask", }); internal_static_google_cloud_aiplatform_v1_ListModelDeploymentMonitoringJobsResponse_descriptor = - getDescriptor().getMessageTypes().get(29); + getDescriptor().getMessageTypes().get(38); internal_static_google_cloud_aiplatform_v1_ListModelDeploymentMonitoringJobsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_ListModelDeploymentMonitoringJobsResponse_descriptor, @@ -786,7 +955,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ModelDeploymentMonitoringJobs", "NextPageToken", }); internal_static_google_cloud_aiplatform_v1_UpdateModelDeploymentMonitoringJobRequest_descriptor = - getDescriptor().getMessageTypes().get(30); + getDescriptor().getMessageTypes().get(39); internal_static_google_cloud_aiplatform_v1_UpdateModelDeploymentMonitoringJobRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_UpdateModelDeploymentMonitoringJobRequest_descriptor, @@ -794,7 +963,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ModelDeploymentMonitoringJob", "UpdateMask", }); internal_static_google_cloud_aiplatform_v1_DeleteModelDeploymentMonitoringJobRequest_descriptor = - getDescriptor().getMessageTypes().get(31); + getDescriptor().getMessageTypes().get(40); internal_static_google_cloud_aiplatform_v1_DeleteModelDeploymentMonitoringJobRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_DeleteModelDeploymentMonitoringJobRequest_descriptor, @@ -802,7 +971,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_aiplatform_v1_PauseModelDeploymentMonitoringJobRequest_descriptor = - getDescriptor().getMessageTypes().get(32); + getDescriptor().getMessageTypes().get(41); internal_static_google_cloud_aiplatform_v1_PauseModelDeploymentMonitoringJobRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_PauseModelDeploymentMonitoringJobRequest_descriptor, @@ -810,7 +979,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_aiplatform_v1_ResumeModelDeploymentMonitoringJobRequest_descriptor = - getDescriptor().getMessageTypes().get(33); + getDescriptor().getMessageTypes().get(42); internal_static_google_cloud_aiplatform_v1_ResumeModelDeploymentMonitoringJobRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_ResumeModelDeploymentMonitoringJobRequest_descriptor, @@ -818,7 +987,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_aiplatform_v1_UpdateModelDeploymentMonitoringJobOperationMetadata_descriptor = - getDescriptor().getMessageTypes().get(34); + getDescriptor().getMessageTypes().get(43); internal_static_google_cloud_aiplatform_v1_UpdateModelDeploymentMonitoringJobOperationMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_UpdateModelDeploymentMonitoringJobOperationMetadata_descriptor, @@ -845,6 +1014,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.cloud.aiplatform.v1.DataLabelingJobProto.getDescriptor(); com.google.cloud.aiplatform.v1.HyperparameterTuningJobProto.getDescriptor(); com.google.cloud.aiplatform.v1.ModelDeploymentMonitoringJobProto.getDescriptor(); + com.google.cloud.aiplatform.v1.NasJobProto.getDescriptor(); com.google.cloud.aiplatform.v1.OperationProto.getDescriptor(); com.google.longrunning.OperationsProto.getDescriptor(); com.google.protobuf.EmptyProto.getDescriptor(); diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListNasJobsRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListNasJobsRequest.java new file mode 100644 index 000000000000..ef114993177d --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListNasJobsRequest.java @@ -0,0 +1,1505 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/job_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for
+ * [JobService.ListNasJobs][google.cloud.aiplatform.v1.JobService.ListNasJobs].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListNasJobsRequest} + */ +public final class ListNasJobsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ListNasJobsRequest) + ListNasJobsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListNasJobsRequest.newBuilder() to construct. + private ListNasJobsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListNasJobsRequest() { + parent_ = ""; + filter_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListNasJobsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListNasJobsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListNasJobsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListNasJobsRequest.class, + com.google.cloud.aiplatform.v1.ListNasJobsRequest.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 NasJobs
+   * 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 NasJobs
+   * 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_ = ""; + /** + * + * + *
+   * The standard list filter.
+   * Supported fields:
+   *   * `display_name` supports `=`, `!=` comparisons, and `:` wildcard.
+   *   * `state` supports `=`, `!=` comparisons.
+   *   * `create_time` supports `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons.
+   *     `create_time` must be in RFC 3339 format.
+   *   * `labels` supports general map functions that is:
+   *     `labels.key=value` - key:value equality
+   *     `labels.key:* - key existence
+   * Some examples of using the filter are:
+   *   * `state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*"`
+   *   * `state!="JOB_STATE_FAILED" OR display_name="my_job"`
+   *   * `NOT display_name="my_job"`
+   *   * `create_time>"2021-05-18T00:00:00Z"`
+   *   * `labels.keyA=valueA`
+   *   * `labels.keyB:*`
+   * 
+ * + * string filter = 2; + * + * @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; + } + } + /** + * + * + *
+   * The standard list filter.
+   * Supported fields:
+   *   * `display_name` supports `=`, `!=` comparisons, and `:` wildcard.
+   *   * `state` supports `=`, `!=` comparisons.
+   *   * `create_time` supports `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons.
+   *     `create_time` must be in RFC 3339 format.
+   *   * `labels` supports general map functions that is:
+   *     `labels.key=value` - key:value equality
+   *     `labels.key:* - key existence
+   * Some examples of using the filter are:
+   *   * `state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*"`
+   *   * `state!="JOB_STATE_FAILED" OR display_name="my_job"`
+   *   * `NOT display_name="my_job"`
+   *   * `create_time>"2021-05-18T00:00:00Z"`
+   *   * `labels.keyA=valueA`
+   *   * `labels.keyB:*`
+   * 
+ * + * string filter = 2; + * + * @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; + /** + * + * + *
+   * The standard list page size.
+   * 
+ * + * int32 page_size = 3; + * + * @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_ = ""; + /** + * + * + *
+   * The standard list page token.
+   * Typically obtained via
+   * [ListNasJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListNasJobsResponse.next_page_token]
+   * of the previous
+   * [JobService.ListNasJobs][google.cloud.aiplatform.v1.JobService.ListNasJobs]
+   * call.
+   * 
+ * + * string page_token = 4; + * + * @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; + } + } + /** + * + * + *
+   * The standard list page token.
+   * Typically obtained via
+   * [ListNasJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListNasJobsResponse.next_page_token]
+   * of the previous
+   * [JobService.ListNasJobs][google.cloud.aiplatform.v1.JobService.ListNasJobs]
+   * call.
+   * 
+ * + * string page_token = 4; + * + * @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_; + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return Whether the readMask field is set. + */ + @java.lang.Override + public boolean hasReadMask() { + return readMask_ != null; + } + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return The readMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getReadMask() { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + + 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 (readMask_ != null) { + output.writeMessage(5, getReadMask()); + } + 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 (readMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getReadMask()); + } + 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.ListNasJobsRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ListNasJobsRequest other = + (com.google.cloud.aiplatform.v1.ListNasJobsRequest) 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 (!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 = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.ListNasJobsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListNasJobsRequest 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.ListNasJobsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListNasJobsRequest 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.ListNasJobsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListNasJobsRequest 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.ListNasJobsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListNasJobsRequest 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.ListNasJobsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListNasJobsRequest 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.ListNasJobsRequest 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.ListNasJobsRequest 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.ListNasJobsRequest 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
+   * [JobService.ListNasJobs][google.cloud.aiplatform.v1.JobService.ListNasJobs].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListNasJobsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ListNasJobsRequest) + com.google.cloud.aiplatform.v1.ListNasJobsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListNasJobsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListNasJobsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListNasJobsRequest.class, + com.google.cloud.aiplatform.v1.ListNasJobsRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ListNasJobsRequest.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_ = ""; + readMask_ = null; + if (readMaskBuilder_ != null) { + readMaskBuilder_.dispose(); + readMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListNasJobsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListNasJobsRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ListNasJobsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListNasJobsRequest build() { + com.google.cloud.aiplatform.v1.ListNasJobsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListNasJobsRequest buildPartial() { + com.google.cloud.aiplatform.v1.ListNasJobsRequest result = + new com.google.cloud.aiplatform.v1.ListNasJobsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.ListNasJobsRequest 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_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.readMask_ = readMaskBuilder_ == null ? readMask_ : readMaskBuilder_.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.ListNasJobsRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.ListNasJobsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ListNasJobsRequest other) { + if (other == com.google.cloud.aiplatform.v1.ListNasJobsRequest.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()); + } + 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 + 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 NasJobs
+     * 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 NasJobs
+     * 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 NasJobs
+     * 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 NasJobs
+     * 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 NasJobs
+     * 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_ = ""; + /** + * + * + *
+     * The standard list filter.
+     * Supported fields:
+     *   * `display_name` supports `=`, `!=` comparisons, and `:` wildcard.
+     *   * `state` supports `=`, `!=` comparisons.
+     *   * `create_time` supports `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons.
+     *     `create_time` must be in RFC 3339 format.
+     *   * `labels` supports general map functions that is:
+     *     `labels.key=value` - key:value equality
+     *     `labels.key:* - key existence
+     * Some examples of using the filter are:
+     *   * `state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*"`
+     *   * `state!="JOB_STATE_FAILED" OR display_name="my_job"`
+     *   * `NOT display_name="my_job"`
+     *   * `create_time>"2021-05-18T00:00:00Z"`
+     *   * `labels.keyA=valueA`
+     *   * `labels.keyB:*`
+     * 
+ * + * string filter = 2; + * + * @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; + } + } + /** + * + * + *
+     * The standard list filter.
+     * Supported fields:
+     *   * `display_name` supports `=`, `!=` comparisons, and `:` wildcard.
+     *   * `state` supports `=`, `!=` comparisons.
+     *   * `create_time` supports `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons.
+     *     `create_time` must be in RFC 3339 format.
+     *   * `labels` supports general map functions that is:
+     *     `labels.key=value` - key:value equality
+     *     `labels.key:* - key existence
+     * Some examples of using the filter are:
+     *   * `state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*"`
+     *   * `state!="JOB_STATE_FAILED" OR display_name="my_job"`
+     *   * `NOT display_name="my_job"`
+     *   * `create_time>"2021-05-18T00:00:00Z"`
+     *   * `labels.keyA=valueA`
+     *   * `labels.keyB:*`
+     * 
+ * + * string filter = 2; + * + * @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; + } + } + /** + * + * + *
+     * The standard list filter.
+     * Supported fields:
+     *   * `display_name` supports `=`, `!=` comparisons, and `:` wildcard.
+     *   * `state` supports `=`, `!=` comparisons.
+     *   * `create_time` supports `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons.
+     *     `create_time` must be in RFC 3339 format.
+     *   * `labels` supports general map functions that is:
+     *     `labels.key=value` - key:value equality
+     *     `labels.key:* - key existence
+     * Some examples of using the filter are:
+     *   * `state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*"`
+     *   * `state!="JOB_STATE_FAILED" OR display_name="my_job"`
+     *   * `NOT display_name="my_job"`
+     *   * `create_time>"2021-05-18T00:00:00Z"`
+     *   * `labels.keyA=valueA`
+     *   * `labels.keyB:*`
+     * 
+ * + * string filter = 2; + * + * @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; + } + /** + * + * + *
+     * The standard list filter.
+     * Supported fields:
+     *   * `display_name` supports `=`, `!=` comparisons, and `:` wildcard.
+     *   * `state` supports `=`, `!=` comparisons.
+     *   * `create_time` supports `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons.
+     *     `create_time` must be in RFC 3339 format.
+     *   * `labels` supports general map functions that is:
+     *     `labels.key=value` - key:value equality
+     *     `labels.key:* - key existence
+     * Some examples of using the filter are:
+     *   * `state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*"`
+     *   * `state!="JOB_STATE_FAILED" OR display_name="my_job"`
+     *   * `NOT display_name="my_job"`
+     *   * `create_time>"2021-05-18T00:00:00Z"`
+     *   * `labels.keyA=valueA`
+     *   * `labels.keyB:*`
+     * 
+ * + * string filter = 2; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list filter.
+     * Supported fields:
+     *   * `display_name` supports `=`, `!=` comparisons, and `:` wildcard.
+     *   * `state` supports `=`, `!=` comparisons.
+     *   * `create_time` supports `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons.
+     *     `create_time` must be in RFC 3339 format.
+     *   * `labels` supports general map functions that is:
+     *     `labels.key=value` - key:value equality
+     *     `labels.key:* - key existence
+     * Some examples of using the filter are:
+     *   * `state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*"`
+     *   * `state!="JOB_STATE_FAILED" OR display_name="my_job"`
+     *   * `NOT display_name="my_job"`
+     *   * `create_time>"2021-05-18T00:00:00Z"`
+     *   * `labels.keyA=valueA`
+     *   * `labels.keyB:*`
+     * 
+ * + * string filter = 2; + * + * @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_; + /** + * + * + *
+     * The standard list page size.
+     * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The standard list page size.
+     * 
+ * + * int32 page_size = 3; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list page size.
+     * 
+ * + * int32 page_size = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000004); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained via
+     * [ListNasJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListNasJobsResponse.next_page_token]
+     * of the previous
+     * [JobService.ListNasJobs][google.cloud.aiplatform.v1.JobService.ListNasJobs]
+     * call.
+     * 
+ * + * string page_token = 4; + * + * @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; + } + } + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained via
+     * [ListNasJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListNasJobsResponse.next_page_token]
+     * of the previous
+     * [JobService.ListNasJobs][google.cloud.aiplatform.v1.JobService.ListNasJobs]
+     * call.
+     * 
+ * + * string page_token = 4; + * + * @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; + } + } + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained via
+     * [ListNasJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListNasJobsResponse.next_page_token]
+     * of the previous
+     * [JobService.ListNasJobs][google.cloud.aiplatform.v1.JobService.ListNasJobs]
+     * call.
+     * 
+ * + * string page_token = 4; + * + * @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; + } + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained via
+     * [ListNasJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListNasJobsResponse.next_page_token]
+     * of the previous
+     * [JobService.ListNasJobs][google.cloud.aiplatform.v1.JobService.ListNasJobs]
+     * call.
+     * 
+ * + * string page_token = 4; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained via
+     * [ListNasJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListNasJobsResponse.next_page_token]
+     * of the previous
+     * [JobService.ListNasJobs][google.cloud.aiplatform.v1.JobService.ListNasJobs]
+     * call.
+     * 
+ * + * string page_token = 4; + * + * @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_; + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return Whether the readMask field is set. + */ + public boolean hasReadMask() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @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(); + } + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + 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; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + 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; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + 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); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public Builder clearReadMask() { + bitField0_ = (bitField0_ & ~0x00000010); + readMask_ = null; + if (readMaskBuilder_ != null) { + readMaskBuilder_.dispose(); + readMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public com.google.protobuf.FieldMask.Builder getReadMaskBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getReadMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + if (readMaskBuilder_ != null) { + return readMaskBuilder_.getMessageOrBuilder(); + } else { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + 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_; + } + + @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.ListNasJobsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ListNasJobsRequest) + private static final com.google.cloud.aiplatform.v1.ListNasJobsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ListNasJobsRequest(); + } + + public static com.google.cloud.aiplatform.v1.ListNasJobsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListNasJobsRequest 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.ListNasJobsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListNasJobsRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListNasJobsRequestOrBuilder.java new file mode 100644 index 000000000000..5233aa4d562b --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListNasJobsRequestOrBuilder.java @@ -0,0 +1,194 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/job_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface ListNasJobsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ListNasJobsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the Location to list the NasJobs
+   * 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 NasJobs
+   * 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(); + + /** + * + * + *
+   * The standard list filter.
+   * Supported fields:
+   *   * `display_name` supports `=`, `!=` comparisons, and `:` wildcard.
+   *   * `state` supports `=`, `!=` comparisons.
+   *   * `create_time` supports `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons.
+   *     `create_time` must be in RFC 3339 format.
+   *   * `labels` supports general map functions that is:
+   *     `labels.key=value` - key:value equality
+   *     `labels.key:* - key existence
+   * Some examples of using the filter are:
+   *   * `state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*"`
+   *   * `state!="JOB_STATE_FAILED" OR display_name="my_job"`
+   *   * `NOT display_name="my_job"`
+   *   * `create_time>"2021-05-18T00:00:00Z"`
+   *   * `labels.keyA=valueA`
+   *   * `labels.keyB:*`
+   * 
+ * + * string filter = 2; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * The standard list filter.
+   * Supported fields:
+   *   * `display_name` supports `=`, `!=` comparisons, and `:` wildcard.
+   *   * `state` supports `=`, `!=` comparisons.
+   *   * `create_time` supports `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons.
+   *     `create_time` must be in RFC 3339 format.
+   *   * `labels` supports general map functions that is:
+   *     `labels.key=value` - key:value equality
+   *     `labels.key:* - key existence
+   * Some examples of using the filter are:
+   *   * `state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*"`
+   *   * `state!="JOB_STATE_FAILED" OR display_name="my_job"`
+   *   * `NOT display_name="my_job"`
+   *   * `create_time>"2021-05-18T00:00:00Z"`
+   *   * `labels.keyA=valueA`
+   *   * `labels.keyB:*`
+   * 
+ * + * string filter = 2; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * The standard list page size.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The standard list page token.
+   * Typically obtained via
+   * [ListNasJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListNasJobsResponse.next_page_token]
+   * of the previous
+   * [JobService.ListNasJobs][google.cloud.aiplatform.v1.JobService.ListNasJobs]
+   * call.
+   * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The standard list page token.
+   * Typically obtained via
+   * [ListNasJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListNasJobsResponse.next_page_token]
+   * of the previous
+   * [JobService.ListNasJobs][google.cloud.aiplatform.v1.JobService.ListNasJobs]
+   * call.
+   * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return Whether the readMask field is set. + */ + boolean hasReadMask(); + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return The readMask. + */ + com.google.protobuf.FieldMask getReadMask(); + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListNasJobsResponse.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListNasJobsResponse.java new file mode 100644 index 000000000000..340dd28f0813 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListNasJobsResponse.java @@ -0,0 +1,1190 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/job_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Response message for
+ * [JobService.ListNasJobs][google.cloud.aiplatform.v1.JobService.ListNasJobs]
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListNasJobsResponse} + */ +public final class ListNasJobsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ListNasJobsResponse) + ListNasJobsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListNasJobsResponse.newBuilder() to construct. + private ListNasJobsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListNasJobsResponse() { + nasJobs_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListNasJobsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListNasJobsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListNasJobsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListNasJobsResponse.class, + com.google.cloud.aiplatform.v1.ListNasJobsResponse.Builder.class); + } + + public static final int NAS_JOBS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List nasJobs_; + /** + * + * + *
+   * List of NasJobs in the requested page.
+   * [NasJob.nas_job_output][google.cloud.aiplatform.v1.NasJob.nas_job_output]
+   * of the jobs will not be returned.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.NasJob nas_jobs = 1; + */ + @java.lang.Override + public java.util.List getNasJobsList() { + return nasJobs_; + } + /** + * + * + *
+   * List of NasJobs in the requested page.
+   * [NasJob.nas_job_output][google.cloud.aiplatform.v1.NasJob.nas_job_output]
+   * of the jobs will not be returned.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.NasJob nas_jobs = 1; + */ + @java.lang.Override + public java.util.List + getNasJobsOrBuilderList() { + return nasJobs_; + } + /** + * + * + *
+   * List of NasJobs in the requested page.
+   * [NasJob.nas_job_output][google.cloud.aiplatform.v1.NasJob.nas_job_output]
+   * of the jobs will not be returned.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.NasJob nas_jobs = 1; + */ + @java.lang.Override + public int getNasJobsCount() { + return nasJobs_.size(); + } + /** + * + * + *
+   * List of NasJobs in the requested page.
+   * [NasJob.nas_job_output][google.cloud.aiplatform.v1.NasJob.nas_job_output]
+   * of the jobs will not be returned.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.NasJob nas_jobs = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasJob getNasJobs(int index) { + return nasJobs_.get(index); + } + /** + * + * + *
+   * List of NasJobs in the requested page.
+   * [NasJob.nas_job_output][google.cloud.aiplatform.v1.NasJob.nas_job_output]
+   * of the jobs will not be returned.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.NasJob nas_jobs = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasJobOrBuilder getNasJobsOrBuilder(int index) { + return nasJobs_.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
+   * [ListNasJobsRequest.page_token][google.cloud.aiplatform.v1.ListNasJobsRequest.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
+   * [ListNasJobsRequest.page_token][google.cloud.aiplatform.v1.ListNasJobsRequest.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 < nasJobs_.size(); i++) { + output.writeMessage(1, nasJobs_.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 < nasJobs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, nasJobs_.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.ListNasJobsResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ListNasJobsResponse other = + (com.google.cloud.aiplatform.v1.ListNasJobsResponse) obj; + + if (!getNasJobsList().equals(other.getNasJobsList())) 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 (getNasJobsCount() > 0) { + hash = (37 * hash) + NAS_JOBS_FIELD_NUMBER; + hash = (53 * hash) + getNasJobsList().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.ListNasJobsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListNasJobsResponse 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.ListNasJobsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListNasJobsResponse 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.ListNasJobsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListNasJobsResponse 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.ListNasJobsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListNasJobsResponse 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.ListNasJobsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListNasJobsResponse 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.ListNasJobsResponse 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.ListNasJobsResponse 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.ListNasJobsResponse 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
+   * [JobService.ListNasJobs][google.cloud.aiplatform.v1.JobService.ListNasJobs]
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListNasJobsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ListNasJobsResponse) + com.google.cloud.aiplatform.v1.ListNasJobsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListNasJobsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListNasJobsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListNasJobsResponse.class, + com.google.cloud.aiplatform.v1.ListNasJobsResponse.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ListNasJobsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (nasJobsBuilder_ == null) { + nasJobs_ = java.util.Collections.emptyList(); + } else { + nasJobs_ = null; + nasJobsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListNasJobsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListNasJobsResponse getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ListNasJobsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListNasJobsResponse build() { + com.google.cloud.aiplatform.v1.ListNasJobsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListNasJobsResponse buildPartial() { + com.google.cloud.aiplatform.v1.ListNasJobsResponse result = + new com.google.cloud.aiplatform.v1.ListNasJobsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.aiplatform.v1.ListNasJobsResponse result) { + if (nasJobsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + nasJobs_ = java.util.Collections.unmodifiableList(nasJobs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.nasJobs_ = nasJobs_; + } else { + result.nasJobs_ = nasJobsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.ListNasJobsResponse 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.ListNasJobsResponse) { + return mergeFrom((com.google.cloud.aiplatform.v1.ListNasJobsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ListNasJobsResponse other) { + if (other == com.google.cloud.aiplatform.v1.ListNasJobsResponse.getDefaultInstance()) + return this; + if (nasJobsBuilder_ == null) { + if (!other.nasJobs_.isEmpty()) { + if (nasJobs_.isEmpty()) { + nasJobs_ = other.nasJobs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureNasJobsIsMutable(); + nasJobs_.addAll(other.nasJobs_); + } + onChanged(); + } + } else { + if (!other.nasJobs_.isEmpty()) { + if (nasJobsBuilder_.isEmpty()) { + nasJobsBuilder_.dispose(); + nasJobsBuilder_ = null; + nasJobs_ = other.nasJobs_; + bitField0_ = (bitField0_ & ~0x00000001); + nasJobsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getNasJobsFieldBuilder() + : null; + } else { + nasJobsBuilder_.addAllMessages(other.nasJobs_); + } + } + } + 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.NasJob m = + input.readMessage( + com.google.cloud.aiplatform.v1.NasJob.parser(), extensionRegistry); + if (nasJobsBuilder_ == null) { + ensureNasJobsIsMutable(); + nasJobs_.add(m); + } else { + nasJobsBuilder_.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 nasJobs_ = + java.util.Collections.emptyList(); + + private void ensureNasJobsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + nasJobs_ = new java.util.ArrayList(nasJobs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.NasJob, + com.google.cloud.aiplatform.v1.NasJob.Builder, + com.google.cloud.aiplatform.v1.NasJobOrBuilder> + nasJobsBuilder_; + + /** + * + * + *
+     * List of NasJobs in the requested page.
+     * [NasJob.nas_job_output][google.cloud.aiplatform.v1.NasJob.nas_job_output]
+     * of the jobs will not be returned.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.NasJob nas_jobs = 1; + */ + public java.util.List getNasJobsList() { + if (nasJobsBuilder_ == null) { + return java.util.Collections.unmodifiableList(nasJobs_); + } else { + return nasJobsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of NasJobs in the requested page.
+     * [NasJob.nas_job_output][google.cloud.aiplatform.v1.NasJob.nas_job_output]
+     * of the jobs will not be returned.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.NasJob nas_jobs = 1; + */ + public int getNasJobsCount() { + if (nasJobsBuilder_ == null) { + return nasJobs_.size(); + } else { + return nasJobsBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of NasJobs in the requested page.
+     * [NasJob.nas_job_output][google.cloud.aiplatform.v1.NasJob.nas_job_output]
+     * of the jobs will not be returned.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.NasJob nas_jobs = 1; + */ + public com.google.cloud.aiplatform.v1.NasJob getNasJobs(int index) { + if (nasJobsBuilder_ == null) { + return nasJobs_.get(index); + } else { + return nasJobsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of NasJobs in the requested page.
+     * [NasJob.nas_job_output][google.cloud.aiplatform.v1.NasJob.nas_job_output]
+     * of the jobs will not be returned.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.NasJob nas_jobs = 1; + */ + public Builder setNasJobs(int index, com.google.cloud.aiplatform.v1.NasJob value) { + if (nasJobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNasJobsIsMutable(); + nasJobs_.set(index, value); + onChanged(); + } else { + nasJobsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of NasJobs in the requested page.
+     * [NasJob.nas_job_output][google.cloud.aiplatform.v1.NasJob.nas_job_output]
+     * of the jobs will not be returned.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.NasJob nas_jobs = 1; + */ + public Builder setNasJobs( + int index, com.google.cloud.aiplatform.v1.NasJob.Builder builderForValue) { + if (nasJobsBuilder_ == null) { + ensureNasJobsIsMutable(); + nasJobs_.set(index, builderForValue.build()); + onChanged(); + } else { + nasJobsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of NasJobs in the requested page.
+     * [NasJob.nas_job_output][google.cloud.aiplatform.v1.NasJob.nas_job_output]
+     * of the jobs will not be returned.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.NasJob nas_jobs = 1; + */ + public Builder addNasJobs(com.google.cloud.aiplatform.v1.NasJob value) { + if (nasJobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNasJobsIsMutable(); + nasJobs_.add(value); + onChanged(); + } else { + nasJobsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of NasJobs in the requested page.
+     * [NasJob.nas_job_output][google.cloud.aiplatform.v1.NasJob.nas_job_output]
+     * of the jobs will not be returned.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.NasJob nas_jobs = 1; + */ + public Builder addNasJobs(int index, com.google.cloud.aiplatform.v1.NasJob value) { + if (nasJobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNasJobsIsMutable(); + nasJobs_.add(index, value); + onChanged(); + } else { + nasJobsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of NasJobs in the requested page.
+     * [NasJob.nas_job_output][google.cloud.aiplatform.v1.NasJob.nas_job_output]
+     * of the jobs will not be returned.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.NasJob nas_jobs = 1; + */ + public Builder addNasJobs(com.google.cloud.aiplatform.v1.NasJob.Builder builderForValue) { + if (nasJobsBuilder_ == null) { + ensureNasJobsIsMutable(); + nasJobs_.add(builderForValue.build()); + onChanged(); + } else { + nasJobsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of NasJobs in the requested page.
+     * [NasJob.nas_job_output][google.cloud.aiplatform.v1.NasJob.nas_job_output]
+     * of the jobs will not be returned.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.NasJob nas_jobs = 1; + */ + public Builder addNasJobs( + int index, com.google.cloud.aiplatform.v1.NasJob.Builder builderForValue) { + if (nasJobsBuilder_ == null) { + ensureNasJobsIsMutable(); + nasJobs_.add(index, builderForValue.build()); + onChanged(); + } else { + nasJobsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of NasJobs in the requested page.
+     * [NasJob.nas_job_output][google.cloud.aiplatform.v1.NasJob.nas_job_output]
+     * of the jobs will not be returned.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.NasJob nas_jobs = 1; + */ + public Builder addAllNasJobs( + java.lang.Iterable values) { + if (nasJobsBuilder_ == null) { + ensureNasJobsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, nasJobs_); + onChanged(); + } else { + nasJobsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of NasJobs in the requested page.
+     * [NasJob.nas_job_output][google.cloud.aiplatform.v1.NasJob.nas_job_output]
+     * of the jobs will not be returned.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.NasJob nas_jobs = 1; + */ + public Builder clearNasJobs() { + if (nasJobsBuilder_ == null) { + nasJobs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + nasJobsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of NasJobs in the requested page.
+     * [NasJob.nas_job_output][google.cloud.aiplatform.v1.NasJob.nas_job_output]
+     * of the jobs will not be returned.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.NasJob nas_jobs = 1; + */ + public Builder removeNasJobs(int index) { + if (nasJobsBuilder_ == null) { + ensureNasJobsIsMutable(); + nasJobs_.remove(index); + onChanged(); + } else { + nasJobsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of NasJobs in the requested page.
+     * [NasJob.nas_job_output][google.cloud.aiplatform.v1.NasJob.nas_job_output]
+     * of the jobs will not be returned.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.NasJob nas_jobs = 1; + */ + public com.google.cloud.aiplatform.v1.NasJob.Builder getNasJobsBuilder(int index) { + return getNasJobsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of NasJobs in the requested page.
+     * [NasJob.nas_job_output][google.cloud.aiplatform.v1.NasJob.nas_job_output]
+     * of the jobs will not be returned.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.NasJob nas_jobs = 1; + */ + public com.google.cloud.aiplatform.v1.NasJobOrBuilder getNasJobsOrBuilder(int index) { + if (nasJobsBuilder_ == null) { + return nasJobs_.get(index); + } else { + return nasJobsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of NasJobs in the requested page.
+     * [NasJob.nas_job_output][google.cloud.aiplatform.v1.NasJob.nas_job_output]
+     * of the jobs will not be returned.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.NasJob nas_jobs = 1; + */ + public java.util.List + getNasJobsOrBuilderList() { + if (nasJobsBuilder_ != null) { + return nasJobsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(nasJobs_); + } + } + /** + * + * + *
+     * List of NasJobs in the requested page.
+     * [NasJob.nas_job_output][google.cloud.aiplatform.v1.NasJob.nas_job_output]
+     * of the jobs will not be returned.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.NasJob nas_jobs = 1; + */ + public com.google.cloud.aiplatform.v1.NasJob.Builder addNasJobsBuilder() { + return getNasJobsFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1.NasJob.getDefaultInstance()); + } + /** + * + * + *
+     * List of NasJobs in the requested page.
+     * [NasJob.nas_job_output][google.cloud.aiplatform.v1.NasJob.nas_job_output]
+     * of the jobs will not be returned.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.NasJob nas_jobs = 1; + */ + public com.google.cloud.aiplatform.v1.NasJob.Builder addNasJobsBuilder(int index) { + return getNasJobsFieldBuilder() + .addBuilder(index, com.google.cloud.aiplatform.v1.NasJob.getDefaultInstance()); + } + /** + * + * + *
+     * List of NasJobs in the requested page.
+     * [NasJob.nas_job_output][google.cloud.aiplatform.v1.NasJob.nas_job_output]
+     * of the jobs will not be returned.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.NasJob nas_jobs = 1; + */ + public java.util.List getNasJobsBuilderList() { + return getNasJobsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.NasJob, + com.google.cloud.aiplatform.v1.NasJob.Builder, + com.google.cloud.aiplatform.v1.NasJobOrBuilder> + getNasJobsFieldBuilder() { + if (nasJobsBuilder_ == null) { + nasJobsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.NasJob, + com.google.cloud.aiplatform.v1.NasJob.Builder, + com.google.cloud.aiplatform.v1.NasJobOrBuilder>( + nasJobs_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + nasJobs_ = null; + } + return nasJobsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to
+     * [ListNasJobsRequest.page_token][google.cloud.aiplatform.v1.ListNasJobsRequest.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
+     * [ListNasJobsRequest.page_token][google.cloud.aiplatform.v1.ListNasJobsRequest.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
+     * [ListNasJobsRequest.page_token][google.cloud.aiplatform.v1.ListNasJobsRequest.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
+     * [ListNasJobsRequest.page_token][google.cloud.aiplatform.v1.ListNasJobsRequest.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
+     * [ListNasJobsRequest.page_token][google.cloud.aiplatform.v1.ListNasJobsRequest.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.ListNasJobsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ListNasJobsResponse) + private static final com.google.cloud.aiplatform.v1.ListNasJobsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ListNasJobsResponse(); + } + + public static com.google.cloud.aiplatform.v1.ListNasJobsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListNasJobsResponse 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.ListNasJobsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListNasJobsResponseOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListNasJobsResponseOrBuilder.java new file mode 100644 index 000000000000..5acfdf618528 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListNasJobsResponseOrBuilder.java @@ -0,0 +1,118 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/job_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface ListNasJobsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ListNasJobsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of NasJobs in the requested page.
+   * [NasJob.nas_job_output][google.cloud.aiplatform.v1.NasJob.nas_job_output]
+   * of the jobs will not be returned.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.NasJob nas_jobs = 1; + */ + java.util.List getNasJobsList(); + /** + * + * + *
+   * List of NasJobs in the requested page.
+   * [NasJob.nas_job_output][google.cloud.aiplatform.v1.NasJob.nas_job_output]
+   * of the jobs will not be returned.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.NasJob nas_jobs = 1; + */ + com.google.cloud.aiplatform.v1.NasJob getNasJobs(int index); + /** + * + * + *
+   * List of NasJobs in the requested page.
+   * [NasJob.nas_job_output][google.cloud.aiplatform.v1.NasJob.nas_job_output]
+   * of the jobs will not be returned.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.NasJob nas_jobs = 1; + */ + int getNasJobsCount(); + /** + * + * + *
+   * List of NasJobs in the requested page.
+   * [NasJob.nas_job_output][google.cloud.aiplatform.v1.NasJob.nas_job_output]
+   * of the jobs will not be returned.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.NasJob nas_jobs = 1; + */ + java.util.List + getNasJobsOrBuilderList(); + /** + * + * + *
+   * List of NasJobs in the requested page.
+   * [NasJob.nas_job_output][google.cloud.aiplatform.v1.NasJob.nas_job_output]
+   * of the jobs will not be returned.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.NasJob nas_jobs = 1; + */ + com.google.cloud.aiplatform.v1.NasJobOrBuilder getNasJobsOrBuilder(int index); + + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to
+   * [ListNasJobsRequest.page_token][google.cloud.aiplatform.v1.ListNasJobsRequest.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
+   * [ListNasJobsRequest.page_token][google.cloud.aiplatform.v1.ListNasJobsRequest.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/ListNasTrialDetailsRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListNasTrialDetailsRequest.java new file mode 100644 index 000000000000..99cd4e72849d --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListNasTrialDetailsRequest.java @@ -0,0 +1,970 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/job_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Request message for
+ * [JobService.ListNasTrialDetails][google.cloud.aiplatform.v1.JobService.ListNasTrialDetails].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListNasTrialDetailsRequest} + */ +public final class ListNasTrialDetailsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ListNasTrialDetailsRequest) + ListNasTrialDetailsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListNasTrialDetailsRequest.newBuilder() to construct. + private ListNasTrialDetailsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListNasTrialDetailsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListNasTrialDetailsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListNasTrialDetailsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListNasTrialDetailsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListNasTrialDetailsRequest.class, + com.google.cloud.aiplatform.v1.ListNasTrialDetailsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The name of the NasJob resource.
+   * Format:
+   * `projects/{project}/locations/{location}/nasJobs/{nas_job}`
+   * 
+ * + * + * 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 NasJob resource.
+   * Format:
+   * `projects/{project}/locations/{location}/nasJobs/{nas_job}`
+   * 
+ * + * + * 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; + /** + * + * + *
+   * The standard list page size.
+   * 
+ * + * int32 page_size = 2; + * + * @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_ = ""; + /** + * + * + *
+   * The standard list page token.
+   * Typically obtained via
+   * [ListNasTrialDetailsResponse.next_page_token][google.cloud.aiplatform.v1.ListNasTrialDetailsResponse.next_page_token]
+   * of the previous
+   * [JobService.ListNasTrialDetails][google.cloud.aiplatform.v1.JobService.ListNasTrialDetails]
+   * call.
+   * 
+ * + * string page_token = 3; + * + * @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; + } + } + /** + * + * + *
+   * The standard list page token.
+   * Typically obtained via
+   * [ListNasTrialDetailsResponse.next_page_token][google.cloud.aiplatform.v1.ListNasTrialDetailsResponse.next_page_token]
+   * of the previous
+   * [JobService.ListNasTrialDetails][google.cloud.aiplatform.v1.JobService.ListNasTrialDetails]
+   * call.
+   * 
+ * + * string page_token = 3; + * + * @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.v1.ListNasTrialDetailsRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ListNasTrialDetailsRequest other = + (com.google.cloud.aiplatform.v1.ListNasTrialDetailsRequest) 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.ListNasTrialDetailsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListNasTrialDetailsRequest 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.ListNasTrialDetailsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListNasTrialDetailsRequest 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.ListNasTrialDetailsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListNasTrialDetailsRequest 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.ListNasTrialDetailsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListNasTrialDetailsRequest 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.ListNasTrialDetailsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListNasTrialDetailsRequest 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.ListNasTrialDetailsRequest 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.ListNasTrialDetailsRequest 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.ListNasTrialDetailsRequest 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
+   * [JobService.ListNasTrialDetails][google.cloud.aiplatform.v1.JobService.ListNasTrialDetails].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListNasTrialDetailsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ListNasTrialDetailsRequest) + com.google.cloud.aiplatform.v1.ListNasTrialDetailsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListNasTrialDetailsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListNasTrialDetailsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListNasTrialDetailsRequest.class, + com.google.cloud.aiplatform.v1.ListNasTrialDetailsRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ListNasTrialDetailsRequest.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.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListNasTrialDetailsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListNasTrialDetailsRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ListNasTrialDetailsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListNasTrialDetailsRequest build() { + com.google.cloud.aiplatform.v1.ListNasTrialDetailsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListNasTrialDetailsRequest buildPartial() { + com.google.cloud.aiplatform.v1.ListNasTrialDetailsRequest result = + new com.google.cloud.aiplatform.v1.ListNasTrialDetailsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.ListNasTrialDetailsRequest 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.ListNasTrialDetailsRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1.ListNasTrialDetailsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ListNasTrialDetailsRequest other) { + if (other == com.google.cloud.aiplatform.v1.ListNasTrialDetailsRequest.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 name of the NasJob resource.
+     * Format:
+     * `projects/{project}/locations/{location}/nasJobs/{nas_job}`
+     * 
+ * + * + * 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 NasJob resource.
+     * Format:
+     * `projects/{project}/locations/{location}/nasJobs/{nas_job}`
+     * 
+ * + * + * 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 NasJob resource.
+     * Format:
+     * `projects/{project}/locations/{location}/nasJobs/{nas_job}`
+     * 
+ * + * + * 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 NasJob resource.
+     * Format:
+     * `projects/{project}/locations/{location}/nasJobs/{nas_job}`
+     * 
+ * + * + * 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 NasJob resource.
+     * Format:
+     * `projects/{project}/locations/{location}/nasJobs/{nas_job}`
+     * 
+ * + * + * 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_; + /** + * + * + *
+     * The standard list page size.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The standard list page size.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list page size.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained via
+     * [ListNasTrialDetailsResponse.next_page_token][google.cloud.aiplatform.v1.ListNasTrialDetailsResponse.next_page_token]
+     * of the previous
+     * [JobService.ListNasTrialDetails][google.cloud.aiplatform.v1.JobService.ListNasTrialDetails]
+     * call.
+     * 
+ * + * string page_token = 3; + * + * @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; + } + } + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained via
+     * [ListNasTrialDetailsResponse.next_page_token][google.cloud.aiplatform.v1.ListNasTrialDetailsResponse.next_page_token]
+     * of the previous
+     * [JobService.ListNasTrialDetails][google.cloud.aiplatform.v1.JobService.ListNasTrialDetails]
+     * call.
+     * 
+ * + * string page_token = 3; + * + * @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; + } + } + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained via
+     * [ListNasTrialDetailsResponse.next_page_token][google.cloud.aiplatform.v1.ListNasTrialDetailsResponse.next_page_token]
+     * of the previous
+     * [JobService.ListNasTrialDetails][google.cloud.aiplatform.v1.JobService.ListNasTrialDetails]
+     * call.
+     * 
+ * + * string page_token = 3; + * + * @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; + } + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained via
+     * [ListNasTrialDetailsResponse.next_page_token][google.cloud.aiplatform.v1.ListNasTrialDetailsResponse.next_page_token]
+     * of the previous
+     * [JobService.ListNasTrialDetails][google.cloud.aiplatform.v1.JobService.ListNasTrialDetails]
+     * call.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained via
+     * [ListNasTrialDetailsResponse.next_page_token][google.cloud.aiplatform.v1.ListNasTrialDetailsResponse.next_page_token]
+     * of the previous
+     * [JobService.ListNasTrialDetails][google.cloud.aiplatform.v1.JobService.ListNasTrialDetails]
+     * call.
+     * 
+ * + * string page_token = 3; + * + * @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.ListNasTrialDetailsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ListNasTrialDetailsRequest) + private static final com.google.cloud.aiplatform.v1.ListNasTrialDetailsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ListNasTrialDetailsRequest(); + } + + public static com.google.cloud.aiplatform.v1.ListNasTrialDetailsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListNasTrialDetailsRequest 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.ListNasTrialDetailsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListNasTrialDetailsRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListNasTrialDetailsRequestOrBuilder.java new file mode 100644 index 000000000000..a192db52f4d8 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListNasTrialDetailsRequestOrBuilder.java @@ -0,0 +1,106 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/job_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface ListNasTrialDetailsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ListNasTrialDetailsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the NasJob resource.
+   * Format:
+   * `projects/{project}/locations/{location}/nasJobs/{nas_job}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The name of the NasJob resource.
+   * Format:
+   * `projects/{project}/locations/{location}/nasJobs/{nas_job}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The standard list page size.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The standard list page token.
+   * Typically obtained via
+   * [ListNasTrialDetailsResponse.next_page_token][google.cloud.aiplatform.v1.ListNasTrialDetailsResponse.next_page_token]
+   * of the previous
+   * [JobService.ListNasTrialDetails][google.cloud.aiplatform.v1.JobService.ListNasTrialDetails]
+   * call.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The standard list page token.
+   * Typically obtained via
+   * [ListNasTrialDetailsResponse.next_page_token][google.cloud.aiplatform.v1.ListNasTrialDetailsResponse.next_page_token]
+   * of the previous
+   * [JobService.ListNasTrialDetails][google.cloud.aiplatform.v1.JobService.ListNasTrialDetails]
+   * call.
+   * 
+ * + * string page_token = 3; + * + * @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/ListNasTrialDetailsResponse.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListNasTrialDetailsResponse.java new file mode 100644 index 000000000000..a4832013eacc --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListNasTrialDetailsResponse.java @@ -0,0 +1,1158 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/job_service.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Response message for
+ * [JobService.ListNasTrialDetails][google.cloud.aiplatform.v1.JobService.ListNasTrialDetails]
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListNasTrialDetailsResponse} + */ +public final class ListNasTrialDetailsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.ListNasTrialDetailsResponse) + ListNasTrialDetailsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListNasTrialDetailsResponse.newBuilder() to construct. + private ListNasTrialDetailsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListNasTrialDetailsResponse() { + nasTrialDetails_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListNasTrialDetailsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListNasTrialDetailsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListNasTrialDetailsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListNasTrialDetailsResponse.class, + com.google.cloud.aiplatform.v1.ListNasTrialDetailsResponse.Builder.class); + } + + public static final int NAS_TRIAL_DETAILS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List nasTrialDetails_; + /** + * + * + *
+   * List of top NasTrials in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.NasTrialDetail nas_trial_details = 1; + */ + @java.lang.Override + public java.util.List getNasTrialDetailsList() { + return nasTrialDetails_; + } + /** + * + * + *
+   * List of top NasTrials in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.NasTrialDetail nas_trial_details = 1; + */ + @java.lang.Override + public java.util.List + getNasTrialDetailsOrBuilderList() { + return nasTrialDetails_; + } + /** + * + * + *
+   * List of top NasTrials in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.NasTrialDetail nas_trial_details = 1; + */ + @java.lang.Override + public int getNasTrialDetailsCount() { + return nasTrialDetails_.size(); + } + /** + * + * + *
+   * List of top NasTrials in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.NasTrialDetail nas_trial_details = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasTrialDetail getNasTrialDetails(int index) { + return nasTrialDetails_.get(index); + } + /** + * + * + *
+   * List of top NasTrials in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.NasTrialDetail nas_trial_details = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasTrialDetailOrBuilder getNasTrialDetailsOrBuilder( + int index) { + return nasTrialDetails_.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
+   * [ListNasTrialDetailsRequest.page_token][google.cloud.aiplatform.v1.ListNasTrialDetailsRequest.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
+   * [ListNasTrialDetailsRequest.page_token][google.cloud.aiplatform.v1.ListNasTrialDetailsRequest.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 < nasTrialDetails_.size(); i++) { + output.writeMessage(1, nasTrialDetails_.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 < nasTrialDetails_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, nasTrialDetails_.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.ListNasTrialDetailsResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.ListNasTrialDetailsResponse other = + (com.google.cloud.aiplatform.v1.ListNasTrialDetailsResponse) obj; + + if (!getNasTrialDetailsList().equals(other.getNasTrialDetailsList())) 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 (getNasTrialDetailsCount() > 0) { + hash = (37 * hash) + NAS_TRIAL_DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getNasTrialDetailsList().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.ListNasTrialDetailsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListNasTrialDetailsResponse 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.ListNasTrialDetailsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListNasTrialDetailsResponse 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.ListNasTrialDetailsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.ListNasTrialDetailsResponse 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.ListNasTrialDetailsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListNasTrialDetailsResponse 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.ListNasTrialDetailsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.ListNasTrialDetailsResponse 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.ListNasTrialDetailsResponse 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.ListNasTrialDetailsResponse 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.ListNasTrialDetailsResponse 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
+   * [JobService.ListNasTrialDetails][google.cloud.aiplatform.v1.JobService.ListNasTrialDetails]
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.ListNasTrialDetailsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.ListNasTrialDetailsResponse) + com.google.cloud.aiplatform.v1.ListNasTrialDetailsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListNasTrialDetailsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListNasTrialDetailsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.ListNasTrialDetailsResponse.class, + com.google.cloud.aiplatform.v1.ListNasTrialDetailsResponse.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.ListNasTrialDetailsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (nasTrialDetailsBuilder_ == null) { + nasTrialDetails_ = java.util.Collections.emptyList(); + } else { + nasTrialDetails_ = null; + nasTrialDetailsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1_ListNasTrialDetailsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListNasTrialDetailsResponse getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.ListNasTrialDetailsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListNasTrialDetailsResponse build() { + com.google.cloud.aiplatform.v1.ListNasTrialDetailsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.ListNasTrialDetailsResponse buildPartial() { + com.google.cloud.aiplatform.v1.ListNasTrialDetailsResponse result = + new com.google.cloud.aiplatform.v1.ListNasTrialDetailsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.aiplatform.v1.ListNasTrialDetailsResponse result) { + if (nasTrialDetailsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + nasTrialDetails_ = java.util.Collections.unmodifiableList(nasTrialDetails_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.nasTrialDetails_ = nasTrialDetails_; + } else { + result.nasTrialDetails_ = nasTrialDetailsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.ListNasTrialDetailsResponse 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.ListNasTrialDetailsResponse) { + return mergeFrom((com.google.cloud.aiplatform.v1.ListNasTrialDetailsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.ListNasTrialDetailsResponse other) { + if (other == com.google.cloud.aiplatform.v1.ListNasTrialDetailsResponse.getDefaultInstance()) + return this; + if (nasTrialDetailsBuilder_ == null) { + if (!other.nasTrialDetails_.isEmpty()) { + if (nasTrialDetails_.isEmpty()) { + nasTrialDetails_ = other.nasTrialDetails_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureNasTrialDetailsIsMutable(); + nasTrialDetails_.addAll(other.nasTrialDetails_); + } + onChanged(); + } + } else { + if (!other.nasTrialDetails_.isEmpty()) { + if (nasTrialDetailsBuilder_.isEmpty()) { + nasTrialDetailsBuilder_.dispose(); + nasTrialDetailsBuilder_ = null; + nasTrialDetails_ = other.nasTrialDetails_; + bitField0_ = (bitField0_ & ~0x00000001); + nasTrialDetailsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getNasTrialDetailsFieldBuilder() + : null; + } else { + nasTrialDetailsBuilder_.addAllMessages(other.nasTrialDetails_); + } + } + } + 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.NasTrialDetail m = + input.readMessage( + com.google.cloud.aiplatform.v1.NasTrialDetail.parser(), extensionRegistry); + if (nasTrialDetailsBuilder_ == null) { + ensureNasTrialDetailsIsMutable(); + nasTrialDetails_.add(m); + } else { + nasTrialDetailsBuilder_.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 nasTrialDetails_ = + java.util.Collections.emptyList(); + + private void ensureNasTrialDetailsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + nasTrialDetails_ = + new java.util.ArrayList( + nasTrialDetails_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.NasTrialDetail, + com.google.cloud.aiplatform.v1.NasTrialDetail.Builder, + com.google.cloud.aiplatform.v1.NasTrialDetailOrBuilder> + nasTrialDetailsBuilder_; + + /** + * + * + *
+     * List of top NasTrials in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.NasTrialDetail nas_trial_details = 1; + */ + public java.util.List getNasTrialDetailsList() { + if (nasTrialDetailsBuilder_ == null) { + return java.util.Collections.unmodifiableList(nasTrialDetails_); + } else { + return nasTrialDetailsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of top NasTrials in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.NasTrialDetail nas_trial_details = 1; + */ + public int getNasTrialDetailsCount() { + if (nasTrialDetailsBuilder_ == null) { + return nasTrialDetails_.size(); + } else { + return nasTrialDetailsBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of top NasTrials in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.NasTrialDetail nas_trial_details = 1; + */ + public com.google.cloud.aiplatform.v1.NasTrialDetail getNasTrialDetails(int index) { + if (nasTrialDetailsBuilder_ == null) { + return nasTrialDetails_.get(index); + } else { + return nasTrialDetailsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of top NasTrials in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.NasTrialDetail nas_trial_details = 1; + */ + public Builder setNasTrialDetails( + int index, com.google.cloud.aiplatform.v1.NasTrialDetail value) { + if (nasTrialDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNasTrialDetailsIsMutable(); + nasTrialDetails_.set(index, value); + onChanged(); + } else { + nasTrialDetailsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of top NasTrials in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.NasTrialDetail nas_trial_details = 1; + */ + public Builder setNasTrialDetails( + int index, com.google.cloud.aiplatform.v1.NasTrialDetail.Builder builderForValue) { + if (nasTrialDetailsBuilder_ == null) { + ensureNasTrialDetailsIsMutable(); + nasTrialDetails_.set(index, builderForValue.build()); + onChanged(); + } else { + nasTrialDetailsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of top NasTrials in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.NasTrialDetail nas_trial_details = 1; + */ + public Builder addNasTrialDetails(com.google.cloud.aiplatform.v1.NasTrialDetail value) { + if (nasTrialDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNasTrialDetailsIsMutable(); + nasTrialDetails_.add(value); + onChanged(); + } else { + nasTrialDetailsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of top NasTrials in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.NasTrialDetail nas_trial_details = 1; + */ + public Builder addNasTrialDetails( + int index, com.google.cloud.aiplatform.v1.NasTrialDetail value) { + if (nasTrialDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNasTrialDetailsIsMutable(); + nasTrialDetails_.add(index, value); + onChanged(); + } else { + nasTrialDetailsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of top NasTrials in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.NasTrialDetail nas_trial_details = 1; + */ + public Builder addNasTrialDetails( + com.google.cloud.aiplatform.v1.NasTrialDetail.Builder builderForValue) { + if (nasTrialDetailsBuilder_ == null) { + ensureNasTrialDetailsIsMutable(); + nasTrialDetails_.add(builderForValue.build()); + onChanged(); + } else { + nasTrialDetailsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of top NasTrials in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.NasTrialDetail nas_trial_details = 1; + */ + public Builder addNasTrialDetails( + int index, com.google.cloud.aiplatform.v1.NasTrialDetail.Builder builderForValue) { + if (nasTrialDetailsBuilder_ == null) { + ensureNasTrialDetailsIsMutable(); + nasTrialDetails_.add(index, builderForValue.build()); + onChanged(); + } else { + nasTrialDetailsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of top NasTrials in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.NasTrialDetail nas_trial_details = 1; + */ + public Builder addAllNasTrialDetails( + java.lang.Iterable values) { + if (nasTrialDetailsBuilder_ == null) { + ensureNasTrialDetailsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, nasTrialDetails_); + onChanged(); + } else { + nasTrialDetailsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of top NasTrials in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.NasTrialDetail nas_trial_details = 1; + */ + public Builder clearNasTrialDetails() { + if (nasTrialDetailsBuilder_ == null) { + nasTrialDetails_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + nasTrialDetailsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of top NasTrials in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.NasTrialDetail nas_trial_details = 1; + */ + public Builder removeNasTrialDetails(int index) { + if (nasTrialDetailsBuilder_ == null) { + ensureNasTrialDetailsIsMutable(); + nasTrialDetails_.remove(index); + onChanged(); + } else { + nasTrialDetailsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of top NasTrials in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.NasTrialDetail nas_trial_details = 1; + */ + public com.google.cloud.aiplatform.v1.NasTrialDetail.Builder getNasTrialDetailsBuilder( + int index) { + return getNasTrialDetailsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of top NasTrials in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.NasTrialDetail nas_trial_details = 1; + */ + public com.google.cloud.aiplatform.v1.NasTrialDetailOrBuilder getNasTrialDetailsOrBuilder( + int index) { + if (nasTrialDetailsBuilder_ == null) { + return nasTrialDetails_.get(index); + } else { + return nasTrialDetailsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of top NasTrials in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.NasTrialDetail nas_trial_details = 1; + */ + public java.util.List + getNasTrialDetailsOrBuilderList() { + if (nasTrialDetailsBuilder_ != null) { + return nasTrialDetailsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(nasTrialDetails_); + } + } + /** + * + * + *
+     * List of top NasTrials in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.NasTrialDetail nas_trial_details = 1; + */ + public com.google.cloud.aiplatform.v1.NasTrialDetail.Builder addNasTrialDetailsBuilder() { + return getNasTrialDetailsFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1.NasTrialDetail.getDefaultInstance()); + } + /** + * + * + *
+     * List of top NasTrials in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.NasTrialDetail nas_trial_details = 1; + */ + public com.google.cloud.aiplatform.v1.NasTrialDetail.Builder addNasTrialDetailsBuilder( + int index) { + return getNasTrialDetailsFieldBuilder() + .addBuilder(index, com.google.cloud.aiplatform.v1.NasTrialDetail.getDefaultInstance()); + } + /** + * + * + *
+     * List of top NasTrials in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1.NasTrialDetail nas_trial_details = 1; + */ + public java.util.List + getNasTrialDetailsBuilderList() { + return getNasTrialDetailsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.NasTrialDetail, + com.google.cloud.aiplatform.v1.NasTrialDetail.Builder, + com.google.cloud.aiplatform.v1.NasTrialDetailOrBuilder> + getNasTrialDetailsFieldBuilder() { + if (nasTrialDetailsBuilder_ == null) { + nasTrialDetailsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.NasTrialDetail, + com.google.cloud.aiplatform.v1.NasTrialDetail.Builder, + com.google.cloud.aiplatform.v1.NasTrialDetailOrBuilder>( + nasTrialDetails_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + nasTrialDetails_ = null; + } + return nasTrialDetailsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to
+     * [ListNasTrialDetailsRequest.page_token][google.cloud.aiplatform.v1.ListNasTrialDetailsRequest.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
+     * [ListNasTrialDetailsRequest.page_token][google.cloud.aiplatform.v1.ListNasTrialDetailsRequest.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
+     * [ListNasTrialDetailsRequest.page_token][google.cloud.aiplatform.v1.ListNasTrialDetailsRequest.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
+     * [ListNasTrialDetailsRequest.page_token][google.cloud.aiplatform.v1.ListNasTrialDetailsRequest.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
+     * [ListNasTrialDetailsRequest.page_token][google.cloud.aiplatform.v1.ListNasTrialDetailsRequest.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.ListNasTrialDetailsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.ListNasTrialDetailsResponse) + private static final com.google.cloud.aiplatform.v1.ListNasTrialDetailsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.ListNasTrialDetailsResponse(); + } + + public static com.google.cloud.aiplatform.v1.ListNasTrialDetailsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListNasTrialDetailsResponse 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.ListNasTrialDetailsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListNasTrialDetailsResponseOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListNasTrialDetailsResponseOrBuilder.java new file mode 100644 index 000000000000..a646f1853def --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ListNasTrialDetailsResponseOrBuilder.java @@ -0,0 +1,108 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/job_service.proto + +package com.google.cloud.aiplatform.v1; + +public interface ListNasTrialDetailsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.ListNasTrialDetailsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of top NasTrials in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.NasTrialDetail nas_trial_details = 1; + */ + java.util.List getNasTrialDetailsList(); + /** + * + * + *
+   * List of top NasTrials in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.NasTrialDetail nas_trial_details = 1; + */ + com.google.cloud.aiplatform.v1.NasTrialDetail getNasTrialDetails(int index); + /** + * + * + *
+   * List of top NasTrials in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.NasTrialDetail nas_trial_details = 1; + */ + int getNasTrialDetailsCount(); + /** + * + * + *
+   * List of top NasTrials in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.NasTrialDetail nas_trial_details = 1; + */ + java.util.List + getNasTrialDetailsOrBuilderList(); + /** + * + * + *
+   * List of top NasTrials in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1.NasTrialDetail nas_trial_details = 1; + */ + com.google.cloud.aiplatform.v1.NasTrialDetailOrBuilder getNasTrialDetailsOrBuilder(int index); + + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to
+   * [ListNasTrialDetailsRequest.page_token][google.cloud.aiplatform.v1.ListNasTrialDetailsRequest.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
+   * [ListNasTrialDetailsRequest.page_token][google.cloud.aiplatform.v1.ListNasTrialDetailsRequest.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/Model.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Model.java index 2af897befe45..d399b28fbc52 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Model.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Model.java @@ -1747,6 +1747,689 @@ public com.google.cloud.aiplatform.v1.Model.ExportFormat getDefaultInstanceForTy } } + public interface OriginalModelInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.Model.OriginalModelInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Output only. The resource name of the Model this Model is a copy of,
+     * including the revision. Format:
+     * `projects/{project}/locations/{location}/models/{model_id}@{version_id}`
+     * 
+ * + * + * 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 Model this Model is a copy of,
+     * including the revision. Format:
+     * `projects/{project}/locations/{location}/models/{model_id}@{version_id}`
+     * 
+ * + * + * string model = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for model. + */ + com.google.protobuf.ByteString getModelBytes(); + } + /** + * + * + *
+   * Contains information about the original Model if this Model is a copy.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.Model.OriginalModelInfo} + */ + public static final class OriginalModelInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.Model.OriginalModelInfo) + OriginalModelInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use OriginalModelInfo.newBuilder() to construct. + private OriginalModelInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OriginalModelInfo() { + model_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OriginalModelInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelProto + .internal_static_google_cloud_aiplatform_v1_Model_OriginalModelInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelProto + .internal_static_google_cloud_aiplatform_v1_Model_OriginalModelInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.Model.OriginalModelInfo.class, + com.google.cloud.aiplatform.v1.Model.OriginalModelInfo.Builder.class); + } + + public static final int MODEL_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object model_ = ""; + /** + * + * + *
+     * Output only. The resource name of the Model this Model is a copy of,
+     * including the revision. Format:
+     * `projects/{project}/locations/{location}/models/{model_id}@{version_id}`
+     * 
+ * + * + * string model = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @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; + } + } + /** + * + * + *
+     * Output only. The resource name of the Model this Model is a copy of,
+     * including the revision. Format:
+     * `projects/{project}/locations/{location}/models/{model_id}@{version_id}`
+     * 
+ * + * + * string model = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @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; + } + } + + 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(model_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, model_); + } + 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(model_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, model_); + } + 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.Model.OriginalModelInfo)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.Model.OriginalModelInfo other = + (com.google.cloud.aiplatform.v1.Model.OriginalModelInfo) obj; + + if (!getModel().equals(other.getModel())) 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) + MODEL_FIELD_NUMBER; + hash = (53 * hash) + getModel().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.Model.OriginalModelInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.Model.OriginalModelInfo 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.Model.OriginalModelInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.Model.OriginalModelInfo 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.Model.OriginalModelInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.Model.OriginalModelInfo 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.Model.OriginalModelInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.Model.OriginalModelInfo 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.Model.OriginalModelInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.Model.OriginalModelInfo 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.Model.OriginalModelInfo 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.Model.OriginalModelInfo 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.Model.OriginalModelInfo 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; + } + /** + * + * + *
+     * Contains information about the original Model if this Model is a copy.
+     * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.Model.OriginalModelInfo} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.Model.OriginalModelInfo) + com.google.cloud.aiplatform.v1.Model.OriginalModelInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ModelProto + .internal_static_google_cloud_aiplatform_v1_Model_OriginalModelInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ModelProto + .internal_static_google_cloud_aiplatform_v1_Model_OriginalModelInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.Model.OriginalModelInfo.class, + com.google.cloud.aiplatform.v1.Model.OriginalModelInfo.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.Model.OriginalModelInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + model_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.ModelProto + .internal_static_google_cloud_aiplatform_v1_Model_OriginalModelInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.Model.OriginalModelInfo getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.Model.OriginalModelInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.Model.OriginalModelInfo build() { + com.google.cloud.aiplatform.v1.Model.OriginalModelInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.Model.OriginalModelInfo buildPartial() { + com.google.cloud.aiplatform.v1.Model.OriginalModelInfo result = + new com.google.cloud.aiplatform.v1.Model.OriginalModelInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.Model.OriginalModelInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.model_ = model_; + } + } + + @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.Model.OriginalModelInfo) { + return mergeFrom((com.google.cloud.aiplatform.v1.Model.OriginalModelInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.Model.OriginalModelInfo other) { + if (other == com.google.cloud.aiplatform.v1.Model.OriginalModelInfo.getDefaultInstance()) + return this; + if (!other.getModel().isEmpty()) { + model_ = other.model_; + 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: + { + model_ = 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 model_ = ""; + /** + * + * + *
+       * Output only. The resource name of the Model this Model is a copy of,
+       * including the revision. Format:
+       * `projects/{project}/locations/{location}/models/{model_id}@{version_id}`
+       * 
+ * + * + * string model = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @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; + } + } + /** + * + * + *
+       * Output only. The resource name of the Model this Model is a copy of,
+       * including the revision. Format:
+       * `projects/{project}/locations/{location}/models/{model_id}@{version_id}`
+       * 
+ * + * + * string model = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @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; + } + } + /** + * + * + *
+       * Output only. The resource name of the Model this Model is a copy of,
+       * including the revision. Format:
+       * `projects/{project}/locations/{location}/models/{model_id}@{version_id}`
+       * 
+ * + * + * string model = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @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_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The resource name of the Model this Model is a copy of,
+       * including the revision. Format:
+       * `projects/{project}/locations/{location}/models/{model_id}@{version_id}`
+       * 
+ * + * + * string model = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearModel() { + model_ = getDefaultInstance().getModel(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The resource name of the Model this Model is a copy of,
+       * including the revision. Format:
+       * `projects/{project}/locations/{location}/models/{model_id}@{version_id}`
+       * 
+ * + * + * string model = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @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_ |= 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.Model.OriginalModelInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.Model.OriginalModelInfo) + private static final com.google.cloud.aiplatform.v1.Model.OriginalModelInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.Model.OriginalModelInfo(); + } + + public static com.google.cloud.aiplatform.v1.Model.OriginalModelInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OriginalModelInfo 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.Model.OriginalModelInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + public static final int NAME_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -3865,6 +4548,66 @@ public com.google.cloud.aiplatform.v1.ModelSourceInfoOrBuilder getModelSourceInf : modelSourceInfo_; } + public static final int ORIGINAL_MODEL_INFO_FIELD_NUMBER = 34; + private com.google.cloud.aiplatform.v1.Model.OriginalModelInfo originalModelInfo_; + /** + * + * + *
+   * Output only. If this Model is a copy of another Model, this contains info
+   * about the original.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Model.OriginalModelInfo original_model_info = 34 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the originalModelInfo field is set. + */ + @java.lang.Override + public boolean hasOriginalModelInfo() { + return originalModelInfo_ != null; + } + /** + * + * + *
+   * Output only. If this Model is a copy of another Model, this contains info
+   * about the original.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Model.OriginalModelInfo original_model_info = 34 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The originalModelInfo. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.Model.OriginalModelInfo getOriginalModelInfo() { + return originalModelInfo_ == null + ? com.google.cloud.aiplatform.v1.Model.OriginalModelInfo.getDefaultInstance() + : originalModelInfo_; + } + /** + * + * + *
+   * Output only. If this Model is a copy of another Model, this contains info
+   * about the original.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Model.OriginalModelInfo original_model_info = 34 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.Model.OriginalModelInfoOrBuilder + getOriginalModelInfoOrBuilder() { + return originalModelInfo_ == null + ? com.google.cloud.aiplatform.v1.Model.OriginalModelInfo.getDefaultInstance() + : originalModelInfo_; + } + public static final int METADATA_ARTIFACT_FIELD_NUMBER = 44; @SuppressWarnings("serial") @@ -4017,6 +4760,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (versionUpdateTime_ != null) { output.writeMessage(32, getVersionUpdateTime()); } + if (originalModelInfo_ != null) { + output.writeMessage(34, getOriginalModelInfo()); + } if (modelSourceInfo_ != null) { output.writeMessage(38, getModelSourceInfo()); } @@ -4142,6 +4888,9 @@ public int getSerializedSize() { if (versionUpdateTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(32, getVersionUpdateTime()); } + if (originalModelInfo_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(34, getOriginalModelInfo()); + } if (modelSourceInfo_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(38, getModelSourceInfo()); } @@ -4223,6 +4972,10 @@ public boolean equals(final java.lang.Object obj) { if (hasModelSourceInfo()) { if (!getModelSourceInfo().equals(other.getModelSourceInfo())) return false; } + if (hasOriginalModelInfo() != other.hasOriginalModelInfo()) return false; + if (hasOriginalModelInfo()) { + if (!getOriginalModelInfo().equals(other.getOriginalModelInfo())) return false; + } if (!getMetadataArtifact().equals(other.getMetadataArtifact())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; @@ -4321,6 +5074,10 @@ public int hashCode() { hash = (37 * hash) + MODEL_SOURCE_INFO_FIELD_NUMBER; hash = (53 * hash) + getModelSourceInfo().hashCode(); } + if (hasOriginalModelInfo()) { + hash = (37 * hash) + ORIGINAL_MODEL_INFO_FIELD_NUMBER; + hash = (53 * hash) + getOriginalModelInfo().hashCode(); + } hash = (37 * hash) + METADATA_ARTIFACT_FIELD_NUMBER; hash = (53 * hash) + getMetadataArtifact().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); @@ -4563,6 +5320,11 @@ public Builder clear() { modelSourceInfoBuilder_.dispose(); modelSourceInfoBuilder_ = null; } + originalModelInfo_ = null; + if (originalModelInfoBuilder_ != null) { + originalModelInfoBuilder_.dispose(); + originalModelInfoBuilder_ = null; + } metadataArtifact_ = ""; return this; } @@ -4715,6 +5477,12 @@ private void buildPartial0(com.google.cloud.aiplatform.v1.Model result) { modelSourceInfoBuilder_ == null ? modelSourceInfo_ : modelSourceInfoBuilder_.build(); } if (((from_bitField0_ & 0x04000000) != 0)) { + result.originalModelInfo_ = + originalModelInfoBuilder_ == null + ? originalModelInfo_ + : originalModelInfoBuilder_.build(); + } + if (((from_bitField0_ & 0x08000000) != 0)) { result.metadataArtifact_ = metadataArtifact_; } } @@ -4935,9 +5703,12 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1.Model other) { if (other.hasModelSourceInfo()) { mergeModelSourceInfo(other.getModelSourceInfo()); } + if (other.hasOriginalModelInfo()) { + mergeOriginalModelInfo(other.getOriginalModelInfo()); + } if (!other.getMetadataArtifact().isEmpty()) { metadataArtifact_ = other.metadataArtifact_; - bitField0_ |= 0x04000000; + bitField0_ |= 0x08000000; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); @@ -5156,6 +5927,13 @@ public Builder mergeFrom( bitField0_ |= 0x00000010; break; } // case 258 + case 274: + { + input.readMessage( + getOriginalModelInfoFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x04000000; + break; + } // case 274 case 306: { input.readMessage(getModelSourceInfoFieldBuilder().getBuilder(), extensionRegistry); @@ -5165,7 +5943,7 @@ public Builder mergeFrom( case 354: { metadataArtifact_ = input.readStringRequireUtf8(); - bitField0_ |= 0x04000000; + bitField0_ |= 0x08000000; break; } // case 354 default: @@ -11196,6 +11974,222 @@ public com.google.cloud.aiplatform.v1.ModelSourceInfoOrBuilder getModelSourceInf return modelSourceInfoBuilder_; } + private com.google.cloud.aiplatform.v1.Model.OriginalModelInfo originalModelInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.Model.OriginalModelInfo, + com.google.cloud.aiplatform.v1.Model.OriginalModelInfo.Builder, + com.google.cloud.aiplatform.v1.Model.OriginalModelInfoOrBuilder> + originalModelInfoBuilder_; + /** + * + * + *
+     * Output only. If this Model is a copy of another Model, this contains info
+     * about the original.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Model.OriginalModelInfo original_model_info = 34 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the originalModelInfo field is set. + */ + public boolean hasOriginalModelInfo() { + return ((bitField0_ & 0x04000000) != 0); + } + /** + * + * + *
+     * Output only. If this Model is a copy of another Model, this contains info
+     * about the original.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Model.OriginalModelInfo original_model_info = 34 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The originalModelInfo. + */ + public com.google.cloud.aiplatform.v1.Model.OriginalModelInfo getOriginalModelInfo() { + if (originalModelInfoBuilder_ == null) { + return originalModelInfo_ == null + ? com.google.cloud.aiplatform.v1.Model.OriginalModelInfo.getDefaultInstance() + : originalModelInfo_; + } else { + return originalModelInfoBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. If this Model is a copy of another Model, this contains info
+     * about the original.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Model.OriginalModelInfo original_model_info = 34 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setOriginalModelInfo( + com.google.cloud.aiplatform.v1.Model.OriginalModelInfo value) { + if (originalModelInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + originalModelInfo_ = value; + } else { + originalModelInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x04000000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. If this Model is a copy of another Model, this contains info
+     * about the original.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Model.OriginalModelInfo original_model_info = 34 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setOriginalModelInfo( + com.google.cloud.aiplatform.v1.Model.OriginalModelInfo.Builder builderForValue) { + if (originalModelInfoBuilder_ == null) { + originalModelInfo_ = builderForValue.build(); + } else { + originalModelInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x04000000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. If this Model is a copy of another Model, this contains info
+     * about the original.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Model.OriginalModelInfo original_model_info = 34 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeOriginalModelInfo( + com.google.cloud.aiplatform.v1.Model.OriginalModelInfo value) { + if (originalModelInfoBuilder_ == null) { + if (((bitField0_ & 0x04000000) != 0) + && originalModelInfo_ != null + && originalModelInfo_ + != com.google.cloud.aiplatform.v1.Model.OriginalModelInfo.getDefaultInstance()) { + getOriginalModelInfoBuilder().mergeFrom(value); + } else { + originalModelInfo_ = value; + } + } else { + originalModelInfoBuilder_.mergeFrom(value); + } + bitField0_ |= 0x04000000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. If this Model is a copy of another Model, this contains info
+     * about the original.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Model.OriginalModelInfo original_model_info = 34 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearOriginalModelInfo() { + bitField0_ = (bitField0_ & ~0x04000000); + originalModelInfo_ = null; + if (originalModelInfoBuilder_ != null) { + originalModelInfoBuilder_.dispose(); + originalModelInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. If this Model is a copy of another Model, this contains info
+     * about the original.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Model.OriginalModelInfo original_model_info = 34 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.Model.OriginalModelInfo.Builder + getOriginalModelInfoBuilder() { + bitField0_ |= 0x04000000; + onChanged(); + return getOriginalModelInfoFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. If this Model is a copy of another Model, this contains info
+     * about the original.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Model.OriginalModelInfo original_model_info = 34 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.Model.OriginalModelInfoOrBuilder + getOriginalModelInfoOrBuilder() { + if (originalModelInfoBuilder_ != null) { + return originalModelInfoBuilder_.getMessageOrBuilder(); + } else { + return originalModelInfo_ == null + ? com.google.cloud.aiplatform.v1.Model.OriginalModelInfo.getDefaultInstance() + : originalModelInfo_; + } + } + /** + * + * + *
+     * Output only. If this Model is a copy of another Model, this contains info
+     * about the original.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Model.OriginalModelInfo original_model_info = 34 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.Model.OriginalModelInfo, + com.google.cloud.aiplatform.v1.Model.OriginalModelInfo.Builder, + com.google.cloud.aiplatform.v1.Model.OriginalModelInfoOrBuilder> + getOriginalModelInfoFieldBuilder() { + if (originalModelInfoBuilder_ == null) { + originalModelInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.Model.OriginalModelInfo, + com.google.cloud.aiplatform.v1.Model.OriginalModelInfo.Builder, + com.google.cloud.aiplatform.v1.Model.OriginalModelInfoOrBuilder>( + getOriginalModelInfo(), getParentForChildren(), isClean()); + originalModelInfo_ = null; + } + return originalModelInfoBuilder_; + } + private java.lang.Object metadataArtifact_ = ""; /** * @@ -11267,7 +12261,7 @@ public Builder setMetadataArtifact(java.lang.String value) { throw new NullPointerException(); } metadataArtifact_ = value; - bitField0_ |= 0x04000000; + bitField0_ |= 0x08000000; onChanged(); return this; } @@ -11287,7 +12281,7 @@ public Builder setMetadataArtifact(java.lang.String value) { */ public Builder clearMetadataArtifact() { metadataArtifact_ = getDefaultInstance().getMetadataArtifact(); - bitField0_ = (bitField0_ & ~0x04000000); + bitField0_ = (bitField0_ & ~0x08000000); onChanged(); return this; } @@ -11312,7 +12306,7 @@ public Builder setMetadataArtifactBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); metadataArtifact_ = value; - bitField0_ |= 0x04000000; + bitField0_ |= 0x08000000; onChanged(); return this; } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelOrBuilder.java index 03ba567425e0..9067d2e53d3c 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelOrBuilder.java @@ -1614,6 +1614,50 @@ java.lang.String getLabelsOrDefault( */ com.google.cloud.aiplatform.v1.ModelSourceInfoOrBuilder getModelSourceInfoOrBuilder(); + /** + * + * + *
+   * Output only. If this Model is a copy of another Model, this contains info
+   * about the original.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Model.OriginalModelInfo original_model_info = 34 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the originalModelInfo field is set. + */ + boolean hasOriginalModelInfo(); + /** + * + * + *
+   * Output only. If this Model is a copy of another Model, this contains info
+   * about the original.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Model.OriginalModelInfo original_model_info = 34 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The originalModelInfo. + */ + com.google.cloud.aiplatform.v1.Model.OriginalModelInfo getOriginalModelInfo(); + /** + * + * + *
+   * Output only. If this Model is a copy of another Model, this contains info
+   * about the original.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Model.OriginalModelInfo original_model_info = 34 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1.Model.OriginalModelInfoOrBuilder getOriginalModelInfoOrBuilder(); + /** * * diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelProto.java index 1cedfa965cf9..690b41272a11 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelProto.java @@ -35,6 +35,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_aiplatform_v1_Model_ExportFormat_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_aiplatform_v1_Model_ExportFormat_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_Model_OriginalModelInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_Model_OriginalModelInfo_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_aiplatform_v1_Model_LabelsEntry_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -73,7 +77,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "cloud/aiplatform/v1/env_var.proto\032,googl" + "e/cloud/aiplatform/v1/explanation.proto\032" + "\034google/protobuf/struct.proto\032\037google/pr" - + "otobuf/timestamp.proto\"\366\016\n\005Model\022\014\n\004name" + + "otobuf/timestamp.proto\"\232\020\n\005Model\022\014\n\004name" + "\030\001 \001(\t\022\032\n\nversion_id\030\034 \001(\tB\006\340A\005\340A\003\022\027\n\017ve" + "rsion_aliases\030\035 \003(\t\022<\n\023version_create_ti" + "me\030\037 \001(\0132\032.google.protobuf.TimestampB\003\340A" @@ -108,40 +112,44 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "(\0132*.google.cloud.aiplatform.v1.Encrypti" + "onSpec\022K\n\021model_source_info\030& \001(\0132+.goog" + "le.cloud.aiplatform.v1.ModelSourceInfoB\003" - + "\340A\003\022\036\n\021metadata_artifact\030, \001(\tB\003\340A\003\032\325\001\n\014" - + "ExportFormat\022\017\n\002id\030\001 \001(\tB\003\340A\003\022b\n\023exporta" - + "ble_contents\030\002 \003(\0162@.google.cloud.aiplat" - + "form.v1.Model.ExportFormat.ExportableCon" - + "tentB\003\340A\003\"P\n\021ExportableContent\022\"\n\036EXPORT" - + "ABLE_CONTENT_UNSPECIFIED\020\000\022\014\n\010ARTIFACT\020\001" - + "\022\t\n\005IMAGE\020\002\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022" - + "\r\n\005value\030\002 \001(\t:\0028\001\"\214\001\n\027DeploymentResourc" - + "esType\022)\n%DEPLOYMENT_RESOURCES_TYPE_UNSP" - + "ECIFIED\020\000\022\027\n\023DEDICATED_RESOURCES\020\001\022\027\n\023AU" - + "TOMATIC_RESOURCES\020\002\022\024\n\020SHARED_RESOURCES\020" - + "\003:\\\352AY\n\037aiplatform.googleapis.com/Model\022" - + "6projects/{project}/locations/{location}" - + "/models/{model}\"{\n\017PredictSchemata\022 \n\023in" - + "stance_schema_uri\030\001 \001(\tB\003\340A\005\022\"\n\025paramete" - + "rs_schema_uri\030\002 \001(\tB\003\340A\005\022\"\n\025prediction_s" - + "chema_uri\030\003 \001(\tB\003\340A\005\"\373\001\n\022ModelContainerS" - + "pec\022\031\n\timage_uri\030\001 \001(\tB\006\340A\002\340A\005\022\024\n\007comman" - + "d\030\002 \003(\tB\003\340A\005\022\021\n\004args\030\003 \003(\tB\003\340A\005\0224\n\003env\030\004" - + " \003(\0132\".google.cloud.aiplatform.v1.EnvVar" - + "B\003\340A\005\0224\n\005ports\030\005 \003(\0132 .google.cloud.aipl" - + "atform.v1.PortB\003\340A\005\022\032\n\rpredict_route\030\006 \001" - + "(\tB\003\340A\005\022\031\n\014health_route\030\007 \001(\tB\003\340A\005\"\036\n\004Po" - + "rt\022\026\n\016container_port\030\003 \001(\005\"\273\001\n\017ModelSour" - + "ceInfo\022P\n\013source_type\030\001 \001(\0162;.google.clo" - + "ud.aiplatform.v1.ModelSourceInfo.ModelSo" - + "urceType\"V\n\017ModelSourceType\022!\n\035MODEL_SOU" - + "RCE_TYPE_UNSPECIFIED\020\000\022\n\n\006AUTOML\020\001\022\n\n\006CU" - + "STOM\020\002\022\010\n\004BQML\020\003B\310\001\n\036com.google.cloud.ai" - + "platform.v1B\nModelProtoP\001Z>cloud.google." - + "com/go/aiplatform/apiv1/aiplatformpb;aip" - + "latformpb\252\002\032Google.Cloud.AIPlatform.V1\312\002" - + "\032Google\\Cloud\\AIPlatform\\V1\352\002\035Google::Cl" - + "oud::AIPlatform::V1b\006proto3" + + "\340A\003\022U\n\023original_model_info\030\" \001(\01323.googl" + + "e.cloud.aiplatform.v1.Model.OriginalMode" + + "lInfoB\003\340A\003\022\036\n\021metadata_artifact\030, \001(\tB\003\340" + + "A\003\032\325\001\n\014ExportFormat\022\017\n\002id\030\001 \001(\tB\003\340A\003\022b\n\023" + + "exportable_contents\030\002 \003(\0162@.google.cloud" + + ".aiplatform.v1.Model.ExportFormat.Export" + + "ableContentB\003\340A\003\"P\n\021ExportableContent\022\"\n" + + "\036EXPORTABLE_CONTENT_UNSPECIFIED\020\000\022\014\n\010ART" + + "IFACT\020\001\022\t\n\005IMAGE\020\002\032K\n\021OriginalModelInfo\022" + + "6\n\005model\030\001 \001(\tB\'\340A\003\372A!\n\037aiplatform.googl" + + "eapis.com/Model\032-\n\013LabelsEntry\022\013\n\003key\030\001 " + + "\001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\214\001\n\027DeploymentRes" + + "ourcesType\022)\n%DEPLOYMENT_RESOURCES_TYPE_" + + "UNSPECIFIED\020\000\022\027\n\023DEDICATED_RESOURCES\020\001\022\027" + + "\n\023AUTOMATIC_RESOURCES\020\002\022\024\n\020SHARED_RESOUR" + + "CES\020\003:\\\352AY\n\037aiplatform.googleapis.com/Mo" + + "del\0226projects/{project}/locations/{locat" + + "ion}/models/{model}\"{\n\017PredictSchemata\022 " + + "\n\023instance_schema_uri\030\001 \001(\tB\003\340A\005\022\"\n\025para" + + "meters_schema_uri\030\002 \001(\tB\003\340A\005\022\"\n\025predicti" + + "on_schema_uri\030\003 \001(\tB\003\340A\005\"\373\001\n\022ModelContai" + + "nerSpec\022\031\n\timage_uri\030\001 \001(\tB\006\340A\002\340A\005\022\024\n\007co" + + "mmand\030\002 \003(\tB\003\340A\005\022\021\n\004args\030\003 \003(\tB\003\340A\005\0224\n\003e" + + "nv\030\004 \003(\0132\".google.cloud.aiplatform.v1.En" + + "vVarB\003\340A\005\0224\n\005ports\030\005 \003(\0132 .google.cloud." + + "aiplatform.v1.PortB\003\340A\005\022\032\n\rpredict_route" + + "\030\006 \001(\tB\003\340A\005\022\031\n\014health_route\030\007 \001(\tB\003\340A\005\"\036" + + "\n\004Port\022\026\n\016container_port\030\003 \001(\005\"\273\001\n\017Model" + + "SourceInfo\022P\n\013source_type\030\001 \001(\0162;.google" + + ".cloud.aiplatform.v1.ModelSourceInfo.Mod" + + "elSourceType\"V\n\017ModelSourceType\022!\n\035MODEL" + + "_SOURCE_TYPE_UNSPECIFIED\020\000\022\n\n\006AUTOML\020\001\022\n" + + "\n\006CUSTOM\020\002\022\010\n\004BQML\020\003B\310\001\n\036com.google.clou" + + "d.aiplatform.v1B\nModelProtoP\001Z>cloud.goo" + + "gle.com/go/aiplatform/apiv1/aiplatformpb" + + ";aiplatformpb\252\002\032Google.Cloud.AIPlatform." + + "V1\312\002\032Google\\Cloud\\AIPlatform\\V1\352\002\035Google" + + "::Cloud::AIPlatform::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -188,6 +196,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Labels", "EncryptionSpec", "ModelSourceInfo", + "OriginalModelInfo", "MetadataArtifact", }); internal_static_google_cloud_aiplatform_v1_Model_ExportFormat_descriptor = @@ -198,8 +207,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Id", "ExportableContents", }); - internal_static_google_cloud_aiplatform_v1_Model_LabelsEntry_descriptor = + internal_static_google_cloud_aiplatform_v1_Model_OriginalModelInfo_descriptor = internal_static_google_cloud_aiplatform_v1_Model_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_aiplatform_v1_Model_OriginalModelInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_Model_OriginalModelInfo_descriptor, + new java.lang.String[] { + "Model", + }); + internal_static_google_cloud_aiplatform_v1_Model_LabelsEntry_descriptor = + internal_static_google_cloud_aiplatform_v1_Model_descriptor.getNestedTypes().get(2); internal_static_google_cloud_aiplatform_v1_Model_LabelsEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_Model_LabelsEntry_descriptor, diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelServiceProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelServiceProto.java index 7dd5331784e0..e1907a149cf5 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelServiceProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ModelServiceProto.java @@ -95,6 +95,18 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_aiplatform_v1_ExportModelResponse_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_aiplatform_v1_ExportModelResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_CopyModelRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_CopyModelRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_CopyModelOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_CopyModelOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_CopyModelResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_CopyModelResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_aiplatform_v1_ImportModelEvaluationRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -144,191 +156,212 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ce.proto\022\032google.cloud.aiplatform.v1\032\034go" + "ogle/api/annotations.proto\032\027google/api/c" + "lient.proto\032\037google/api/field_behavior.p" - + "roto\032\031google/api/resource.proto\032#google/" - + "cloud/aiplatform/v1/io.proto\032&google/clo" - + "ud/aiplatform/v1/model.proto\0321google/clo" - + "ud/aiplatform/v1/model_evaluation.proto\032" - + "7google/cloud/aiplatform/v1/model_evalua" - + "tion_slice.proto\032*google/cloud/aiplatfor" - + "m/v1/operation.proto\032#google/longrunning" - + "/operations.proto\032 google/protobuf/field" - + "_mask.proto\"\326\001\n\022UploadModelRequest\0229\n\006pa" - + "rent\030\001 \001(\tB)\340A\002\372A#\n!locations.googleapis" - + ".com/Location\022\031\n\014parent_model\030\004 \001(\tB\003\340A\001" - + "\022\025\n\010model_id\030\005 \001(\tB\003\340A\001\0225\n\005model\030\002 \001(\0132!" - + ".google.cloud.aiplatform.v1.ModelB\003\340A\002\022\034" - + "\n\017service_account\030\006 \001(\tB\003\340A\001\"n\n\034UploadMo" - + "delOperationMetadata\022N\n\020generic_metadata" - + "\030\001 \001(\01324.google.cloud.aiplatform.v1.Gene" - + "ricOperationMetadata\"i\n\023UploadModelRespo" - + "nse\0223\n\005model\030\001 \001(\tB$\372A!\n\037aiplatform.goog" - + "leapis.com/Model\022\035\n\020model_version_id\030\002 \001" - + "(\tB\003\340A\003\"H\n\017GetModelRequest\0225\n\004name\030\001 \001(\t" - + "B\'\340A\002\372A!\n\037aiplatform.googleapis.com/Mode" - + "l\"\306\001\n\021ListModelsRequest\0229\n\006parent\030\001 \001(\tB" - + ")\340A\002\372A#\n!locations.googleapis.com/Locati" - + "on\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022\022\n" - + "\npage_token\030\004 \001(\t\022-\n\tread_mask\030\005 \001(\0132\032.g" - + "oogle.protobuf.FieldMask\022\020\n\010order_by\030\006 \001" - + "(\t\"`\n\022ListModelsResponse\0221\n\006models\030\001 \003(\013" - + "2!.google.cloud.aiplatform.v1.Model\022\027\n\017n" - + "ext_page_token\030\002 \001(\t\"\311\001\n\030ListModelVersio" - + "nsRequest\0225\n\004name\030\001 \001(\tB\'\340A\002\372A!\n\037aiplatf" - + "orm.googleapis.com/Model\022\021\n\tpage_size\030\002 " - + "\001(\005\022\022\n\npage_token\030\003 \001(\t\022\016\n\006filter\030\004 \001(\t\022" - + "-\n\tread_mask\030\005 \001(\0132\032.google.protobuf.Fie" - + "ldMask\022\020\n\010order_by\030\006 \001(\t\"g\n\031ListModelVer" - + "sionsResponse\0221\n\006models\030\001 \003(\0132!.google.c" - + "loud.aiplatform.v1.Model\022\027\n\017next_page_to" - + "ken\030\002 \001(\t\"\201\001\n\022UpdateModelRequest\0225\n\005mode" - + "l\030\001 \001(\0132!.google.cloud.aiplatform.v1.Mod" - + "elB\003\340A\002\0224\n\013update_mask\030\002 \001(\0132\032.google.pr" - + "otobuf.FieldMaskB\003\340A\002\"K\n\022DeleteModelRequ" - + "est\0225\n\004name\030\001 \001(\tB\'\340A\002\372A!\n\037aiplatform.go" - + "ogleapis.com/Model\"R\n\031DeleteModelVersion" - + "Request\0225\n\004name\030\001 \001(\tB\'\340A\002\372A!\n\037aiplatfor" - + "m.googleapis.com/Model\"q\n\032MergeVersionAl" - + "iasesRequest\0225\n\004name\030\001 \001(\tB\'\340A\002\372A!\n\037aipl" - + "atform.googleapis.com/Model\022\034\n\017version_a" - + "liases\030\002 \003(\tB\003\340A\002\"\356\002\n\022ExportModelRequest" - + "\0225\n\004name\030\001 \001(\tB\'\340A\002\372A!\n\037aiplatform.googl" - + "eapis.com/Model\022W\n\routput_config\030\002 \001(\0132;" - + ".google.cloud.aiplatform.v1.ExportModelR" - + "equest.OutputConfigB\003\340A\002\032\307\001\n\014OutputConfi" - + "g\022\030\n\020export_format_id\030\001 \001(\t\022H\n\024artifact_" - + "destination\030\003 \001(\0132*.google.cloud.aiplatf" - + "orm.v1.GcsDestination\022S\n\021image_destinati" - + "on\030\004 \001(\01328.google.cloud.aiplatform.v1.Co" - + "ntainerRegistryDestination\"\234\002\n\034ExportMod" + + "roto\032\031google/api/resource.proto\0320google/" + + "cloud/aiplatform/v1/encryption_spec.prot" + + "o\032#google/cloud/aiplatform/v1/io.proto\032&" + + "google/cloud/aiplatform/v1/model.proto\0321" + + "google/cloud/aiplatform/v1/model_evaluat" + + "ion.proto\0327google/cloud/aiplatform/v1/mo" + + "del_evaluation_slice.proto\032*google/cloud" + + "/aiplatform/v1/operation.proto\032#google/l" + + "ongrunning/operations.proto\032 google/prot" + + "obuf/field_mask.proto\"\326\001\n\022UploadModelReq" + + "uest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!locations." + + "googleapis.com/Location\022\031\n\014parent_model\030" + + "\004 \001(\tB\003\340A\001\022\025\n\010model_id\030\005 \001(\tB\003\340A\001\0225\n\005mod" + + "el\030\002 \001(\0132!.google.cloud.aiplatform.v1.Mo" + + "delB\003\340A\002\022\034\n\017service_account\030\006 \001(\tB\003\340A\001\"n" + + "\n\034UploadModelOperationMetadata\022N\n\020generi" + + "c_metadata\030\001 \001(\01324.google.cloud.aiplatfo" + + "rm.v1.GenericOperationMetadata\"i\n\023Upload" + + "ModelResponse\0223\n\005model\030\001 \001(\tB$\372A!\n\037aipla" + + "tform.googleapis.com/Model\022\035\n\020model_vers" + + "ion_id\030\002 \001(\tB\003\340A\003\"H\n\017GetModelRequest\0225\n\004" + + "name\030\001 \001(\tB\'\340A\002\372A!\n\037aiplatform.googleapi" + + "s.com/Model\"\306\001\n\021ListModelsRequest\0229\n\006par" + + "ent\030\001 \001(\tB)\340A\002\372A#\n!locations.googleapis." + + "com/Location\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage_siz" + + "e\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\022-\n\tread_mask" + + "\030\005 \001(\0132\032.google.protobuf.FieldMask\022\020\n\010or" + + "der_by\030\006 \001(\t\"`\n\022ListModelsResponse\0221\n\006mo" + + "dels\030\001 \003(\0132!.google.cloud.aiplatform.v1." + + "Model\022\027\n\017next_page_token\030\002 \001(\t\"\311\001\n\030ListM" + + "odelVersionsRequest\0225\n\004name\030\001 \001(\tB\'\340A\002\372A" + + "!\n\037aiplatform.googleapis.com/Model\022\021\n\tpa" + + "ge_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\016\n\006fil" + + "ter\030\004 \001(\t\022-\n\tread_mask\030\005 \001(\0132\032.google.pr" + + "otobuf.FieldMask\022\020\n\010order_by\030\006 \001(\t\"g\n\031Li" + + "stModelVersionsResponse\0221\n\006models\030\001 \003(\0132" + + "!.google.cloud.aiplatform.v1.Model\022\027\n\017ne" + + "xt_page_token\030\002 \001(\t\"\201\001\n\022UpdateModelReque" + + "st\0225\n\005model\030\001 \001(\0132!.google.cloud.aiplatf" + + "orm.v1.ModelB\003\340A\002\0224\n\013update_mask\030\002 \001(\0132\032" + + ".google.protobuf.FieldMaskB\003\340A\002\"K\n\022Delet" + + "eModelRequest\0225\n\004name\030\001 \001(\tB\'\340A\002\372A!\n\037aip" + + "latform.googleapis.com/Model\"R\n\031DeleteMo" + + "delVersionRequest\0225\n\004name\030\001 \001(\tB\'\340A\002\372A!\n" + + "\037aiplatform.googleapis.com/Model\"q\n\032Merg" + + "eVersionAliasesRequest\0225\n\004name\030\001 \001(\tB\'\340A" + + "\002\372A!\n\037aiplatform.googleapis.com/Model\022\034\n" + + "\017version_aliases\030\002 \003(\tB\003\340A\002\"\356\002\n\022ExportMo" + + "delRequest\0225\n\004name\030\001 \001(\tB\'\340A\002\372A!\n\037aiplat" + + "form.googleapis.com/Model\022W\n\routput_conf" + + "ig\030\002 \001(\0132;.google.cloud.aiplatform.v1.Ex" + + "portModelRequest.OutputConfigB\003\340A\002\032\307\001\n\014O" + + "utputConfig\022\030\n\020export_format_id\030\001 \001(\t\022H\n" + + "\024artifact_destination\030\003 \001(\0132*.google.clo" + + "ud.aiplatform.v1.GcsDestination\022S\n\021image" + + "_destination\030\004 \001(\01328.google.cloud.aiplat" + + "form.v1.ContainerRegistryDestination\"\234\002\n" + + "\034ExportModelOperationMetadata\022N\n\020generic" + + "_metadata\030\001 \001(\01324.google.cloud.aiplatfor" + + "m.v1.GenericOperationMetadata\022]\n\013output_" + + "info\030\002 \001(\0132C.google.cloud.aiplatform.v1." + + "ExportModelOperationMetadata.OutputInfoB" + + "\003\340A\003\032M\n\nOutputInfo\022 \n\023artifact_output_ur" + + "i\030\002 \001(\tB\003\340A\003\022\035\n\020image_output_uri\030\003 \001(\tB\003" + + "\340A\003\"\025\n\023ExportModelResponse\"\300\002\n\020CopyModel" + + "Request\022\027\n\010model_id\030\004 \001(\tB\003\340A\001H\000\022?\n\014pare" + + "nt_model\030\005 \001(\tB\'\340A\001\372A!\n\037aiplatform.googl" + + "eapis.com/ModelH\000\0229\n\006parent\030\001 \001(\tB)\340A\002\372A" + + "#\n!locations.googleapis.com/Location\022=\n\014" + + "source_model\030\002 \001(\tB\'\340A\002\372A!\n\037aiplatform.g" + + "oogleapis.com/Model\022C\n\017encryption_spec\030\003" + + " \001(\0132*.google.cloud.aiplatform.v1.Encryp" + + "tionSpecB\023\n\021destination_model\"l\n\032CopyMod" + "elOperationMetadata\022N\n\020generic_metadata\030" + "\001 \001(\01324.google.cloud.aiplatform.v1.Gener" - + "icOperationMetadata\022]\n\013output_info\030\002 \001(\013" - + "2C.google.cloud.aiplatform.v1.ExportMode" - + "lOperationMetadata.OutputInfoB\003\340A\003\032M\n\nOu" - + "tputInfo\022 \n\023artifact_output_uri\030\002 \001(\tB\003\340" - + "A\003\022\035\n\020image_output_uri\030\003 \001(\tB\003\340A\003\"\025\n\023Exp" - + "ortModelResponse\"\243\001\n\034ImportModelEvaluati" - + "onRequest\0227\n\006parent\030\001 \001(\tB\'\340A\002\372A!\n\037aipla" - + "tform.googleapis.com/Model\022J\n\020model_eval" - + "uation\030\002 \001(\0132+.google.cloud.aiplatform.v" - + "1.ModelEvaluationB\003\340A\002\"\304\001\n\'BatchImportMo" - + "delEvaluationSlicesRequest\022A\n\006parent\030\001 \001" - + "(\tB1\340A\002\372A+\n)aiplatform.googleapis.com/Mo" - + "delEvaluation\022V\n\027model_evaluation_slices" - + "\030\002 \003(\01320.google.cloud.aiplatform.v1.Mode" - + "lEvaluationSliceB\003\340A\002\"Y\n(BatchImportMode" - + "lEvaluationSlicesResponse\022-\n imported_mo" - + "del_evaluation_slices\030\001 \003(\tB\003\340A\003\"\\\n\031GetM" - + "odelEvaluationRequest\022?\n\004name\030\001 \001(\tB1\340A\002" - + "\372A+\n)aiplatform.googleapis.com/ModelEval" - + "uation\"\274\001\n\033ListModelEvaluationsRequest\0227" - + "\n\006parent\030\001 \001(\tB\'\340A\002\372A!\n\037aiplatform.googl" - + "eapis.com/Model\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage_" - + "size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\022-\n\tread_m" - + "ask\030\005 \001(\0132\032.google.protobuf.FieldMask\"\177\n" - + "\034ListModelEvaluationsResponse\022F\n\021model_e" - + "valuations\030\001 \003(\0132+.google.cloud.aiplatfo" - + "rm.v1.ModelEvaluation\022\027\n\017next_page_token" - + "\030\002 \001(\t\"f\n\036GetModelEvaluationSliceRequest" - + "\022D\n\004name\030\001 \001(\tB6\340A\002\372A0\n.aiplatform.googl" - + "eapis.com/ModelEvaluationSlice\"\313\001\n ListM" - + "odelEvaluationSlicesRequest\022A\n\006parent\030\001 " - + "\001(\tB1\340A\002\372A+\n)aiplatform.googleapis.com/M" - + "odelEvaluation\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage_s" - + "ize\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\022-\n\tread_ma" - + "sk\030\005 \001(\0132\032.google.protobuf.FieldMask\"\217\001\n" - + "!ListModelEvaluationSlicesResponse\022Q\n\027mo" - + "del_evaluation_slices\030\001 \003(\01320.google.clo" - + "ud.aiplatform.v1.ModelEvaluationSlice\022\027\n" - + "\017next_page_token\030\002 \001(\t2\362\031\n\014ModelService\022" - + "\340\001\n\013UploadModel\022..google.cloud.aiplatfor" - + "m.v1.UploadModelRequest\032\035.google.longrun" - + "ning.Operation\"\201\001\202\323\344\223\0026\"1/v1/{parent=pro" - + "jects/*/locations/*}/models:upload:\001*\332A\014" - + "parent,model\312A3\n\023UploadModelResponse\022\034Up" - + "loadModelOperationMetadata\022\225\001\n\010GetModel\022" - + "+.google.cloud.aiplatform.v1.GetModelReq" - + "uest\032!.google.cloud.aiplatform.v1.Model\"" - + "9\202\323\344\223\002,\022*/v1/{name=projects/*/locations/" - + "*/models/*}\332A\004name\022\250\001\n\nListModels\022-.goog" - + "le.cloud.aiplatform.v1.ListModelsRequest" - + "\032..google.cloud.aiplatform.v1.ListModels" - + "Response\";\202\323\344\223\002,\022*/v1/{parent=projects/*" - + "/locations/*}/models\332A\006parent\022\310\001\n\021ListMo" - + "delVersions\0224.google.cloud.aiplatform.v1" - + ".ListModelVersionsRequest\0325.google.cloud" - + ".aiplatform.v1.ListModelVersionsResponse" - + "\"F\202\323\344\223\0029\0227/v1/{name=projects/*/locations" - + "/*/models/*}:listVersions\332A\004name\022\265\001\n\013Upd" - + "ateModel\022..google.cloud.aiplatform.v1.Up" - + "dateModelRequest\032!.google.cloud.aiplatfo" - + "rm.v1.Model\"S\202\323\344\223\002920/v1/{model.name=pro" - + "jects/*/locations/*/models/*}:\005model\332A\021m" - + "odel,update_mask\022\312\001\n\013DeleteModel\022..googl" - + "e.cloud.aiplatform.v1.DeleteModelRequest" - + "\032\035.google.longrunning.Operation\"l\202\323\344\223\002,*" - + "*/v1/{name=projects/*/locations/*/models" - + "/*}\332A\004name\312A0\n\025google.protobuf.Empty\022\027De" - + "leteOperationMetadata\022\346\001\n\022DeleteModelVer" - + "sion\0225.google.cloud.aiplatform.v1.Delete" - + "ModelVersionRequest\032\035.google.longrunning" - + ".Operation\"z\202\323\344\223\002:*8/v1/{name=projects/*" - + "/locations/*/models/*}:deleteVersion\332A\004n" - + "ame\312A0\n\025google.protobuf.Empty\022\027DeleteOpe" - + "rationMetadata\022\322\001\n\023MergeVersionAliases\0226" - + ".google.cloud.aiplatform.v1.MergeVersion" - + "AliasesRequest\032!.google.cloud.aiplatform" - + ".v1.Model\"`\202\323\344\223\002C\">/v1/{name=projects/*/" - + "locations/*/models/*}:mergeVersionAliase" - + "s:\001*\332A\024name,version_aliases\022\346\001\n\013ExportMo" - + "del\022..google.cloud.aiplatform.v1.ExportM" + + "icOperationMetadata\"g\n\021CopyModelResponse" + + "\0223\n\005model\030\001 \001(\tB$\372A!\n\037aiplatform.googlea" + + "pis.com/Model\022\035\n\020model_version_id\030\002 \001(\tB" + + "\003\340A\003\"\243\001\n\034ImportModelEvaluationRequest\0227\n" + + "\006parent\030\001 \001(\tB\'\340A\002\372A!\n\037aiplatform.google" + + "apis.com/Model\022J\n\020model_evaluation\030\002 \001(\013" + + "2+.google.cloud.aiplatform.v1.ModelEvalu" + + "ationB\003\340A\002\"\304\001\n\'BatchImportModelEvaluatio" + + "nSlicesRequest\022A\n\006parent\030\001 \001(\tB1\340A\002\372A+\n)" + + "aiplatform.googleapis.com/ModelEvaluatio" + + "n\022V\n\027model_evaluation_slices\030\002 \003(\01320.goo" + + "gle.cloud.aiplatform.v1.ModelEvaluationS" + + "liceB\003\340A\002\"Y\n(BatchImportModelEvaluationS" + + "licesResponse\022-\n imported_model_evaluati" + + "on_slices\030\001 \003(\tB\003\340A\003\"\\\n\031GetModelEvaluati" + + "onRequest\022?\n\004name\030\001 \001(\tB1\340A\002\372A+\n)aiplatf" + + "orm.googleapis.com/ModelEvaluation\"\274\001\n\033L" + + "istModelEvaluationsRequest\0227\n\006parent\030\001 \001" + + "(\tB\'\340A\002\372A!\n\037aiplatform.googleapis.com/Mo" + + "del\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022\022" + + "\n\npage_token\030\004 \001(\t\022-\n\tread_mask\030\005 \001(\0132\032." + + "google.protobuf.FieldMask\"\177\n\034ListModelEv" + + "aluationsResponse\022F\n\021model_evaluations\030\001" + + " \003(\0132+.google.cloud.aiplatform.v1.ModelE" + + "valuation\022\027\n\017next_page_token\030\002 \001(\t\"f\n\036Ge" + + "tModelEvaluationSliceRequest\022D\n\004name\030\001 \001" + + "(\tB6\340A\002\372A0\n.aiplatform.googleapis.com/Mo" + + "delEvaluationSlice\"\313\001\n ListModelEvaluati" + + "onSlicesRequest\022A\n\006parent\030\001 \001(\tB1\340A\002\372A+\n" + + ")aiplatform.googleapis.com/ModelEvaluati" + + "on\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022\022\n" + + "\npage_token\030\004 \001(\t\022-\n\tread_mask\030\005 \001(\0132\032.g" + + "oogle.protobuf.FieldMask\"\217\001\n!ListModelEv" + + "aluationSlicesResponse\022Q\n\027model_evaluati" + + "on_slices\030\001 \003(\01320.google.cloud.aiplatfor" + + "m.v1.ModelEvaluationSlice\022\027\n\017next_page_t" + + "oken\030\002 \001(\t2\322\033\n\014ModelService\022\340\001\n\013UploadMo" + + "del\022..google.cloud.aiplatform.v1.UploadM" + "odelRequest\032\035.google.longrunning.Operati" - + "on\"\207\001\202\323\344\223\0026\"1/v1/{name=projects/*/locati" - + "ons/*/models/*}:export:\001*\332A\022name,output_" - + "config\312A3\n\023ExportModelResponse\022\034ExportMo" - + "delOperationMetadata\022\344\001\n\025ImportModelEval" - + "uation\0228.google.cloud.aiplatform.v1.Impo" - + "rtModelEvaluationRequest\032+.google.cloud." - + "aiplatform.v1.ModelEvaluation\"d\202\323\344\223\002D\"?/" - + "v1/{parent=projects/*/locations/*/models" - + "/*}/evaluations:import:\001*\332A\027parent,model" - + "_evaluation\022\250\002\n BatchImportModelEvaluati" - + "onSlices\022C.google.cloud.aiplatform.v1.Ba" - + "tchImportModelEvaluationSlicesRequest\032D." - + "google.cloud.aiplatform.v1.BatchImportMo" - + "delEvaluationSlicesResponse\"y\202\323\344\223\002R\"M/v1" - + "/{parent=projects/*/locations/*/models/*" - + "/evaluations/*}/slices:batchImport:\001*\332A\036" - + "parent,model_evaluation_slices\022\301\001\n\022GetMo" - + "delEvaluation\0225.google.cloud.aiplatform." - + "v1.GetModelEvaluationRequest\032+.google.cl" - + "oud.aiplatform.v1.ModelEvaluation\"G\202\323\344\223\002" - + ":\0228/v1/{name=projects/*/locations/*/mode" - + "ls/*/evaluations/*}\332A\004name\022\324\001\n\024ListModel" - + "Evaluations\0227.google.cloud.aiplatform.v1" - + ".ListModelEvaluationsRequest\0328.google.cl" - + "oud.aiplatform.v1.ListModelEvaluationsRe" - + "sponse\"I\202\323\344\223\002:\0228/v1/{parent=projects/*/l" - + "ocations/*/models/*}/evaluations\332A\006paren" - + "t\022\331\001\n\027GetModelEvaluationSlice\022:.google.c" - + "loud.aiplatform.v1.GetModelEvaluationSli" - + "ceRequest\0320.google.cloud.aiplatform.v1.M" - + "odelEvaluationSlice\"P\202\323\344\223\002C\022A/v1/{name=p" - + "rojects/*/locations/*/models/*/evaluatio" - + "ns/*/slices/*}\332A\004name\022\354\001\n\031ListModelEvalu" - + "ationSlices\022<.google.cloud.aiplatform.v1" - + ".ListModelEvaluationSlicesRequest\032=.goog" - + "le.cloud.aiplatform.v1.ListModelEvaluati" - + "onSlicesResponse\"R\202\323\344\223\002C\022A/v1/{parent=pr" - + "ojects/*/locations/*/models/*/evaluation" - + "s/*}/slices\332A\006parent\032M\312A\031aiplatform.goog" - + "leapis.com\322A.https://www.googleapis.com/" - + "auth/cloud-platformB\317\001\n\036com.google.cloud" - + ".aiplatform.v1B\021ModelServiceProtoP\001Z>clo" - + "ud.google.com/go/aiplatform/apiv1/aiplat" - + "formpb;aiplatformpb\252\002\032Google.Cloud.AIPla" - + "tform.V1\312\002\032Google\\Cloud\\AIPlatform\\V1\352\002\035" - + "Google::Cloud::AIPlatform::V1b\006proto3" + + "on\"\201\001\202\323\344\223\0026\"1/v1/{parent=projects/*/loca" + + "tions/*}/models:upload:\001*\332A\014parent,model" + + "\312A3\n\023UploadModelResponse\022\034UploadModelOpe" + + "rationMetadata\022\225\001\n\010GetModel\022+.google.clo" + + "ud.aiplatform.v1.GetModelRequest\032!.googl" + + "e.cloud.aiplatform.v1.Model\"9\202\323\344\223\002,\022*/v1" + + "/{name=projects/*/locations/*/models/*}\332" + + "A\004name\022\250\001\n\nListModels\022-.google.cloud.aip" + + "latform.v1.ListModelsRequest\032..google.cl" + + "oud.aiplatform.v1.ListModelsResponse\";\202\323" + + "\344\223\002,\022*/v1/{parent=projects/*/locations/*" + + "}/models\332A\006parent\022\310\001\n\021ListModelVersions\022" + + "4.google.cloud.aiplatform.v1.ListModelVe" + + "rsionsRequest\0325.google.cloud.aiplatform." + + "v1.ListModelVersionsResponse\"F\202\323\344\223\0029\0227/v" + + "1/{name=projects/*/locations/*/models/*}" + + ":listVersions\332A\004name\022\265\001\n\013UpdateModel\022..g" + + "oogle.cloud.aiplatform.v1.UpdateModelReq" + + "uest\032!.google.cloud.aiplatform.v1.Model\"" + + "S\202\323\344\223\002920/v1/{model.name=projects/*/loca" + + "tions/*/models/*}:\005model\332A\021model,update_" + + "mask\022\312\001\n\013DeleteModel\022..google.cloud.aipl" + + "atform.v1.DeleteModelRequest\032\035.google.lo" + + "ngrunning.Operation\"l\202\323\344\223\002,**/v1/{name=p" + + "rojects/*/locations/*/models/*}\332A\004name\312A" + + "0\n\025google.protobuf.Empty\022\027DeleteOperatio" + + "nMetadata\022\346\001\n\022DeleteModelVersion\0225.googl" + + "e.cloud.aiplatform.v1.DeleteModelVersion" + + "Request\032\035.google.longrunning.Operation\"z" + + "\202\323\344\223\002:*8/v1/{name=projects/*/locations/*" + + "/models/*}:deleteVersion\332A\004name\312A0\n\025goog" + + "le.protobuf.Empty\022\027DeleteOperationMetada" + + "ta\022\322\001\n\023MergeVersionAliases\0226.google.clou" + + "d.aiplatform.v1.MergeVersionAliasesReque" + + "st\032!.google.cloud.aiplatform.v1.Model\"`\202" + + "\323\344\223\002C\">/v1/{name=projects/*/locations/*/" + + "models/*}:mergeVersionAliases:\001*\332A\024name," + + "version_aliases\022\346\001\n\013ExportModel\022..google" + + ".cloud.aiplatform.v1.ExportModelRequest\032" + + "\035.google.longrunning.Operation\"\207\001\202\323\344\223\0026\"" + + "1/v1/{name=projects/*/locations/*/models" + + "/*}:export:\001*\332A\022name,output_config\312A3\n\023E" + + "xportModelResponse\022\034ExportModelOperation" + + "Metadata\022\335\001\n\tCopyModel\022,.google.cloud.ai" + + "platform.v1.CopyModelRequest\032\035.google.lo" + + "ngrunning.Operation\"\202\001\202\323\344\223\0024\"//v1/{paren" + + "t=projects/*/locations/*}/models:copy:\001*" + + "\332A\023parent,source_model\312A/\n\021CopyModelResp" + + "onse\022\032CopyModelOperationMetadata\022\344\001\n\025Imp" + + "ortModelEvaluation\0228.google.cloud.aiplat" + + "form.v1.ImportModelEvaluationRequest\032+.g" + + "oogle.cloud.aiplatform.v1.ModelEvaluatio" + + "n\"d\202\323\344\223\002D\"?/v1/{parent=projects/*/locati" + + "ons/*/models/*}/evaluations:import:\001*\332A\027" + + "parent,model_evaluation\022\250\002\n BatchImportM" + + "odelEvaluationSlices\022C.google.cloud.aipl" + + "atform.v1.BatchImportModelEvaluationSlic" + + "esRequest\032D.google.cloud.aiplatform.v1.B" + + "atchImportModelEvaluationSlicesResponse\"" + + "y\202\323\344\223\002R\"M/v1/{parent=projects/*/location" + + "s/*/models/*/evaluations/*}/slices:batch" + + "Import:\001*\332A\036parent,model_evaluation_slic" + + "es\022\301\001\n\022GetModelEvaluation\0225.google.cloud" + + ".aiplatform.v1.GetModelEvaluationRequest" + + "\032+.google.cloud.aiplatform.v1.ModelEvalu" + + "ation\"G\202\323\344\223\002:\0228/v1/{name=projects/*/loca" + + "tions/*/models/*/evaluations/*}\332A\004name\022\324" + + "\001\n\024ListModelEvaluations\0227.google.cloud.a" + + "iplatform.v1.ListModelEvaluationsRequest" + + "\0328.google.cloud.aiplatform.v1.ListModelE" + + "valuationsResponse\"I\202\323\344\223\002:\0228/v1/{parent=" + + "projects/*/locations/*/models/*}/evaluat" + + "ions\332A\006parent\022\331\001\n\027GetModelEvaluationSlic" + + "e\022:.google.cloud.aiplatform.v1.GetModelE" + + "valuationSliceRequest\0320.google.cloud.aip" + + "latform.v1.ModelEvaluationSlice\"P\202\323\344\223\002C\022" + + "A/v1/{name=projects/*/locations/*/models" + + "/*/evaluations/*/slices/*}\332A\004name\022\354\001\n\031Li" + + "stModelEvaluationSlices\022<.google.cloud.a" + + "iplatform.v1.ListModelEvaluationSlicesRe" + + "quest\032=.google.cloud.aiplatform.v1.ListM" + + "odelEvaluationSlicesResponse\"R\202\323\344\223\002C\022A/v" + + "1/{parent=projects/*/locations/*/models/" + + "*/evaluations/*}/slices\332A\006parent\032M\312A\031aip" + + "latform.googleapis.com\322A.https://www.goo" + + "gleapis.com/auth/cloud-platformB\317\001\n\036com." + + "google.cloud.aiplatform.v1B\021ModelService" + + "ProtoP\001Z>cloud.google.com/go/aiplatform/" + + "apiv1/aiplatformpb;aiplatformpb\252\002\032Google" + + ".Cloud.AIPlatform.V1\312\002\032Google\\Cloud\\AIPl" + + "atform\\V1\352\002\035Google::Cloud::AIPlatform::V" + + "1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -338,6 +371,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ClientProto.getDescriptor(), com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.aiplatform.v1.EncryptionSpecProto.getDescriptor(), com.google.cloud.aiplatform.v1.IoProto.getDescriptor(), com.google.cloud.aiplatform.v1.ModelProto.getDescriptor(), com.google.cloud.aiplatform.v1.ModelEvaluationProto.getDescriptor(), @@ -484,8 +518,37 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_ExportModelResponse_descriptor, new java.lang.String[] {}); - internal_static_google_cloud_aiplatform_v1_ImportModelEvaluationRequest_descriptor = + internal_static_google_cloud_aiplatform_v1_CopyModelRequest_descriptor = getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_aiplatform_v1_CopyModelRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_CopyModelRequest_descriptor, + new java.lang.String[] { + "ModelId", + "ParentModel", + "Parent", + "SourceModel", + "EncryptionSpec", + "DestinationModel", + }); + internal_static_google_cloud_aiplatform_v1_CopyModelOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_aiplatform_v1_CopyModelOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_CopyModelOperationMetadata_descriptor, + new java.lang.String[] { + "GenericMetadata", + }); + internal_static_google_cloud_aiplatform_v1_CopyModelResponse_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_aiplatform_v1_CopyModelResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_CopyModelResponse_descriptor, + new java.lang.String[] { + "Model", "ModelVersionId", + }); + internal_static_google_cloud_aiplatform_v1_ImportModelEvaluationRequest_descriptor = + getDescriptor().getMessageTypes().get(18); internal_static_google_cloud_aiplatform_v1_ImportModelEvaluationRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_ImportModelEvaluationRequest_descriptor, @@ -493,7 +556,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "ModelEvaluation", }); internal_static_google_cloud_aiplatform_v1_BatchImportModelEvaluationSlicesRequest_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageTypes().get(19); internal_static_google_cloud_aiplatform_v1_BatchImportModelEvaluationSlicesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_BatchImportModelEvaluationSlicesRequest_descriptor, @@ -501,7 +564,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "ModelEvaluationSlices", }); internal_static_google_cloud_aiplatform_v1_BatchImportModelEvaluationSlicesResponse_descriptor = - getDescriptor().getMessageTypes().get(17); + getDescriptor().getMessageTypes().get(20); internal_static_google_cloud_aiplatform_v1_BatchImportModelEvaluationSlicesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_BatchImportModelEvaluationSlicesResponse_descriptor, @@ -509,7 +572,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ImportedModelEvaluationSlices", }); internal_static_google_cloud_aiplatform_v1_GetModelEvaluationRequest_descriptor = - getDescriptor().getMessageTypes().get(18); + getDescriptor().getMessageTypes().get(21); internal_static_google_cloud_aiplatform_v1_GetModelEvaluationRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_GetModelEvaluationRequest_descriptor, @@ -517,7 +580,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_aiplatform_v1_ListModelEvaluationsRequest_descriptor = - getDescriptor().getMessageTypes().get(19); + getDescriptor().getMessageTypes().get(22); internal_static_google_cloud_aiplatform_v1_ListModelEvaluationsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_ListModelEvaluationsRequest_descriptor, @@ -525,7 +588,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "Filter", "PageSize", "PageToken", "ReadMask", }); internal_static_google_cloud_aiplatform_v1_ListModelEvaluationsResponse_descriptor = - getDescriptor().getMessageTypes().get(20); + getDescriptor().getMessageTypes().get(23); internal_static_google_cloud_aiplatform_v1_ListModelEvaluationsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_ListModelEvaluationsResponse_descriptor, @@ -533,7 +596,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ModelEvaluations", "NextPageToken", }); internal_static_google_cloud_aiplatform_v1_GetModelEvaluationSliceRequest_descriptor = - getDescriptor().getMessageTypes().get(21); + getDescriptor().getMessageTypes().get(24); internal_static_google_cloud_aiplatform_v1_GetModelEvaluationSliceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_GetModelEvaluationSliceRequest_descriptor, @@ -541,7 +604,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_aiplatform_v1_ListModelEvaluationSlicesRequest_descriptor = - getDescriptor().getMessageTypes().get(22); + getDescriptor().getMessageTypes().get(25); internal_static_google_cloud_aiplatform_v1_ListModelEvaluationSlicesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_ListModelEvaluationSlicesRequest_descriptor, @@ -549,7 +612,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "Filter", "PageSize", "PageToken", "ReadMask", }); internal_static_google_cloud_aiplatform_v1_ListModelEvaluationSlicesResponse_descriptor = - getDescriptor().getMessageTypes().get(23); + getDescriptor().getMessageTypes().get(26); internal_static_google_cloud_aiplatform_v1_ListModelEvaluationSlicesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_ListModelEvaluationSlicesResponse_descriptor, @@ -571,6 +634,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ClientProto.getDescriptor(); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.aiplatform.v1.EncryptionSpecProto.getDescriptor(); com.google.cloud.aiplatform.v1.IoProto.getDescriptor(); com.google.cloud.aiplatform.v1.ModelProto.getDescriptor(); com.google.cloud.aiplatform.v1.ModelEvaluationProto.getDescriptor(); diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NasJob.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NasJob.java new file mode 100644 index 000000000000..1a9e93a134b6 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NasJob.java @@ -0,0 +1,3719 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/nas_job.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Represents a Neural Architecture Search (NAS) job.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.NasJob} + */ +public final class NasJob extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.NasJob) + NasJobOrBuilder { + private static final long serialVersionUID = 0L; + // Use NasJob.newBuilder() to construct. + private NasJob(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NasJob() { + name_ = ""; + displayName_ = ""; + state_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NasJob(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NasJobProto + .internal_static_google_cloud_aiplatform_v1_NasJob_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(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.NasJobProto + .internal_static_google_cloud_aiplatform_v1_NasJob_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.NasJob.class, + com.google.cloud.aiplatform.v1.NasJob.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Output only. Resource name of the NasJob.
+   * 
+ * + * 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. Resource name of the NasJob.
+   * 
+ * + * 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 NasJob.
+   * 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 NasJob.
+   * 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 NAS_JOB_SPEC_FIELD_NUMBER = 4; + private com.google.cloud.aiplatform.v1.NasJobSpec nasJobSpec_; + /** + * + * + *
+   * Required. The specification of a NasJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec nas_job_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the nasJobSpec field is set. + */ + @java.lang.Override + public boolean hasNasJobSpec() { + return nasJobSpec_ != null; + } + /** + * + * + *
+   * Required. The specification of a NasJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec nas_job_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The nasJobSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasJobSpec getNasJobSpec() { + return nasJobSpec_ == null + ? com.google.cloud.aiplatform.v1.NasJobSpec.getDefaultInstance() + : nasJobSpec_; + } + /** + * + * + *
+   * Required. The specification of a NasJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec nas_job_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasJobSpecOrBuilder getNasJobSpecOrBuilder() { + return nasJobSpec_ == null + ? com.google.cloud.aiplatform.v1.NasJobSpec.getDefaultInstance() + : nasJobSpec_; + } + + public static final int NAS_JOB_OUTPUT_FIELD_NUMBER = 5; + private com.google.cloud.aiplatform.v1.NasJobOutput nasJobOutput_; + /** + * + * + *
+   * Output only. Output of the NasJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobOutput nas_job_output = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the nasJobOutput field is set. + */ + @java.lang.Override + public boolean hasNasJobOutput() { + return nasJobOutput_ != null; + } + /** + * + * + *
+   * Output only. Output of the NasJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobOutput nas_job_output = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The nasJobOutput. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasJobOutput getNasJobOutput() { + return nasJobOutput_ == null + ? com.google.cloud.aiplatform.v1.NasJobOutput.getDefaultInstance() + : nasJobOutput_; + } + /** + * + * + *
+   * Output only. Output of the NasJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobOutput nas_job_output = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasJobOutputOrBuilder getNasJobOutputOrBuilder() { + return nasJobOutput_ == null + ? com.google.cloud.aiplatform.v1.NasJobOutput.getDefaultInstance() + : nasJobOutput_; + } + + 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 NasJob 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 createTime_ != null; + } + /** + * + * + *
+   * Output only. Time when the NasJob 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 NasJob 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 NasJob 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 startTime_ != null; + } + /** + * + * + *
+   * Output only. Time when the NasJob 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 NasJob 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 NasJob entered any of the following states:
+   * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+   * 
+ * + * .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 endTime_ != null; + } + /** + * + * + *
+   * Output only. Time when the NasJob entered any of the following states:
+   * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+   * 
+ * + * .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 NasJob entered any of the following states:
+   * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+   * 
+ * + * .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 NasJob 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 updateTime_ != null; + } + /** + * + * + *
+   * Output only. Time when the NasJob 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 NasJob 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 error_ != null; + } + /** + * + * + *
+   * 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.NasJobProto + .internal_static_google_cloud_aiplatform_v1_NasJob_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 NasJobs.
+   * 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; + */ + @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 NasJobs.
+   * 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; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * The labels with user-defined metadata to organize NasJobs.
+   * 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; + */ + @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 NasJobs.
+   * 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; + */ + @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 ENCRYPTION_SPEC_FIELD_NUMBER = 13; + private com.google.cloud.aiplatform.v1.EncryptionSpec encryptionSpec_; + /** + * + * + *
+   * Customer-managed encryption key options for a NasJob.
+   * If this is set, then all resources created by the NasJob
+   * will be encrypted with the provided encryption key.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 13; + * + * @return Whether the encryptionSpec field is set. + */ + @java.lang.Override + public boolean hasEncryptionSpec() { + return encryptionSpec_ != null; + } + /** + * + * + *
+   * Customer-managed encryption key options for a NasJob.
+   * If this is set, then all resources created by the NasJob
+   * will be encrypted with the provided encryption key.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 13; + * + * @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_; + } + /** + * + * + *
+   * Customer-managed encryption key options for a NasJob.
+   * If this is set, then all resources created by the NasJob
+   * will be encrypted with the provided encryption key.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 13; + */ + @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 ENABLE_RESTRICTED_IMAGE_TRAINING_FIELD_NUMBER = 14; + private boolean enableRestrictedImageTraining_ = false; + /** + * + * + *
+   * Optional. Enable a separation of Custom model training
+   * and restricted image training for tenant project.
+   * 
+ * + * bool enable_restricted_image_training = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enableRestrictedImageTraining. + */ + @java.lang.Override + public boolean getEnableRestrictedImageTraining() { + return enableRestrictedImageTraining_; + } + + 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 (nasJobSpec_ != null) { + output.writeMessage(4, getNasJobSpec()); + } + if (nasJobOutput_ != null) { + output.writeMessage(5, getNasJobOutput()); + } + if (state_ != com.google.cloud.aiplatform.v1.JobState.JOB_STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(6, state_); + } + if (createTime_ != null) { + output.writeMessage(7, getCreateTime()); + } + if (startTime_ != null) { + output.writeMessage(8, getStartTime()); + } + if (endTime_ != null) { + output.writeMessage(9, getEndTime()); + } + if (updateTime_ != null) { + output.writeMessage(10, getUpdateTime()); + } + if (error_ != null) { + output.writeMessage(11, getError()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 12); + if (encryptionSpec_ != null) { + output.writeMessage(13, getEncryptionSpec()); + } + if (enableRestrictedImageTraining_ != false) { + output.writeBool(14, enableRestrictedImageTraining_); + } + 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 (nasJobSpec_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getNasJobSpec()); + } + if (nasJobOutput_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getNasJobOutput()); + } + if (state_ != com.google.cloud.aiplatform.v1.JobState.JOB_STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, state_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getCreateTime()); + } + if (startTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getStartTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getEndTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getUpdateTime()); + } + if (error_ != null) { + 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 (encryptionSpec_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getEncryptionSpec()); + } + if (enableRestrictedImageTraining_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(14, enableRestrictedImageTraining_); + } + 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.NasJob)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.NasJob other = (com.google.cloud.aiplatform.v1.NasJob) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (hasNasJobSpec() != other.hasNasJobSpec()) return false; + if (hasNasJobSpec()) { + if (!getNasJobSpec().equals(other.getNasJobSpec())) return false; + } + if (hasNasJobOutput() != other.hasNasJobOutput()) return false; + if (hasNasJobOutput()) { + if (!getNasJobOutput().equals(other.getNasJobOutput())) 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 (hasEncryptionSpec() != other.hasEncryptionSpec()) return false; + if (hasEncryptionSpec()) { + if (!getEncryptionSpec().equals(other.getEncryptionSpec())) return false; + } + if (getEnableRestrictedImageTraining() != other.getEnableRestrictedImageTraining()) + 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 (hasNasJobSpec()) { + hash = (37 * hash) + NAS_JOB_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getNasJobSpec().hashCode(); + } + if (hasNasJobOutput()) { + hash = (37 * hash) + NAS_JOB_OUTPUT_FIELD_NUMBER; + hash = (53 * hash) + getNasJobOutput().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(); + } + if (hasEncryptionSpec()) { + hash = (37 * hash) + ENCRYPTION_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getEncryptionSpec().hashCode(); + } + hash = (37 * hash) + ENABLE_RESTRICTED_IMAGE_TRAINING_FIELD_NUMBER; + hash = + (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableRestrictedImageTraining()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.NasJob parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.NasJob 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.NasJob parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.NasJob 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.NasJob parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.NasJob 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.NasJob parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.NasJob 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.NasJob parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.NasJob 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.NasJob 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.NasJob 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.NasJob 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 Neural Architecture Search (NAS) job.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.NasJob} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.NasJob) + com.google.cloud.aiplatform.v1.NasJobOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NasJobProto + .internal_static_google_cloud_aiplatform_v1_NasJob_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 12: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(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.NasJobProto + .internal_static_google_cloud_aiplatform_v1_NasJob_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.NasJob.class, + com.google.cloud.aiplatform.v1.NasJob.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.NasJob.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + displayName_ = ""; + nasJobSpec_ = null; + if (nasJobSpecBuilder_ != null) { + nasJobSpecBuilder_.dispose(); + nasJobSpecBuilder_ = null; + } + nasJobOutput_ = null; + if (nasJobOutputBuilder_ != null) { + nasJobOutputBuilder_.dispose(); + nasJobOutputBuilder_ = null; + } + 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(); + encryptionSpec_ = null; + if (encryptionSpecBuilder_ != null) { + encryptionSpecBuilder_.dispose(); + encryptionSpecBuilder_ = null; + } + enableRestrictedImageTraining_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.NasJobProto + .internal_static_google_cloud_aiplatform_v1_NasJob_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasJob getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.NasJob.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasJob build() { + com.google.cloud.aiplatform.v1.NasJob result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasJob buildPartial() { + com.google.cloud.aiplatform.v1.NasJob result = + new com.google.cloud.aiplatform.v1.NasJob(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.NasJob 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.nasJobSpec_ = nasJobSpecBuilder_ == null ? nasJobSpec_ : nasJobSpecBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.nasJobOutput_ = + nasJobOutputBuilder_ == null ? nasJobOutput_ : nasJobOutputBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.error_ = errorBuilder_ == null ? error_ : errorBuilder_.build(); + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.encryptionSpec_ = + encryptionSpecBuilder_ == null ? encryptionSpec_ : encryptionSpecBuilder_.build(); + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.enableRestrictedImageTraining_ = enableRestrictedImageTraining_; + } + } + + @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.NasJob) { + return mergeFrom((com.google.cloud.aiplatform.v1.NasJob) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.NasJob other) { + if (other == com.google.cloud.aiplatform.v1.NasJob.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.hasNasJobSpec()) { + mergeNasJobSpec(other.getNasJobSpec()); + } + if (other.hasNasJobOutput()) { + mergeNasJobOutput(other.getNasJobOutput()); + } + 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_ |= 0x00000400; + if (other.hasEncryptionSpec()) { + mergeEncryptionSpec(other.getEncryptionSpec()); + } + if (other.getEnableRestrictedImageTraining() != false) { + setEnableRestrictedImageTraining(other.getEnableRestrictedImageTraining()); + } + 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: + { + input.readMessage(getNasJobSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 34 + case 42: + { + input.readMessage(getNasJobOutputFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 42 + case 48: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 48 + 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(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 74 + case 82: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 82 + case 90: + { + input.readMessage(getErrorFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 90 + case 98: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000400; + break; + } // case 98 + case 106: + { + input.readMessage(getEncryptionSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000800; + break; + } // case 106 + case 112: + { + enableRestrictedImageTraining_ = input.readBool(); + bitField0_ |= 0x00001000; + break; + } // case 112 + 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. Resource name of the NasJob.
+     * 
+ * + * 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. Resource name of the NasJob.
+     * 
+ * + * 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. Resource name of the NasJob.
+     * 
+ * + * 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. Resource name of the NasJob.
+     * 
+ * + * 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. Resource name of the NasJob.
+     * 
+ * + * 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 NasJob.
+     * 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 NasJob.
+     * 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 NasJob.
+     * 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 NasJob.
+     * 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 NasJob.
+     * 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 com.google.cloud.aiplatform.v1.NasJobSpec nasJobSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.NasJobSpec, + com.google.cloud.aiplatform.v1.NasJobSpec.Builder, + com.google.cloud.aiplatform.v1.NasJobSpecOrBuilder> + nasJobSpecBuilder_; + /** + * + * + *
+     * Required. The specification of a NasJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec nas_job_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the nasJobSpec field is set. + */ + public boolean hasNasJobSpec() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. The specification of a NasJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec nas_job_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The nasJobSpec. + */ + public com.google.cloud.aiplatform.v1.NasJobSpec getNasJobSpec() { + if (nasJobSpecBuilder_ == null) { + return nasJobSpec_ == null + ? com.google.cloud.aiplatform.v1.NasJobSpec.getDefaultInstance() + : nasJobSpec_; + } else { + return nasJobSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The specification of a NasJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec nas_job_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setNasJobSpec(com.google.cloud.aiplatform.v1.NasJobSpec value) { + if (nasJobSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + nasJobSpec_ = value; + } else { + nasJobSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The specification of a NasJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec nas_job_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setNasJobSpec( + com.google.cloud.aiplatform.v1.NasJobSpec.Builder builderForValue) { + if (nasJobSpecBuilder_ == null) { + nasJobSpec_ = builderForValue.build(); + } else { + nasJobSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The specification of a NasJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec nas_job_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeNasJobSpec(com.google.cloud.aiplatform.v1.NasJobSpec value) { + if (nasJobSpecBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && nasJobSpec_ != null + && nasJobSpec_ != com.google.cloud.aiplatform.v1.NasJobSpec.getDefaultInstance()) { + getNasJobSpecBuilder().mergeFrom(value); + } else { + nasJobSpec_ = value; + } + } else { + nasJobSpecBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The specification of a NasJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec nas_job_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearNasJobSpec() { + bitField0_ = (bitField0_ & ~0x00000004); + nasJobSpec_ = null; + if (nasJobSpecBuilder_ != null) { + nasJobSpecBuilder_.dispose(); + nasJobSpecBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The specification of a NasJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec nas_job_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.NasJobSpec.Builder getNasJobSpecBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getNasJobSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The specification of a NasJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec nas_job_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.NasJobSpecOrBuilder getNasJobSpecOrBuilder() { + if (nasJobSpecBuilder_ != null) { + return nasJobSpecBuilder_.getMessageOrBuilder(); + } else { + return nasJobSpec_ == null + ? com.google.cloud.aiplatform.v1.NasJobSpec.getDefaultInstance() + : nasJobSpec_; + } + } + /** + * + * + *
+     * Required. The specification of a NasJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec nas_job_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.NasJobSpec, + com.google.cloud.aiplatform.v1.NasJobSpec.Builder, + com.google.cloud.aiplatform.v1.NasJobSpecOrBuilder> + getNasJobSpecFieldBuilder() { + if (nasJobSpecBuilder_ == null) { + nasJobSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.NasJobSpec, + com.google.cloud.aiplatform.v1.NasJobSpec.Builder, + com.google.cloud.aiplatform.v1.NasJobSpecOrBuilder>( + getNasJobSpec(), getParentForChildren(), isClean()); + nasJobSpec_ = null; + } + return nasJobSpecBuilder_; + } + + private com.google.cloud.aiplatform.v1.NasJobOutput nasJobOutput_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.NasJobOutput, + com.google.cloud.aiplatform.v1.NasJobOutput.Builder, + com.google.cloud.aiplatform.v1.NasJobOutputOrBuilder> + nasJobOutputBuilder_; + /** + * + * + *
+     * Output only. Output of the NasJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobOutput nas_job_output = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the nasJobOutput field is set. + */ + public boolean hasNasJobOutput() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Output only. Output of the NasJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobOutput nas_job_output = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The nasJobOutput. + */ + public com.google.cloud.aiplatform.v1.NasJobOutput getNasJobOutput() { + if (nasJobOutputBuilder_ == null) { + return nasJobOutput_ == null + ? com.google.cloud.aiplatform.v1.NasJobOutput.getDefaultInstance() + : nasJobOutput_; + } else { + return nasJobOutputBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Output of the NasJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobOutput nas_job_output = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setNasJobOutput(com.google.cloud.aiplatform.v1.NasJobOutput value) { + if (nasJobOutputBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + nasJobOutput_ = value; + } else { + nasJobOutputBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Output of the NasJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobOutput nas_job_output = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setNasJobOutput( + com.google.cloud.aiplatform.v1.NasJobOutput.Builder builderForValue) { + if (nasJobOutputBuilder_ == null) { + nasJobOutput_ = builderForValue.build(); + } else { + nasJobOutputBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Output of the NasJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobOutput nas_job_output = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeNasJobOutput(com.google.cloud.aiplatform.v1.NasJobOutput value) { + if (nasJobOutputBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && nasJobOutput_ != null + && nasJobOutput_ != com.google.cloud.aiplatform.v1.NasJobOutput.getDefaultInstance()) { + getNasJobOutputBuilder().mergeFrom(value); + } else { + nasJobOutput_ = value; + } + } else { + nasJobOutputBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Output of the NasJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobOutput nas_job_output = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearNasJobOutput() { + bitField0_ = (bitField0_ & ~0x00000008); + nasJobOutput_ = null; + if (nasJobOutputBuilder_ != null) { + nasJobOutputBuilder_.dispose(); + nasJobOutputBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Output of the NasJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobOutput nas_job_output = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.NasJobOutput.Builder getNasJobOutputBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getNasJobOutputFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Output of the NasJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobOutput nas_job_output = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.NasJobOutputOrBuilder getNasJobOutputOrBuilder() { + if (nasJobOutputBuilder_ != null) { + return nasJobOutputBuilder_.getMessageOrBuilder(); + } else { + return nasJobOutput_ == null + ? com.google.cloud.aiplatform.v1.NasJobOutput.getDefaultInstance() + : nasJobOutput_; + } + } + /** + * + * + *
+     * Output only. Output of the NasJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobOutput nas_job_output = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.NasJobOutput, + com.google.cloud.aiplatform.v1.NasJobOutput.Builder, + com.google.cloud.aiplatform.v1.NasJobOutputOrBuilder> + getNasJobOutputFieldBuilder() { + if (nasJobOutputBuilder_ == null) { + nasJobOutputBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.NasJobOutput, + com.google.cloud.aiplatform.v1.NasJobOutput.Builder, + com.google.cloud.aiplatform.v1.NasJobOutputOrBuilder>( + getNasJobOutput(), getParentForChildren(), isClean()); + nasJobOutput_ = null; + } + return nasJobOutputBuilder_; + } + + 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_ |= 0x00000010; + 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_ |= 0x00000010; + 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_ & ~0x00000010); + 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 NasJob 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 NasJob 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 NasJob 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 NasJob 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 NasJob 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); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the NasJob 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 NasJob 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 NasJob 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 NasJob 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 NasJob 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_ & 0x00000040) != 0); + } + /** + * + * + *
+     * Output only. Time when the NasJob 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 NasJob 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_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the NasJob 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_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the NasJob 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_ & 0x00000040) != 0) + && startTime_ != null + && startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getStartTimeBuilder().mergeFrom(value); + } else { + startTime_ = value; + } + } else { + startTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the NasJob 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_ & ~0x00000040); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the NasJob 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_ |= 0x00000040; + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when the NasJob 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 NasJob 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 NasJob entered any of the following states:
+     * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+     * Output only. Time when the NasJob entered any of the following states:
+     * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+     * 
+ * + * .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 NasJob entered any of the following states:
+     * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+     * 
+ * + * .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_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the NasJob entered any of the following states:
+     * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+     * 
+ * + * .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_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the NasJob entered any of the following states:
+     * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+     * 
+ * + * .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_ & 0x00000080) != 0) + && endTime_ != null + && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the NasJob entered any of the following states:
+     * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000080); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the NasJob entered any of the following states:
+     * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when the NasJob entered any of the following states:
+     * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+     * 
+ * + * .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 NasJob entered any of the following states:
+     * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+     * 
+ * + * .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 NasJob 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_ & 0x00000100) != 0); + } + /** + * + * + *
+     * Output only. Time when the NasJob 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 NasJob 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_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the NasJob 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_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the NasJob 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_ & 0x00000100) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the NasJob was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000100); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the NasJob was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when the NasJob 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 NasJob 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_ & 0x00000200) != 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_ |= 0x00000200; + 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_ |= 0x00000200; + 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_ & 0x00000200) != 0) + && error_ != null + && error_ != com.google.rpc.Status.getDefaultInstance()) { + getErrorBuilder().mergeFrom(value); + } else { + error_ = value; + } + } else { + errorBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000200; + 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_ & ~0x00000200); + 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_ |= 0x00000200; + 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_ |= 0x00000400; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * The labels with user-defined metadata to organize NasJobs.
+     * 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; + */ + @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 NasJobs.
+     * 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; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * The labels with user-defined metadata to organize NasJobs.
+     * 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; + */ + @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 NasJobs.
+     * 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; + */ + @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_ & ~0x00000400); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * The labels with user-defined metadata to organize NasJobs.
+     * 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; + */ + 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_ |= 0x00000400; + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * The labels with user-defined metadata to organize NasJobs.
+     * 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; + */ + 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_ |= 0x00000400; + return this; + } + /** + * + * + *
+     * The labels with user-defined metadata to organize NasJobs.
+     * 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; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000400; + 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_; + /** + * + * + *
+     * Customer-managed encryption key options for a NasJob.
+     * If this is set, then all resources created by the NasJob
+     * will be encrypted with the provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 13; + * + * @return Whether the encryptionSpec field is set. + */ + public boolean hasEncryptionSpec() { + return ((bitField0_ & 0x00000800) != 0); + } + /** + * + * + *
+     * Customer-managed encryption key options for a NasJob.
+     * If this is set, then all resources created by the NasJob
+     * will be encrypted with the provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 13; + * + * @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(); + } + } + /** + * + * + *
+     * Customer-managed encryption key options for a NasJob.
+     * If this is set, then all resources created by the NasJob
+     * will be encrypted with the provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 13; + */ + 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_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * Customer-managed encryption key options for a NasJob.
+     * If this is set, then all resources created by the NasJob
+     * will be encrypted with the provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 13; + */ + public Builder setEncryptionSpec( + com.google.cloud.aiplatform.v1.EncryptionSpec.Builder builderForValue) { + if (encryptionSpecBuilder_ == null) { + encryptionSpec_ = builderForValue.build(); + } else { + encryptionSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * Customer-managed encryption key options for a NasJob.
+     * If this is set, then all resources created by the NasJob
+     * will be encrypted with the provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 13; + */ + public Builder mergeEncryptionSpec(com.google.cloud.aiplatform.v1.EncryptionSpec value) { + if (encryptionSpecBuilder_ == null) { + if (((bitField0_ & 0x00000800) != 0) + && encryptionSpec_ != null + && encryptionSpec_ + != com.google.cloud.aiplatform.v1.EncryptionSpec.getDefaultInstance()) { + getEncryptionSpecBuilder().mergeFrom(value); + } else { + encryptionSpec_ = value; + } + } else { + encryptionSpecBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * Customer-managed encryption key options for a NasJob.
+     * If this is set, then all resources created by the NasJob
+     * will be encrypted with the provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 13; + */ + public Builder clearEncryptionSpec() { + bitField0_ = (bitField0_ & ~0x00000800); + encryptionSpec_ = null; + if (encryptionSpecBuilder_ != null) { + encryptionSpecBuilder_.dispose(); + encryptionSpecBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Customer-managed encryption key options for a NasJob.
+     * If this is set, then all resources created by the NasJob
+     * will be encrypted with the provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 13; + */ + public com.google.cloud.aiplatform.v1.EncryptionSpec.Builder getEncryptionSpecBuilder() { + bitField0_ |= 0x00000800; + onChanged(); + return getEncryptionSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Customer-managed encryption key options for a NasJob.
+     * If this is set, then all resources created by the NasJob
+     * will be encrypted with the provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 13; + */ + 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_; + } + } + /** + * + * + *
+     * Customer-managed encryption key options for a NasJob.
+     * If this is set, then all resources created by the NasJob
+     * will be encrypted with the provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 13; + */ + 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 boolean enableRestrictedImageTraining_; + /** + * + * + *
+     * Optional. Enable a separation of Custom model training
+     * and restricted image training for tenant project.
+     * 
+ * + * bool enable_restricted_image_training = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enableRestrictedImageTraining. + */ + @java.lang.Override + public boolean getEnableRestrictedImageTraining() { + return enableRestrictedImageTraining_; + } + /** + * + * + *
+     * Optional. Enable a separation of Custom model training
+     * and restricted image training for tenant project.
+     * 
+ * + * bool enable_restricted_image_training = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enableRestrictedImageTraining to set. + * @return This builder for chaining. + */ + public Builder setEnableRestrictedImageTraining(boolean value) { + + enableRestrictedImageTraining_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Enable a separation of Custom model training
+     * and restricted image training for tenant project.
+     * 
+ * + * bool enable_restricted_image_training = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearEnableRestrictedImageTraining() { + bitField0_ = (bitField0_ & ~0x00001000); + enableRestrictedImageTraining_ = 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.NasJob) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.NasJob) + private static final com.google.cloud.aiplatform.v1.NasJob DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.NasJob(); + } + + public static com.google.cloud.aiplatform.v1.NasJob getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NasJob 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.NasJob getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NasJobName.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NasJobName.java new file mode 100644 index 000000000000..1b1030717776 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NasJobName.java @@ -0,0 +1,223 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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 NasJobName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_NAS_JOB = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/nasJobs/{nas_job}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String nasJob; + + @Deprecated + protected NasJobName() { + project = null; + location = null; + nasJob = null; + } + + private NasJobName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + nasJob = Preconditions.checkNotNull(builder.getNasJob()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getNasJob() { + return nasJob; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static NasJobName of(String project, String location, String nasJob) { + return newBuilder().setProject(project).setLocation(location).setNasJob(nasJob).build(); + } + + public static String format(String project, String location, String nasJob) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setNasJob(nasJob) + .build() + .toString(); + } + + public static NasJobName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_NAS_JOB.validatedMatch( + formattedString, "NasJobName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("nas_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 (NasJobName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_NAS_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 (nasJob != null) { + fieldMapBuilder.put("nas_job", nasJob); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_NAS_JOB.instantiate( + "project", project, "location", location, "nas_job", nasJob); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + NasJobName that = ((NasJobName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.nasJob, that.nasJob); + } + 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(nasJob); + return h; + } + + /** Builder for projects/{project}/locations/{location}/nasJobs/{nas_job}. */ + public static class Builder { + private String project; + private String location; + private String nasJob; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getNasJob() { + return nasJob; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setNasJob(String nasJob) { + this.nasJob = nasJob; + return this; + } + + private Builder(NasJobName nasJobName) { + this.project = nasJobName.project; + this.location = nasJobName.location; + this.nasJob = nasJobName.nasJob; + } + + public NasJobName build() { + return new NasJobName(this); + } + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NasJobOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NasJobOrBuilder.java new file mode 100644 index 000000000000..82f00db957e0 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NasJobOrBuilder.java @@ -0,0 +1,520 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/nas_job.proto + +package com.google.cloud.aiplatform.v1; + +public interface NasJobOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.NasJob) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Resource name of the NasJob.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Resource name of the NasJob.
+   * 
+ * + * 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 NasJob.
+   * 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 NasJob.
+   * 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(); + + /** + * + * + *
+   * Required. The specification of a NasJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec nas_job_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the nasJobSpec field is set. + */ + boolean hasNasJobSpec(); + /** + * + * + *
+   * Required. The specification of a NasJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec nas_job_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The nasJobSpec. + */ + com.google.cloud.aiplatform.v1.NasJobSpec getNasJobSpec(); + /** + * + * + *
+   * Required. The specification of a NasJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec nas_job_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.NasJobSpecOrBuilder getNasJobSpecOrBuilder(); + + /** + * + * + *
+   * Output only. Output of the NasJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobOutput nas_job_output = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the nasJobOutput field is set. + */ + boolean hasNasJobOutput(); + /** + * + * + *
+   * Output only. Output of the NasJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobOutput nas_job_output = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The nasJobOutput. + */ + com.google.cloud.aiplatform.v1.NasJobOutput getNasJobOutput(); + /** + * + * + *
+   * Output only. Output of the NasJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobOutput nas_job_output = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1.NasJobOutputOrBuilder getNasJobOutputOrBuilder(); + + /** + * + * + *
+   * 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 NasJob 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 NasJob 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 NasJob was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time when the NasJob 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 NasJob 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 NasJob 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 NasJob entered any of the following states:
+   * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+   * 
+ * + * .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 NasJob entered any of the following states:
+   * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+   * 
+ * + * .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 NasJob entered any of the following states:
+   * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time when the NasJob 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 NasJob 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 NasJob 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(); + + /** + * + * + *
+   * The labels with user-defined metadata to organize NasJobs.
+   * 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; + */ + int getLabelsCount(); + /** + * + * + *
+   * The labels with user-defined metadata to organize NasJobs.
+   * 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; + */ + 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 NasJobs.
+   * 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; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * The labels with user-defined metadata to organize NasJobs.
+   * 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; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * The labels with user-defined metadata to organize NasJobs.
+   * 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; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Customer-managed encryption key options for a NasJob.
+   * If this is set, then all resources created by the NasJob
+   * will be encrypted with the provided encryption key.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 13; + * + * @return Whether the encryptionSpec field is set. + */ + boolean hasEncryptionSpec(); + /** + * + * + *
+   * Customer-managed encryption key options for a NasJob.
+   * If this is set, then all resources created by the NasJob
+   * will be encrypted with the provided encryption key.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 13; + * + * @return The encryptionSpec. + */ + com.google.cloud.aiplatform.v1.EncryptionSpec getEncryptionSpec(); + /** + * + * + *
+   * Customer-managed encryption key options for a NasJob.
+   * If this is set, then all resources created by the NasJob
+   * will be encrypted with the provided encryption key.
+   * 
+ * + * .google.cloud.aiplatform.v1.EncryptionSpec encryption_spec = 13; + */ + com.google.cloud.aiplatform.v1.EncryptionSpecOrBuilder getEncryptionSpecOrBuilder(); + + /** + * + * + *
+   * Optional. Enable a separation of Custom model training
+   * and restricted image training for tenant project.
+   * 
+ * + * bool enable_restricted_image_training = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enableRestrictedImageTraining. + */ + boolean getEnableRestrictedImageTraining(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NasJobOutput.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NasJobOutput.java new file mode 100644 index 000000000000..13fb625820a7 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NasJobOutput.java @@ -0,0 +1,2521 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/nas_job.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Represents a uCAIP NasJob output.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.NasJobOutput} + */ +public final class NasJobOutput extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.NasJobOutput) + NasJobOutputOrBuilder { + private static final long serialVersionUID = 0L; + // Use NasJobOutput.newBuilder() to construct. + private NasJobOutput(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NasJobOutput() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NasJobOutput(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NasJobProto + .internal_static_google_cloud_aiplatform_v1_NasJobOutput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NasJobProto + .internal_static_google_cloud_aiplatform_v1_NasJobOutput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.NasJobOutput.class, + com.google.cloud.aiplatform.v1.NasJobOutput.Builder.class); + } + + public interface MultiTrialJobOutputOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Output only. List of NasTrials that were started as part of search stage.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NasTrial search_trials = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getSearchTrialsList(); + /** + * + * + *
+     * Output only. List of NasTrials that were started as part of search stage.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NasTrial search_trials = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1.NasTrial getSearchTrials(int index); + /** + * + * + *
+     * Output only. List of NasTrials that were started as part of search stage.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NasTrial search_trials = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getSearchTrialsCount(); + /** + * + * + *
+     * Output only. List of NasTrials that were started as part of search stage.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NasTrial search_trials = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getSearchTrialsOrBuilderList(); + /** + * + * + *
+     * Output only. List of NasTrials that were started as part of search stage.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NasTrial search_trials = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1.NasTrialOrBuilder getSearchTrialsOrBuilder(int index); + + /** + * + * + *
+     * Output only. List of NasTrials that were started as part of train stage.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NasTrial train_trials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getTrainTrialsList(); + /** + * + * + *
+     * Output only. List of NasTrials that were started as part of train stage.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NasTrial train_trials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1.NasTrial getTrainTrials(int index); + /** + * + * + *
+     * Output only. List of NasTrials that were started as part of train stage.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NasTrial train_trials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getTrainTrialsCount(); + /** + * + * + *
+     * Output only. List of NasTrials that were started as part of train stage.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NasTrial train_trials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getTrainTrialsOrBuilderList(); + /** + * + * + *
+     * Output only. List of NasTrials that were started as part of train stage.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NasTrial train_trials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1.NasTrialOrBuilder getTrainTrialsOrBuilder(int index); + } + /** + * + * + *
+   * The output of a multi-trial Neural Architecture Search (NAS) jobs.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput} + */ + public static final class MultiTrialJobOutput extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput) + MultiTrialJobOutputOrBuilder { + private static final long serialVersionUID = 0L; + // Use MultiTrialJobOutput.newBuilder() to construct. + private MultiTrialJobOutput(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MultiTrialJobOutput() { + searchTrials_ = java.util.Collections.emptyList(); + trainTrials_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MultiTrialJobOutput(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NasJobProto + .internal_static_google_cloud_aiplatform_v1_NasJobOutput_MultiTrialJobOutput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NasJobProto + .internal_static_google_cloud_aiplatform_v1_NasJobOutput_MultiTrialJobOutput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput.class, + com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput.Builder.class); + } + + public static final int SEARCH_TRIALS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List searchTrials_; + /** + * + * + *
+     * Output only. List of NasTrials that were started as part of search stage.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NasTrial search_trials = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List getSearchTrialsList() { + return searchTrials_; + } + /** + * + * + *
+     * Output only. List of NasTrials that were started as part of search stage.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NasTrial search_trials = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getSearchTrialsOrBuilderList() { + return searchTrials_; + } + /** + * + * + *
+     * Output only. List of NasTrials that were started as part of search stage.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NasTrial search_trials = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getSearchTrialsCount() { + return searchTrials_.size(); + } + /** + * + * + *
+     * Output only. List of NasTrials that were started as part of search stage.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NasTrial search_trials = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasTrial getSearchTrials(int index) { + return searchTrials_.get(index); + } + /** + * + * + *
+     * Output only. List of NasTrials that were started as part of search stage.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NasTrial search_trials = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasTrialOrBuilder getSearchTrialsOrBuilder(int index) { + return searchTrials_.get(index); + } + + public static final int TRAIN_TRIALS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List trainTrials_; + /** + * + * + *
+     * Output only. List of NasTrials that were started as part of train stage.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NasTrial train_trials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List getTrainTrialsList() { + return trainTrials_; + } + /** + * + * + *
+     * Output only. List of NasTrials that were started as part of train stage.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NasTrial train_trials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getTrainTrialsOrBuilderList() { + return trainTrials_; + } + /** + * + * + *
+     * Output only. List of NasTrials that were started as part of train stage.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NasTrial train_trials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getTrainTrialsCount() { + return trainTrials_.size(); + } + /** + * + * + *
+     * Output only. List of NasTrials that were started as part of train stage.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NasTrial train_trials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasTrial getTrainTrials(int index) { + return trainTrials_.get(index); + } + /** + * + * + *
+     * Output only. List of NasTrials that were started as part of train stage.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NasTrial train_trials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasTrialOrBuilder getTrainTrialsOrBuilder(int index) { + return trainTrials_.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 < searchTrials_.size(); i++) { + output.writeMessage(1, searchTrials_.get(i)); + } + for (int i = 0; i < trainTrials_.size(); i++) { + output.writeMessage(2, trainTrials_.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 < searchTrials_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, searchTrials_.get(i)); + } + for (int i = 0; i < trainTrials_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, trainTrials_.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.NasJobOutput.MultiTrialJobOutput)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput other = + (com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput) obj; + + if (!getSearchTrialsList().equals(other.getSearchTrialsList())) return false; + if (!getTrainTrialsList().equals(other.getTrainTrialsList())) 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 (getSearchTrialsCount() > 0) { + hash = (37 * hash) + SEARCH_TRIALS_FIELD_NUMBER; + hash = (53 * hash) + getSearchTrialsList().hashCode(); + } + if (getTrainTrialsCount() > 0) { + hash = (37 * hash) + TRAIN_TRIALS_FIELD_NUMBER; + hash = (53 * hash) + getTrainTrialsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput 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.NasJobOutput.MultiTrialJobOutput parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput 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.NasJobOutput.MultiTrialJobOutput parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput 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.NasJobOutput.MultiTrialJobOutput parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput 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.NasJobOutput.MultiTrialJobOutput + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput + 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.NasJobOutput.MultiTrialJobOutput 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.NasJobOutput.MultiTrialJobOutput 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.NasJobOutput.MultiTrialJobOutput 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 output of a multi-trial Neural Architecture Search (NAS) jobs.
+     * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput) + com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutputOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NasJobProto + .internal_static_google_cloud_aiplatform_v1_NasJobOutput_MultiTrialJobOutput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NasJobProto + .internal_static_google_cloud_aiplatform_v1_NasJobOutput_MultiTrialJobOutput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput.class, + com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (searchTrialsBuilder_ == null) { + searchTrials_ = java.util.Collections.emptyList(); + } else { + searchTrials_ = null; + searchTrialsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (trainTrialsBuilder_ == null) { + trainTrials_ = java.util.Collections.emptyList(); + } else { + trainTrials_ = null; + trainTrialsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.NasJobProto + .internal_static_google_cloud_aiplatform_v1_NasJobOutput_MultiTrialJobOutput_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput build() { + com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput buildPartial() { + com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput result = + new com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput result) { + if (searchTrialsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + searchTrials_ = java.util.Collections.unmodifiableList(searchTrials_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.searchTrials_ = searchTrials_; + } else { + result.searchTrials_ = searchTrialsBuilder_.build(); + } + if (trainTrialsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + trainTrials_ = java.util.Collections.unmodifiableList(trainTrials_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.trainTrials_ = trainTrials_; + } else { + result.trainTrials_ = trainTrialsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput 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.v1.NasJobOutput.MultiTrialJobOutput) { + return mergeFrom((com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput other) { + if (other + == com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput.getDefaultInstance()) + return this; + if (searchTrialsBuilder_ == null) { + if (!other.searchTrials_.isEmpty()) { + if (searchTrials_.isEmpty()) { + searchTrials_ = other.searchTrials_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSearchTrialsIsMutable(); + searchTrials_.addAll(other.searchTrials_); + } + onChanged(); + } + } else { + if (!other.searchTrials_.isEmpty()) { + if (searchTrialsBuilder_.isEmpty()) { + searchTrialsBuilder_.dispose(); + searchTrialsBuilder_ = null; + searchTrials_ = other.searchTrials_; + bitField0_ = (bitField0_ & ~0x00000001); + searchTrialsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getSearchTrialsFieldBuilder() + : null; + } else { + searchTrialsBuilder_.addAllMessages(other.searchTrials_); + } + } + } + if (trainTrialsBuilder_ == null) { + if (!other.trainTrials_.isEmpty()) { + if (trainTrials_.isEmpty()) { + trainTrials_ = other.trainTrials_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureTrainTrialsIsMutable(); + trainTrials_.addAll(other.trainTrials_); + } + onChanged(); + } + } else { + if (!other.trainTrials_.isEmpty()) { + if (trainTrialsBuilder_.isEmpty()) { + trainTrialsBuilder_.dispose(); + trainTrialsBuilder_ = null; + trainTrials_ = other.trainTrials_; + bitField0_ = (bitField0_ & ~0x00000002); + trainTrialsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTrainTrialsFieldBuilder() + : null; + } else { + trainTrialsBuilder_.addAllMessages(other.trainTrials_); + } + } + } + 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.NasTrial m = + input.readMessage( + com.google.cloud.aiplatform.v1.NasTrial.parser(), extensionRegistry); + if (searchTrialsBuilder_ == null) { + ensureSearchTrialsIsMutable(); + searchTrials_.add(m); + } else { + searchTrialsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + com.google.cloud.aiplatform.v1.NasTrial m = + input.readMessage( + com.google.cloud.aiplatform.v1.NasTrial.parser(), extensionRegistry); + if (trainTrialsBuilder_ == null) { + ensureTrainTrialsIsMutable(); + trainTrials_.add(m); + } else { + trainTrialsBuilder_.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 searchTrials_ = + java.util.Collections.emptyList(); + + private void ensureSearchTrialsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + searchTrials_ = + new java.util.ArrayList(searchTrials_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.NasTrial, + com.google.cloud.aiplatform.v1.NasTrial.Builder, + com.google.cloud.aiplatform.v1.NasTrialOrBuilder> + searchTrialsBuilder_; + + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of search stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NasTrial search_trials = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getSearchTrialsList() { + if (searchTrialsBuilder_ == null) { + return java.util.Collections.unmodifiableList(searchTrials_); + } else { + return searchTrialsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of search stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NasTrial search_trials = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getSearchTrialsCount() { + if (searchTrialsBuilder_ == null) { + return searchTrials_.size(); + } else { + return searchTrialsBuilder_.getCount(); + } + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of search stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NasTrial search_trials = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.NasTrial getSearchTrials(int index) { + if (searchTrialsBuilder_ == null) { + return searchTrials_.get(index); + } else { + return searchTrialsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of search stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NasTrial search_trials = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setSearchTrials(int index, com.google.cloud.aiplatform.v1.NasTrial value) { + if (searchTrialsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSearchTrialsIsMutable(); + searchTrials_.set(index, value); + onChanged(); + } else { + searchTrialsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of search stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NasTrial search_trials = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setSearchTrials( + int index, com.google.cloud.aiplatform.v1.NasTrial.Builder builderForValue) { + if (searchTrialsBuilder_ == null) { + ensureSearchTrialsIsMutable(); + searchTrials_.set(index, builderForValue.build()); + onChanged(); + } else { + searchTrialsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of search stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NasTrial search_trials = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSearchTrials(com.google.cloud.aiplatform.v1.NasTrial value) { + if (searchTrialsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSearchTrialsIsMutable(); + searchTrials_.add(value); + onChanged(); + } else { + searchTrialsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of search stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NasTrial search_trials = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSearchTrials(int index, com.google.cloud.aiplatform.v1.NasTrial value) { + if (searchTrialsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSearchTrialsIsMutable(); + searchTrials_.add(index, value); + onChanged(); + } else { + searchTrialsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of search stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NasTrial search_trials = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSearchTrials( + com.google.cloud.aiplatform.v1.NasTrial.Builder builderForValue) { + if (searchTrialsBuilder_ == null) { + ensureSearchTrialsIsMutable(); + searchTrials_.add(builderForValue.build()); + onChanged(); + } else { + searchTrialsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of search stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NasTrial search_trials = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSearchTrials( + int index, com.google.cloud.aiplatform.v1.NasTrial.Builder builderForValue) { + if (searchTrialsBuilder_ == null) { + ensureSearchTrialsIsMutable(); + searchTrials_.add(index, builderForValue.build()); + onChanged(); + } else { + searchTrialsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of search stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NasTrial search_trials = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllSearchTrials( + java.lang.Iterable values) { + if (searchTrialsBuilder_ == null) { + ensureSearchTrialsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, searchTrials_); + onChanged(); + } else { + searchTrialsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of search stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NasTrial search_trials = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearSearchTrials() { + if (searchTrialsBuilder_ == null) { + searchTrials_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + searchTrialsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of search stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NasTrial search_trials = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeSearchTrials(int index) { + if (searchTrialsBuilder_ == null) { + ensureSearchTrialsIsMutable(); + searchTrials_.remove(index); + onChanged(); + } else { + searchTrialsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of search stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NasTrial search_trials = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.NasTrial.Builder getSearchTrialsBuilder(int index) { + return getSearchTrialsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of search stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NasTrial search_trials = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.NasTrialOrBuilder getSearchTrialsOrBuilder(int index) { + if (searchTrialsBuilder_ == null) { + return searchTrials_.get(index); + } else { + return searchTrialsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of search stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NasTrial search_trials = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getSearchTrialsOrBuilderList() { + if (searchTrialsBuilder_ != null) { + return searchTrialsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(searchTrials_); + } + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of search stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NasTrial search_trials = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.NasTrial.Builder addSearchTrialsBuilder() { + return getSearchTrialsFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1.NasTrial.getDefaultInstance()); + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of search stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NasTrial search_trials = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.NasTrial.Builder addSearchTrialsBuilder(int index) { + return getSearchTrialsFieldBuilder() + .addBuilder(index, com.google.cloud.aiplatform.v1.NasTrial.getDefaultInstance()); + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of search stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NasTrial search_trials = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getSearchTrialsBuilderList() { + return getSearchTrialsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.NasTrial, + com.google.cloud.aiplatform.v1.NasTrial.Builder, + com.google.cloud.aiplatform.v1.NasTrialOrBuilder> + getSearchTrialsFieldBuilder() { + if (searchTrialsBuilder_ == null) { + searchTrialsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.NasTrial, + com.google.cloud.aiplatform.v1.NasTrial.Builder, + com.google.cloud.aiplatform.v1.NasTrialOrBuilder>( + searchTrials_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + searchTrials_ = null; + } + return searchTrialsBuilder_; + } + + private java.util.List trainTrials_ = + java.util.Collections.emptyList(); + + private void ensureTrainTrialsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + trainTrials_ = + new java.util.ArrayList(trainTrials_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.NasTrial, + com.google.cloud.aiplatform.v1.NasTrial.Builder, + com.google.cloud.aiplatform.v1.NasTrialOrBuilder> + trainTrialsBuilder_; + + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of train stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NasTrial train_trials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getTrainTrialsList() { + if (trainTrialsBuilder_ == null) { + return java.util.Collections.unmodifiableList(trainTrials_); + } else { + return trainTrialsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of train stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NasTrial train_trials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getTrainTrialsCount() { + if (trainTrialsBuilder_ == null) { + return trainTrials_.size(); + } else { + return trainTrialsBuilder_.getCount(); + } + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of train stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NasTrial train_trials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.NasTrial getTrainTrials(int index) { + if (trainTrialsBuilder_ == null) { + return trainTrials_.get(index); + } else { + return trainTrialsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of train stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NasTrial train_trials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setTrainTrials(int index, com.google.cloud.aiplatform.v1.NasTrial value) { + if (trainTrialsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTrainTrialsIsMutable(); + trainTrials_.set(index, value); + onChanged(); + } else { + trainTrialsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of train stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NasTrial train_trials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setTrainTrials( + int index, com.google.cloud.aiplatform.v1.NasTrial.Builder builderForValue) { + if (trainTrialsBuilder_ == null) { + ensureTrainTrialsIsMutable(); + trainTrials_.set(index, builderForValue.build()); + onChanged(); + } else { + trainTrialsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of train stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NasTrial train_trials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addTrainTrials(com.google.cloud.aiplatform.v1.NasTrial value) { + if (trainTrialsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTrainTrialsIsMutable(); + trainTrials_.add(value); + onChanged(); + } else { + trainTrialsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of train stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NasTrial train_trials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addTrainTrials(int index, com.google.cloud.aiplatform.v1.NasTrial value) { + if (trainTrialsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTrainTrialsIsMutable(); + trainTrials_.add(index, value); + onChanged(); + } else { + trainTrialsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of train stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NasTrial train_trials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addTrainTrials( + com.google.cloud.aiplatform.v1.NasTrial.Builder builderForValue) { + if (trainTrialsBuilder_ == null) { + ensureTrainTrialsIsMutable(); + trainTrials_.add(builderForValue.build()); + onChanged(); + } else { + trainTrialsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of train stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NasTrial train_trials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addTrainTrials( + int index, com.google.cloud.aiplatform.v1.NasTrial.Builder builderForValue) { + if (trainTrialsBuilder_ == null) { + ensureTrainTrialsIsMutable(); + trainTrials_.add(index, builderForValue.build()); + onChanged(); + } else { + trainTrialsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of train stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NasTrial train_trials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllTrainTrials( + java.lang.Iterable values) { + if (trainTrialsBuilder_ == null) { + ensureTrainTrialsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, trainTrials_); + onChanged(); + } else { + trainTrialsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of train stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NasTrial train_trials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearTrainTrials() { + if (trainTrialsBuilder_ == null) { + trainTrials_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + trainTrialsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of train stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NasTrial train_trials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeTrainTrials(int index) { + if (trainTrialsBuilder_ == null) { + ensureTrainTrialsIsMutable(); + trainTrials_.remove(index); + onChanged(); + } else { + trainTrialsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of train stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NasTrial train_trials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.NasTrial.Builder getTrainTrialsBuilder(int index) { + return getTrainTrialsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of train stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NasTrial train_trials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.NasTrialOrBuilder getTrainTrialsOrBuilder(int index) { + if (trainTrialsBuilder_ == null) { + return trainTrials_.get(index); + } else { + return trainTrialsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of train stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NasTrial train_trials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getTrainTrialsOrBuilderList() { + if (trainTrialsBuilder_ != null) { + return trainTrialsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(trainTrials_); + } + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of train stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NasTrial train_trials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.NasTrial.Builder addTrainTrialsBuilder() { + return getTrainTrialsFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1.NasTrial.getDefaultInstance()); + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of train stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NasTrial train_trials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.NasTrial.Builder addTrainTrialsBuilder(int index) { + return getTrainTrialsFieldBuilder() + .addBuilder(index, com.google.cloud.aiplatform.v1.NasTrial.getDefaultInstance()); + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of train stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1.NasTrial train_trials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getTrainTrialsBuilderList() { + return getTrainTrialsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.NasTrial, + com.google.cloud.aiplatform.v1.NasTrial.Builder, + com.google.cloud.aiplatform.v1.NasTrialOrBuilder> + getTrainTrialsFieldBuilder() { + if (trainTrialsBuilder_ == null) { + trainTrialsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1.NasTrial, + com.google.cloud.aiplatform.v1.NasTrial.Builder, + com.google.cloud.aiplatform.v1.NasTrialOrBuilder>( + trainTrials_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + trainTrials_ = null; + } + return trainTrialsBuilder_; + } + + @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.NasJobOutput.MultiTrialJobOutput) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput) + private static final com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput(); + } + + public static com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MultiTrialJobOutput 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.NasJobOutput.MultiTrialJobOutput + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int outputCase_ = 0; + private java.lang.Object output_; + + public enum OutputCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + MULTI_TRIAL_JOB_OUTPUT(1), + OUTPUT_NOT_SET(0); + private final int value; + + private OutputCase(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 OutputCase valueOf(int value) { + return forNumber(value); + } + + public static OutputCase forNumber(int value) { + switch (value) { + case 1: + return MULTI_TRIAL_JOB_OUTPUT; + case 0: + return OUTPUT_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public OutputCase getOutputCase() { + return OutputCase.forNumber(outputCase_); + } + + public static final int MULTI_TRIAL_JOB_OUTPUT_FIELD_NUMBER = 1; + /** + * + * + *
+   * Output only. The output of this multi-trial Neural Architecture Search
+   * (NAS) job.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput multi_trial_job_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the multiTrialJobOutput field is set. + */ + @java.lang.Override + public boolean hasMultiTrialJobOutput() { + return outputCase_ == 1; + } + /** + * + * + *
+   * Output only. The output of this multi-trial Neural Architecture Search
+   * (NAS) job.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput multi_trial_job_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The multiTrialJobOutput. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput getMultiTrialJobOutput() { + if (outputCase_ == 1) { + return (com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput) output_; + } + return com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput.getDefaultInstance(); + } + /** + * + * + *
+   * Output only. The output of this multi-trial Neural Architecture Search
+   * (NAS) job.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput multi_trial_job_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutputOrBuilder + getMultiTrialJobOutputOrBuilder() { + if (outputCase_ == 1) { + return (com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput) output_; + } + return com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput.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 (outputCase_ == 1) { + output.writeMessage( + 1, (com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput) output_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (outputCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput) output_); + } + 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.NasJobOutput)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.NasJobOutput other = + (com.google.cloud.aiplatform.v1.NasJobOutput) obj; + + if (!getOutputCase().equals(other.getOutputCase())) return false; + switch (outputCase_) { + case 1: + if (!getMultiTrialJobOutput().equals(other.getMultiTrialJobOutput())) 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 (outputCase_) { + case 1: + hash = (37 * hash) + MULTI_TRIAL_JOB_OUTPUT_FIELD_NUMBER; + hash = (53 * hash) + getMultiTrialJobOutput().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.NasJobOutput parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.NasJobOutput 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.NasJobOutput parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.NasJobOutput 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.NasJobOutput parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.NasJobOutput 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.NasJobOutput parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.NasJobOutput 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.NasJobOutput parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.NasJobOutput 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.NasJobOutput 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.NasJobOutput 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.NasJobOutput 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 uCAIP NasJob output.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.NasJobOutput} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.NasJobOutput) + com.google.cloud.aiplatform.v1.NasJobOutputOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NasJobProto + .internal_static_google_cloud_aiplatform_v1_NasJobOutput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NasJobProto + .internal_static_google_cloud_aiplatform_v1_NasJobOutput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.NasJobOutput.class, + com.google.cloud.aiplatform.v1.NasJobOutput.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.NasJobOutput.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (multiTrialJobOutputBuilder_ != null) { + multiTrialJobOutputBuilder_.clear(); + } + outputCase_ = 0; + output_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.NasJobProto + .internal_static_google_cloud_aiplatform_v1_NasJobOutput_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasJobOutput getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.NasJobOutput.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasJobOutput build() { + com.google.cloud.aiplatform.v1.NasJobOutput result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasJobOutput buildPartial() { + com.google.cloud.aiplatform.v1.NasJobOutput result = + new com.google.cloud.aiplatform.v1.NasJobOutput(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.NasJobOutput result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.aiplatform.v1.NasJobOutput result) { + result.outputCase_ = outputCase_; + result.output_ = this.output_; + if (outputCase_ == 1 && multiTrialJobOutputBuilder_ != null) { + result.output_ = multiTrialJobOutputBuilder_.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.NasJobOutput) { + return mergeFrom((com.google.cloud.aiplatform.v1.NasJobOutput) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.NasJobOutput other) { + if (other == com.google.cloud.aiplatform.v1.NasJobOutput.getDefaultInstance()) return this; + switch (other.getOutputCase()) { + case MULTI_TRIAL_JOB_OUTPUT: + { + mergeMultiTrialJobOutput(other.getMultiTrialJobOutput()); + break; + } + case OUTPUT_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( + getMultiTrialJobOutputFieldBuilder().getBuilder(), extensionRegistry); + outputCase_ = 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 outputCase_ = 0; + private java.lang.Object output_; + + public OutputCase getOutputCase() { + return OutputCase.forNumber(outputCase_); + } + + public Builder clearOutput() { + outputCase_ = 0; + output_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput, + com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput.Builder, + com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutputOrBuilder> + multiTrialJobOutputBuilder_; + /** + * + * + *
+     * Output only. The output of this multi-trial Neural Architecture Search
+     * (NAS) job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput multi_trial_job_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the multiTrialJobOutput field is set. + */ + @java.lang.Override + public boolean hasMultiTrialJobOutput() { + return outputCase_ == 1; + } + /** + * + * + *
+     * Output only. The output of this multi-trial Neural Architecture Search
+     * (NAS) job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput multi_trial_job_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The multiTrialJobOutput. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput + getMultiTrialJobOutput() { + if (multiTrialJobOutputBuilder_ == null) { + if (outputCase_ == 1) { + return (com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput) output_; + } + return com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput.getDefaultInstance(); + } else { + if (outputCase_ == 1) { + return multiTrialJobOutputBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput.getDefaultInstance(); + } + } + /** + * + * + *
+     * Output only. The output of this multi-trial Neural Architecture Search
+     * (NAS) job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput multi_trial_job_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setMultiTrialJobOutput( + com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput value) { + if (multiTrialJobOutputBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + output_ = value; + onChanged(); + } else { + multiTrialJobOutputBuilder_.setMessage(value); + } + outputCase_ = 1; + return this; + } + /** + * + * + *
+     * Output only. The output of this multi-trial Neural Architecture Search
+     * (NAS) job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput multi_trial_job_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setMultiTrialJobOutput( + com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput.Builder builderForValue) { + if (multiTrialJobOutputBuilder_ == null) { + output_ = builderForValue.build(); + onChanged(); + } else { + multiTrialJobOutputBuilder_.setMessage(builderForValue.build()); + } + outputCase_ = 1; + return this; + } + /** + * + * + *
+     * Output only. The output of this multi-trial Neural Architecture Search
+     * (NAS) job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput multi_trial_job_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeMultiTrialJobOutput( + com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput value) { + if (multiTrialJobOutputBuilder_ == null) { + if (outputCase_ == 1 + && output_ + != com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput + .getDefaultInstance()) { + output_ = + com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput.newBuilder( + (com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput) output_) + .mergeFrom(value) + .buildPartial(); + } else { + output_ = value; + } + onChanged(); + } else { + if (outputCase_ == 1) { + multiTrialJobOutputBuilder_.mergeFrom(value); + } else { + multiTrialJobOutputBuilder_.setMessage(value); + } + } + outputCase_ = 1; + return this; + } + /** + * + * + *
+     * Output only. The output of this multi-trial Neural Architecture Search
+     * (NAS) job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput multi_trial_job_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearMultiTrialJobOutput() { + if (multiTrialJobOutputBuilder_ == null) { + if (outputCase_ == 1) { + outputCase_ = 0; + output_ = null; + onChanged(); + } + } else { + if (outputCase_ == 1) { + outputCase_ = 0; + output_ = null; + } + multiTrialJobOutputBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. The output of this multi-trial Neural Architecture Search
+     * (NAS) job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput multi_trial_job_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput.Builder + getMultiTrialJobOutputBuilder() { + return getMultiTrialJobOutputFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The output of this multi-trial Neural Architecture Search
+     * (NAS) job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput multi_trial_job_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutputOrBuilder + getMultiTrialJobOutputOrBuilder() { + if ((outputCase_ == 1) && (multiTrialJobOutputBuilder_ != null)) { + return multiTrialJobOutputBuilder_.getMessageOrBuilder(); + } else { + if (outputCase_ == 1) { + return (com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput) output_; + } + return com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput.getDefaultInstance(); + } + } + /** + * + * + *
+     * Output only. The output of this multi-trial Neural Architecture Search
+     * (NAS) job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput multi_trial_job_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput, + com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput.Builder, + com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutputOrBuilder> + getMultiTrialJobOutputFieldBuilder() { + if (multiTrialJobOutputBuilder_ == null) { + if (!(outputCase_ == 1)) { + output_ = + com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput.getDefaultInstance(); + } + multiTrialJobOutputBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput, + com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput.Builder, + com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutputOrBuilder>( + (com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput) output_, + getParentForChildren(), + isClean()); + output_ = null; + } + outputCase_ = 1; + onChanged(); + return multiTrialJobOutputBuilder_; + } + + @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.NasJobOutput) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.NasJobOutput) + private static final com.google.cloud.aiplatform.v1.NasJobOutput DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.NasJobOutput(); + } + + public static com.google.cloud.aiplatform.v1.NasJobOutput getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NasJobOutput 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.NasJobOutput getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NasJobOutputOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NasJobOutputOrBuilder.java new file mode 100644 index 000000000000..e86afcf19e42 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NasJobOutputOrBuilder.java @@ -0,0 +1,72 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/nas_job.proto + +package com.google.cloud.aiplatform.v1; + +public interface NasJobOutputOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.NasJobOutput) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The output of this multi-trial Neural Architecture Search
+   * (NAS) job.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput multi_trial_job_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the multiTrialJobOutput field is set. + */ + boolean hasMultiTrialJobOutput(); + /** + * + * + *
+   * Output only. The output of this multi-trial Neural Architecture Search
+   * (NAS) job.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput multi_trial_job_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The multiTrialJobOutput. + */ + com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput getMultiTrialJobOutput(); + /** + * + * + *
+   * Output only. The output of this multi-trial Neural Architecture Search
+   * (NAS) job.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutput multi_trial_job_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1.NasJobOutput.MultiTrialJobOutputOrBuilder + getMultiTrialJobOutputOrBuilder(); + + public com.google.cloud.aiplatform.v1.NasJobOutput.OutputCase getOutputCase(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NasJobProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NasJobProto.java new file mode 100644 index 000000000000..95549e22248e --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NasJobProto.java @@ -0,0 +1,313 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/nas_job.proto + +package com.google.cloud.aiplatform.v1; + +public final class NasJobProto { + private NasJobProto() {} + + 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_NasJob_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_NasJob_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_NasJob_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_NasJob_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_NasTrialDetail_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_NasTrialDetail_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_NasJobSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_NasJobSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_NasJobSpec_MultiTrialAlgorithmSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_NasJobSpec_MultiTrialAlgorithmSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_NasJobSpec_MultiTrialAlgorithmSpec_MetricSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_NasJobSpec_MultiTrialAlgorithmSpec_MetricSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_NasJobSpec_MultiTrialAlgorithmSpec_SearchTrialSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_NasJobSpec_MultiTrialAlgorithmSpec_SearchTrialSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_NasJobSpec_MultiTrialAlgorithmSpec_TrainTrialSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_NasJobSpec_MultiTrialAlgorithmSpec_TrainTrialSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_NasJobOutput_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_NasJobOutput_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_NasJobOutput_MultiTrialJobOutput_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_NasJobOutput_MultiTrialJobOutput_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_NasTrial_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_NasTrial_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/nas_job.pro" + + "to\022\032google.cloud.aiplatform.v1\032\037google/a" + + "pi/field_behavior.proto\032\031google/api/reso" + + "urce.proto\032+google/cloud/aiplatform/v1/c" + + "ustom_job.proto\0320google/cloud/aiplatform" + + "/v1/encryption_spec.proto\032*google/cloud/" + + "aiplatform/v1/job_state.proto\032&google/cl" + + "oud/aiplatform/v1/study.proto\032\037google/pr" + + "otobuf/timestamp.proto\032\027google/rpc/statu" + + "s.proto\"\273\006\n\006NasJob\022\021\n\004name\030\001 \001(\tB\003\340A\003\022\031\n" + + "\014display_name\030\002 \001(\tB\003\340A\002\022A\n\014nas_job_spec" + + "\030\004 \001(\0132&.google.cloud.aiplatform.v1.NasJ" + + "obSpecB\003\340A\002\022E\n\016nas_job_output\030\005 \001(\0132(.go" + + "ogle.cloud.aiplatform.v1.NasJobOutputB\003\340" + + "A\003\0228\n\005state\030\006 \001(\0162$.google.cloud.aiplatf" + + "orm.v1.JobStateB\003\340A\003\0224\n\013create_time\030\007 \001(" + + "\0132\032.google.protobuf.TimestampB\003\340A\003\0223\n\nst" + + "art_time\030\010 \001(\0132\032.google.protobuf.Timesta" + + "mpB\003\340A\003\0221\n\010end_time\030\t \001(\0132\032.google.proto" + + "buf.TimestampB\003\340A\003\0224\n\013update_time\030\n \001(\0132" + + "\032.google.protobuf.TimestampB\003\340A\003\022&\n\005erro" + + "r\030\013 \001(\0132\022.google.rpc.StatusB\003\340A\003\022>\n\006labe" + + "ls\030\014 \003(\0132..google.cloud.aiplatform.v1.Na" + + "sJob.LabelsEntry\022C\n\017encryption_spec\030\r \001(" + + "\0132*.google.cloud.aiplatform.v1.Encryptio" + + "nSpec\022-\n enable_restricted_image_trainin" + + "g\030\016 \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:`\352A]\n aiplatform.goo" + + "gleapis.com/NasJob\0229projects/{project}/l" + + "ocations/{location}/nasJobs/{nas_job}\"\275\002" + + "\n\016NasTrialDetail\022\021\n\004name\030\001 \001(\tB\003\340A\003\022\022\n\np" + + "arameters\030\002 \001(\t\022:\n\014search_trial\030\003 \001(\0132$." + + "google.cloud.aiplatform.v1.NasTrial\0229\n\013t" + + "rain_trial\030\004 \001(\0132$.google.cloud.aiplatfo" + + "rm.v1.NasTrial:\214\001\352A\210\001\n(aiplatform.google" + + "apis.com/NasTrialDetail\022\\projects/{proje" + + "ct}/locations/{location}/nasJobs/{nas_jo" + + "b}/nasTrialDetails/{nas_trial_detail}\"\245\n" + + "\n\nNasJobSpec\022d\n\032multi_trial_algorithm_sp" + + "ec\030\002 \001(\0132>.google.cloud.aiplatform.v1.Na" + + "sJobSpec.MultiTrialAlgorithmSpecH\000\022\031\n\021re" + + "sume_nas_job_id\030\003 \001(\t\022\031\n\021search_space_sp" + + "ec\030\001 \001(\t\032\344\010\n\027MultiTrialAlgorithmSpec\022q\n\025" + + "multi_trial_algorithm\030\001 \001(\0162R.google.clo" + + "ud.aiplatform.v1.NasJobSpec.MultiTrialAl" + + "gorithmSpec.MultiTrialAlgorithm\022Y\n\006metri" + + "c\030\002 \001(\0132I.google.cloud.aiplatform.v1.Nas" + + "JobSpec.MultiTrialAlgorithmSpec.MetricSp" + + "ec\022n\n\021search_trial_spec\030\003 \001(\0132N.google.c" + + "loud.aiplatform.v1.NasJobSpec.MultiTrial" + + "AlgorithmSpec.SearchTrialSpecB\003\340A\002\022g\n\020tr" + + "ain_trial_spec\030\004 \001(\0132M.google.cloud.aipl" + + "atform.v1.NasJobSpec.MultiTrialAlgorithm" + + "Spec.TrainTrialSpec\032\316\001\n\nMetricSpec\022\026\n\tme" + + "tric_id\030\001 \001(\tB\003\340A\002\022e\n\004goal\030\002 \001(\0162R.googl" + + "e.cloud.aiplatform.v1.NasJobSpec.MultiTr" + + "ialAlgorithmSpec.MetricSpec.GoalTypeB\003\340A" + + "\002\"A\n\010GoalType\022\031\n\025GOAL_TYPE_UNSPECIFIED\020\000" + + "\022\014\n\010MAXIMIZE\020\001\022\014\n\010MINIMIZE\020\002\032\305\001\n\017SearchT" + + "rialSpec\022M\n\025search_trial_job_spec\030\001 \001(\0132" + + ").google.cloud.aiplatform.v1.CustomJobSp" + + "ecB\003\340A\002\022\034\n\017max_trial_count\030\002 \001(\005B\003\340A\002\022%\n" + + "\030max_parallel_trial_count\030\003 \001(\005B\003\340A\002\022\036\n\026" + + "max_failed_trial_count\030\004 \001(\005\032\235\001\n\016TrainTr" + + "ialSpec\022L\n\024train_trial_job_spec\030\001 \001(\0132)." + + "google.cloud.aiplatform.v1.CustomJobSpec" + + "B\003\340A\002\022%\n\030max_parallel_trial_count\030\002 \001(\005B" + + "\003\340A\002\022\026\n\tfrequency\030\003 \001(\005B\003\340A\002\"i\n\023MultiTri" + + "alAlgorithm\022%\n!MULTI_TRIAL_ALGORITHM_UNS" + + "PECIFIED\020\000\022\032\n\026REINFORCEMENT_LEARNING\020\001\022\017" + + "\n\013GRID_SEARCH\020\002B\024\n\022nas_algorithm_spec\"\230\002" + + "\n\014NasJobOutput\022c\n\026multi_trial_job_output" + + "\030\001 \001(\0132<.google.cloud.aiplatform.v1.NasJ" + + "obOutput.MultiTrialJobOutputB\003\340A\003H\000\032\230\001\n\023" + + "MultiTrialJobOutput\022@\n\rsearch_trials\030\001 \003" + + "(\0132$.google.cloud.aiplatform.v1.NasTrial" + + "B\003\340A\003\022?\n\014train_trials\030\002 \003(\0132$.google.clo" + + "ud.aiplatform.v1.NasTrialB\003\340A\003B\010\n\006output" + + "\"\364\002\n\010NasTrial\022\017\n\002id\030\001 \001(\tB\003\340A\003\022>\n\005state\030" + + "\002 \001(\0162*.google.cloud.aiplatform.v1.NasTr" + + "ial.StateB\003\340A\003\022G\n\021final_measurement\030\003 \001(" + + "\0132\'.google.cloud.aiplatform.v1.Measureme" + + "ntB\003\340A\003\0223\n\nstart_time\030\004 \001(\0132\032.google.pro" + + "tobuf.TimestampB\003\340A\003\0221\n\010end_time\030\005 \001(\0132\032" + + ".google.protobuf.TimestampB\003\340A\003\"f\n\005State" + + "\022\025\n\021STATE_UNSPECIFIED\020\000\022\r\n\tREQUESTED\020\001\022\n" + + "\n\006ACTIVE\020\002\022\014\n\010STOPPING\020\003\022\r\n\tSUCCEEDED\020\004\022" + + "\016\n\nINFEASIBLE\020\005B\311\001\n\036com.google.cloud.aip" + + "latform.v1B\013NasJobProtoP\001Z>cloud.google." + + "com/go/aiplatform/apiv1/aiplatformpb;aip" + + "latformpb\252\002\032Google.Cloud.AIPlatform.V1\312\002" + + "\032Google\\Cloud\\AIPlatform\\V1\352\002\035Google::Cl" + + "oud::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.CustomJobProto.getDescriptor(), + com.google.cloud.aiplatform.v1.EncryptionSpecProto.getDescriptor(), + com.google.cloud.aiplatform.v1.JobStateProto.getDescriptor(), + com.google.cloud.aiplatform.v1.StudyProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.rpc.StatusProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1_NasJob_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_NasJob_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_NasJob_descriptor, + new java.lang.String[] { + "Name", + "DisplayName", + "NasJobSpec", + "NasJobOutput", + "State", + "CreateTime", + "StartTime", + "EndTime", + "UpdateTime", + "Error", + "Labels", + "EncryptionSpec", + "EnableRestrictedImageTraining", + }); + internal_static_google_cloud_aiplatform_v1_NasJob_LabelsEntry_descriptor = + internal_static_google_cloud_aiplatform_v1_NasJob_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_aiplatform_v1_NasJob_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_NasJob_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_aiplatform_v1_NasTrialDetail_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_aiplatform_v1_NasTrialDetail_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_NasTrialDetail_descriptor, + new java.lang.String[] { + "Name", "Parameters", "SearchTrial", "TrainTrial", + }); + internal_static_google_cloud_aiplatform_v1_NasJobSpec_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_aiplatform_v1_NasJobSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_NasJobSpec_descriptor, + new java.lang.String[] { + "MultiTrialAlgorithmSpec", "ResumeNasJobId", "SearchSpaceSpec", "NasAlgorithmSpec", + }); + internal_static_google_cloud_aiplatform_v1_NasJobSpec_MultiTrialAlgorithmSpec_descriptor = + internal_static_google_cloud_aiplatform_v1_NasJobSpec_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_aiplatform_v1_NasJobSpec_MultiTrialAlgorithmSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_NasJobSpec_MultiTrialAlgorithmSpec_descriptor, + new java.lang.String[] { + "MultiTrialAlgorithm", "Metric", "SearchTrialSpec", "TrainTrialSpec", + }); + internal_static_google_cloud_aiplatform_v1_NasJobSpec_MultiTrialAlgorithmSpec_MetricSpec_descriptor = + internal_static_google_cloud_aiplatform_v1_NasJobSpec_MultiTrialAlgorithmSpec_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_aiplatform_v1_NasJobSpec_MultiTrialAlgorithmSpec_MetricSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_NasJobSpec_MultiTrialAlgorithmSpec_MetricSpec_descriptor, + new java.lang.String[] { + "MetricId", "Goal", + }); + internal_static_google_cloud_aiplatform_v1_NasJobSpec_MultiTrialAlgorithmSpec_SearchTrialSpec_descriptor = + internal_static_google_cloud_aiplatform_v1_NasJobSpec_MultiTrialAlgorithmSpec_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_aiplatform_v1_NasJobSpec_MultiTrialAlgorithmSpec_SearchTrialSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_NasJobSpec_MultiTrialAlgorithmSpec_SearchTrialSpec_descriptor, + new java.lang.String[] { + "SearchTrialJobSpec", "MaxTrialCount", "MaxParallelTrialCount", "MaxFailedTrialCount", + }); + internal_static_google_cloud_aiplatform_v1_NasJobSpec_MultiTrialAlgorithmSpec_TrainTrialSpec_descriptor = + internal_static_google_cloud_aiplatform_v1_NasJobSpec_MultiTrialAlgorithmSpec_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_aiplatform_v1_NasJobSpec_MultiTrialAlgorithmSpec_TrainTrialSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_NasJobSpec_MultiTrialAlgorithmSpec_TrainTrialSpec_descriptor, + new java.lang.String[] { + "TrainTrialJobSpec", "MaxParallelTrialCount", "Frequency", + }); + internal_static_google_cloud_aiplatform_v1_NasJobOutput_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_aiplatform_v1_NasJobOutput_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_NasJobOutput_descriptor, + new java.lang.String[] { + "MultiTrialJobOutput", "Output", + }); + internal_static_google_cloud_aiplatform_v1_NasJobOutput_MultiTrialJobOutput_descriptor = + internal_static_google_cloud_aiplatform_v1_NasJobOutput_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_aiplatform_v1_NasJobOutput_MultiTrialJobOutput_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_NasJobOutput_MultiTrialJobOutput_descriptor, + new java.lang.String[] { + "SearchTrials", "TrainTrials", + }); + internal_static_google_cloud_aiplatform_v1_NasTrial_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_aiplatform_v1_NasTrial_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_NasTrial_descriptor, + new java.lang.String[] { + "Id", "State", "FinalMeasurement", "StartTime", "EndTime", + }); + 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.CustomJobProto.getDescriptor(); + com.google.cloud.aiplatform.v1.EncryptionSpecProto.getDescriptor(); + com.google.cloud.aiplatform.v1.JobStateProto.getDescriptor(); + com.google.cloud.aiplatform.v1.StudyProto.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/NasJobSpec.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NasJobSpec.java new file mode 100644 index 000000000000..5a4a9734a633 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NasJobSpec.java @@ -0,0 +1,6481 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/nas_job.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Represents the spec of a NasJob.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.NasJobSpec} + */ +public final class NasJobSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.NasJobSpec) + NasJobSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use NasJobSpec.newBuilder() to construct. + private NasJobSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NasJobSpec() { + resumeNasJobId_ = ""; + searchSpaceSpec_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NasJobSpec(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NasJobProto + .internal_static_google_cloud_aiplatform_v1_NasJobSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NasJobProto + .internal_static_google_cloud_aiplatform_v1_NasJobSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.NasJobSpec.class, + com.google.cloud.aiplatform.v1.NasJobSpec.Builder.class); + } + + public interface MultiTrialAlgorithmSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The multi-trial Neural Architecture Search (NAS) algorithm
+     * type. Defaults to `REINFORCEMENT_LEARNING`.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MultiTrialAlgorithm multi_trial_algorithm = 1; + * + * + * @return The enum numeric value on the wire for multiTrialAlgorithm. + */ + int getMultiTrialAlgorithmValue(); + /** + * + * + *
+     * The multi-trial Neural Architecture Search (NAS) algorithm
+     * type. Defaults to `REINFORCEMENT_LEARNING`.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MultiTrialAlgorithm multi_trial_algorithm = 1; + * + * + * @return The multiTrialAlgorithm. + */ + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MultiTrialAlgorithm + getMultiTrialAlgorithm(); + + /** + * + * + *
+     * Metric specs for the NAS job.
+     * Validation for this field is done at `multi_trial_algorithm_spec` field.
+     * 
+ * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec metric = 2; + * + * + * @return Whether the metric field is set. + */ + boolean hasMetric(); + /** + * + * + *
+     * Metric specs for the NAS job.
+     * Validation for this field is done at `multi_trial_algorithm_spec` field.
+     * 
+ * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec metric = 2; + * + * + * @return The metric. + */ + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec getMetric(); + /** + * + * + *
+     * Metric specs for the NAS job.
+     * Validation for this field is done at `multi_trial_algorithm_spec` field.
+     * 
+ * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec metric = 2; + * + */ + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpecOrBuilder + getMetricOrBuilder(); + + /** + * + * + *
+     * Required. Spec for search trials.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec search_trial_spec = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the searchTrialSpec field is set. + */ + boolean hasSearchTrialSpec(); + /** + * + * + *
+     * Required. Spec for search trials.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec search_trial_spec = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The searchTrialSpec. + */ + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec + getSearchTrialSpec(); + /** + * + * + *
+     * Required. Spec for search trials.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec search_trial_spec = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpecOrBuilder + getSearchTrialSpecOrBuilder(); + + /** + * + * + *
+     * Spec for train trials. Top N [TrainTrialSpec.max_parallel_trial_count]
+     * search trials will be trained for every M
+     * [TrainTrialSpec.frequency] trials searched.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec train_trial_spec = 4; + * + * + * @return Whether the trainTrialSpec field is set. + */ + boolean hasTrainTrialSpec(); + /** + * + * + *
+     * Spec for train trials. Top N [TrainTrialSpec.max_parallel_trial_count]
+     * search trials will be trained for every M
+     * [TrainTrialSpec.frequency] trials searched.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec train_trial_spec = 4; + * + * + * @return The trainTrialSpec. + */ + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + getTrainTrialSpec(); + /** + * + * + *
+     * Spec for train trials. Top N [TrainTrialSpec.max_parallel_trial_count]
+     * search trials will be trained for every M
+     * [TrainTrialSpec.frequency] trials searched.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec train_trial_spec = 4; + * + */ + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpecOrBuilder + getTrainTrialSpecOrBuilder(); + } + /** + * + * + *
+   * The spec of multi-trial Neural Architecture Search (NAS).
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec} + */ + public static final class MultiTrialAlgorithmSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec) + MultiTrialAlgorithmSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use MultiTrialAlgorithmSpec.newBuilder() to construct. + private MultiTrialAlgorithmSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MultiTrialAlgorithmSpec() { + multiTrialAlgorithm_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MultiTrialAlgorithmSpec(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NasJobProto + .internal_static_google_cloud_aiplatform_v1_NasJobSpec_MultiTrialAlgorithmSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NasJobProto + .internal_static_google_cloud_aiplatform_v1_NasJobSpec_MultiTrialAlgorithmSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.class, + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.Builder.class); + } + + /** + * + * + *
+     * The available types of multi-trial algorithms.
+     * 
+ * + * Protobuf enum {@code + * google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MultiTrialAlgorithm} + */ + public enum MultiTrialAlgorithm implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Defaults to `REINFORCEMENT_LEARNING`.
+       * 
+ * + * MULTI_TRIAL_ALGORITHM_UNSPECIFIED = 0; + */ + MULTI_TRIAL_ALGORITHM_UNSPECIFIED(0), + /** + * + * + *
+       * The Reinforcement Learning Algorithm for Multi-trial Neural
+       * Architecture Search (NAS).
+       * 
+ * + * REINFORCEMENT_LEARNING = 1; + */ + REINFORCEMENT_LEARNING(1), + /** + * + * + *
+       * The Grid Search Algorithm for Multi-trial Neural
+       * Architecture Search (NAS).
+       * 
+ * + * GRID_SEARCH = 2; + */ + GRID_SEARCH(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Defaults to `REINFORCEMENT_LEARNING`.
+       * 
+ * + * MULTI_TRIAL_ALGORITHM_UNSPECIFIED = 0; + */ + public static final int MULTI_TRIAL_ALGORITHM_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * The Reinforcement Learning Algorithm for Multi-trial Neural
+       * Architecture Search (NAS).
+       * 
+ * + * REINFORCEMENT_LEARNING = 1; + */ + public static final int REINFORCEMENT_LEARNING_VALUE = 1; + /** + * + * + *
+       * The Grid Search Algorithm for Multi-trial Neural
+       * Architecture Search (NAS).
+       * 
+ * + * GRID_SEARCH = 2; + */ + public static final int GRID_SEARCH_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 MultiTrialAlgorithm 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 MultiTrialAlgorithm forNumber(int value) { + switch (value) { + case 0: + return MULTI_TRIAL_ALGORITHM_UNSPECIFIED; + case 1: + return REINFORCEMENT_LEARNING; + case 2: + return GRID_SEARCH; + 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 MultiTrialAlgorithm findValueByNumber(int number) { + return MultiTrialAlgorithm.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.NasJobSpec.MultiTrialAlgorithmSpec.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final MultiTrialAlgorithm[] VALUES = values(); + + public static MultiTrialAlgorithm 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 MultiTrialAlgorithm(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MultiTrialAlgorithm) + } + + public interface MetricSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Required. The ID of the metric. Must not contain whitespaces.
+       * 
+ * + * string metric_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The metricId. + */ + java.lang.String getMetricId(); + /** + * + * + *
+       * Required. The ID of the metric. Must not contain whitespaces.
+       * 
+ * + * string metric_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for metricId. + */ + com.google.protobuf.ByteString getMetricIdBytes(); + + /** + * + * + *
+       * Required. The optimization goal of the metric.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec.GoalType goal = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for goal. + */ + int getGoalValue(); + /** + * + * + *
+       * Required. The optimization goal of the metric.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec.GoalType goal = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The goal. + */ + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec.GoalType + getGoal(); + } + /** + * + * + *
+     * Represents a metric to optimize.
+     * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec} + */ + public static final class MetricSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec) + MetricSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use MetricSpec.newBuilder() to construct. + private MetricSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MetricSpec() { + metricId_ = ""; + goal_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MetricSpec(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NasJobProto + .internal_static_google_cloud_aiplatform_v1_NasJobSpec_MultiTrialAlgorithmSpec_MetricSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NasJobProto + .internal_static_google_cloud_aiplatform_v1_NasJobSpec_MultiTrialAlgorithmSpec_MetricSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec.class, + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec.Builder + .class); + } + + /** + * + * + *
+       * The available types of optimization goals.
+       * 
+ * + * Protobuf enum {@code + * google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec.GoalType} + */ + public enum GoalType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+         * Goal Type will default to maximize.
+         * 
+ * + * GOAL_TYPE_UNSPECIFIED = 0; + */ + GOAL_TYPE_UNSPECIFIED(0), + /** + * + * + *
+         * Maximize the goal metric.
+         * 
+ * + * MAXIMIZE = 1; + */ + MAXIMIZE(1), + /** + * + * + *
+         * Minimize the goal metric.
+         * 
+ * + * MINIMIZE = 2; + */ + MINIMIZE(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+         * Goal Type will default to maximize.
+         * 
+ * + * GOAL_TYPE_UNSPECIFIED = 0; + */ + public static final int GOAL_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+         * Maximize the goal metric.
+         * 
+ * + * MAXIMIZE = 1; + */ + public static final int MAXIMIZE_VALUE = 1; + /** + * + * + *
+         * Minimize the goal metric.
+         * 
+ * + * MINIMIZE = 2; + */ + public static final int MINIMIZE_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 GoalType 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 GoalType forNumber(int value) { + switch (value) { + case 0: + return GOAL_TYPE_UNSPECIFIED; + case 1: + return MAXIMIZE; + case 2: + return MINIMIZE; + 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 GoalType findValueByNumber(int number) { + return GoalType.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.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + .getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final GoalType[] VALUES = values(); + + public static GoalType 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 GoalType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec.GoalType) + } + + public static final int METRIC_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object metricId_ = ""; + /** + * + * + *
+       * Required. The ID of the metric. Must not contain whitespaces.
+       * 
+ * + * string metric_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The metricId. + */ + @java.lang.Override + public java.lang.String getMetricId() { + java.lang.Object ref = metricId_; + 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(); + metricId_ = s; + return s; + } + } + /** + * + * + *
+       * Required. The ID of the metric. Must not contain whitespaces.
+       * 
+ * + * string metric_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for metricId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMetricIdBytes() { + java.lang.Object ref = metricId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + metricId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GOAL_FIELD_NUMBER = 2; + private int goal_ = 0; + /** + * + * + *
+       * Required. The optimization goal of the metric.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec.GoalType goal = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for goal. + */ + @java.lang.Override + public int getGoalValue() { + return goal_; + } + /** + * + * + *
+       * Required. The optimization goal of the metric.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec.GoalType goal = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The goal. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec.GoalType + getGoal() { + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec.GoalType + result = + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + .GoalType.forNumber(goal_); + return result == null + ? com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec.GoalType + .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(metricId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, metricId_); + } + if (goal_ + != com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec.GoalType + .GOAL_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, goal_); + } + 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(metricId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, metricId_); + } + if (goal_ + != com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec.GoalType + .GOAL_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, goal_); + } + 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.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec other = + (com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec) obj; + + if (!getMetricId().equals(other.getMetricId())) return false; + if (goal_ != other.goal_) 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) + METRIC_ID_FIELD_NUMBER; + hash = (53 * hash) + getMetricId().hashCode(); + hash = (37 * hash) + GOAL_FIELD_NUMBER; + hash = (53 * hash) + goal_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + 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.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + 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.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + 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.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + 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.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + 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.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + 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.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + 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.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec 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 metric to optimize.
+       * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec) + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NasJobProto + .internal_static_google_cloud_aiplatform_v1_NasJobSpec_MultiTrialAlgorithmSpec_MetricSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NasJobProto + .internal_static_google_cloud_aiplatform_v1_NasJobSpec_MultiTrialAlgorithmSpec_MetricSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + .class, + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + .Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + metricId_ = ""; + goal_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.NasJobProto + .internal_static_google_cloud_aiplatform_v1_NasJobSpec_MultiTrialAlgorithmSpec_MetricSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + build() { + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + buildPartial() { + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec result = + new com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.metricId_ = metricId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.goal_ = goal_; + } + } + + @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.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec other) { + if (other + == com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + .getDefaultInstance()) return this; + if (!other.getMetricId().isEmpty()) { + metricId_ = other.metricId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.goal_ != 0) { + setGoalValue(other.getGoalValue()); + } + 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: + { + metricId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + goal_ = input.readEnum(); + 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 metricId_ = ""; + /** + * + * + *
+         * Required. The ID of the metric. Must not contain whitespaces.
+         * 
+ * + * string metric_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The metricId. + */ + public java.lang.String getMetricId() { + java.lang.Object ref = metricId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metricId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Required. The ID of the metric. Must not contain whitespaces.
+         * 
+ * + * string metric_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for metricId. + */ + public com.google.protobuf.ByteString getMetricIdBytes() { + java.lang.Object ref = metricId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + metricId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Required. The ID of the metric. Must not contain whitespaces.
+         * 
+ * + * string metric_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The metricId to set. + * @return This builder for chaining. + */ + public Builder setMetricId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + metricId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The ID of the metric. Must not contain whitespaces.
+         * 
+ * + * string metric_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearMetricId() { + metricId_ = getDefaultInstance().getMetricId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The ID of the metric. Must not contain whitespaces.
+         * 
+ * + * string metric_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for metricId to set. + * @return This builder for chaining. + */ + public Builder setMetricIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + metricId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int goal_ = 0; + /** + * + * + *
+         * Required. The optimization goal of the metric.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec.GoalType goal = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for goal. + */ + @java.lang.Override + public int getGoalValue() { + return goal_; + } + /** + * + * + *
+         * Required. The optimization goal of the metric.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec.GoalType goal = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for goal to set. + * @return This builder for chaining. + */ + public Builder setGoalValue(int value) { + goal_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The optimization goal of the metric.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec.GoalType goal = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The goal. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec.GoalType + getGoal() { + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec.GoalType + result = + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + .GoalType.forNumber(goal_); + return result == null + ? com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + .GoalType.UNRECOGNIZED + : result; + } + /** + * + * + *
+         * Required. The optimization goal of the metric.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec.GoalType goal = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The goal to set. + * @return This builder for chaining. + */ + public Builder setGoal( + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec.GoalType + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + goal_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The optimization goal of the metric.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec.GoalType goal = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearGoal() { + bitField0_ = (bitField0_ & ~0x00000002); + goal_ = 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.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec) + private static final com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec + .MetricSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec(); + } + + public static com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MetricSpec 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.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SearchTrialSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Required. The spec of a search trial job. The same spec applies to
+       * all search trials.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec search_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the searchTrialJobSpec field is set. + */ + boolean hasSearchTrialJobSpec(); + /** + * + * + *
+       * Required. The spec of a search trial job. The same spec applies to
+       * all search trials.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec search_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The searchTrialJobSpec. + */ + com.google.cloud.aiplatform.v1.CustomJobSpec getSearchTrialJobSpec(); + /** + * + * + *
+       * Required. The spec of a search trial job. The same spec applies to
+       * all search trials.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec search_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.CustomJobSpecOrBuilder getSearchTrialJobSpecOrBuilder(); + + /** + * + * + *
+       * Required. The maximum number of Neural Architecture Search (NAS) trials
+       * to run.
+       * 
+ * + * int32 max_trial_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The maxTrialCount. + */ + int getMaxTrialCount(); + + /** + * + * + *
+       * Required. The maximum number of trials to run in parallel.
+       * 
+ * + * int32 max_parallel_trial_count = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The maxParallelTrialCount. + */ + int getMaxParallelTrialCount(); + + /** + * + * + *
+       * The number of failed trials that need to be seen before failing
+       * the NasJob.
+       * If set to 0, Vertex AI decides how many trials must fail
+       * before the whole job fails.
+       * 
+ * + * int32 max_failed_trial_count = 4; + * + * @return The maxFailedTrialCount. + */ + int getMaxFailedTrialCount(); + } + /** + * + * + *
+     * Represent spec for search trials.
+     * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec} + */ + public static final class SearchTrialSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec) + SearchTrialSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use SearchTrialSpec.newBuilder() to construct. + private SearchTrialSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SearchTrialSpec() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SearchTrialSpec(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NasJobProto + .internal_static_google_cloud_aiplatform_v1_NasJobSpec_MultiTrialAlgorithmSpec_SearchTrialSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NasJobProto + .internal_static_google_cloud_aiplatform_v1_NasJobSpec_MultiTrialAlgorithmSpec_SearchTrialSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec + .class, + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec + .Builder.class); + } + + public static final int SEARCH_TRIAL_JOB_SPEC_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.CustomJobSpec searchTrialJobSpec_; + /** + * + * + *
+       * Required. The spec of a search trial job. The same spec applies to
+       * all search trials.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec search_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the searchTrialJobSpec field is set. + */ + @java.lang.Override + public boolean hasSearchTrialJobSpec() { + return searchTrialJobSpec_ != null; + } + /** + * + * + *
+       * Required. The spec of a search trial job. The same spec applies to
+       * all search trials.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec search_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The searchTrialJobSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.CustomJobSpec getSearchTrialJobSpec() { + return searchTrialJobSpec_ == null + ? com.google.cloud.aiplatform.v1.CustomJobSpec.getDefaultInstance() + : searchTrialJobSpec_; + } + /** + * + * + *
+       * Required. The spec of a search trial job. The same spec applies to
+       * all search trials.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec search_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.CustomJobSpecOrBuilder + getSearchTrialJobSpecOrBuilder() { + return searchTrialJobSpec_ == null + ? com.google.cloud.aiplatform.v1.CustomJobSpec.getDefaultInstance() + : searchTrialJobSpec_; + } + + public static final int MAX_TRIAL_COUNT_FIELD_NUMBER = 2; + private int maxTrialCount_ = 0; + /** + * + * + *
+       * Required. The maximum number of Neural Architecture Search (NAS) trials
+       * to run.
+       * 
+ * + * int32 max_trial_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The maxTrialCount. + */ + @java.lang.Override + public int getMaxTrialCount() { + return maxTrialCount_; + } + + public static final int MAX_PARALLEL_TRIAL_COUNT_FIELD_NUMBER = 3; + private int maxParallelTrialCount_ = 0; + /** + * + * + *
+       * Required. The maximum number of trials to run in parallel.
+       * 
+ * + * int32 max_parallel_trial_count = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The maxParallelTrialCount. + */ + @java.lang.Override + public int getMaxParallelTrialCount() { + return maxParallelTrialCount_; + } + + public static final int MAX_FAILED_TRIAL_COUNT_FIELD_NUMBER = 4; + private int maxFailedTrialCount_ = 0; + /** + * + * + *
+       * The number of failed trials that need to be seen before failing
+       * the NasJob.
+       * If set to 0, Vertex AI decides how many trials must fail
+       * before the whole job fails.
+       * 
+ * + * int32 max_failed_trial_count = 4; + * + * @return The maxFailedTrialCount. + */ + @java.lang.Override + public int getMaxFailedTrialCount() { + return maxFailedTrialCount_; + } + + 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 (searchTrialJobSpec_ != null) { + output.writeMessage(1, getSearchTrialJobSpec()); + } + if (maxTrialCount_ != 0) { + output.writeInt32(2, maxTrialCount_); + } + if (maxParallelTrialCount_ != 0) { + output.writeInt32(3, maxParallelTrialCount_); + } + if (maxFailedTrialCount_ != 0) { + output.writeInt32(4, maxFailedTrialCount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (searchTrialJobSpec_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSearchTrialJobSpec()); + } + if (maxTrialCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, maxTrialCount_); + } + if (maxParallelTrialCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, maxParallelTrialCount_); + } + if (maxFailedTrialCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, maxFailedTrialCount_); + } + 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.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec other = + (com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec) obj; + + if (hasSearchTrialJobSpec() != other.hasSearchTrialJobSpec()) return false; + if (hasSearchTrialJobSpec()) { + if (!getSearchTrialJobSpec().equals(other.getSearchTrialJobSpec())) return false; + } + if (getMaxTrialCount() != other.getMaxTrialCount()) return false; + if (getMaxParallelTrialCount() != other.getMaxParallelTrialCount()) return false; + if (getMaxFailedTrialCount() != other.getMaxFailedTrialCount()) 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 (hasSearchTrialJobSpec()) { + hash = (37 * hash) + SEARCH_TRIAL_JOB_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getSearchTrialJobSpec().hashCode(); + } + hash = (37 * hash) + MAX_TRIAL_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getMaxTrialCount(); + hash = (37 * hash) + MAX_PARALLEL_TRIAL_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getMaxParallelTrialCount(); + hash = (37 * hash) + MAX_FAILED_TRIAL_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getMaxFailedTrialCount(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpec + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpec + 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.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpec + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpec + 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.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpec + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpec + 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.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpec + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpec + 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.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpec + 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.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpec + 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.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpec + 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.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec + 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; + } + /** + * + * + *
+       * Represent spec for search trials.
+       * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec) + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NasJobProto + .internal_static_google_cloud_aiplatform_v1_NasJobSpec_MultiTrialAlgorithmSpec_SearchTrialSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NasJobProto + .internal_static_google_cloud_aiplatform_v1_NasJobSpec_MultiTrialAlgorithmSpec_SearchTrialSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec + .class, + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec + .Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + searchTrialJobSpec_ = null; + if (searchTrialJobSpecBuilder_ != null) { + searchTrialJobSpecBuilder_.dispose(); + searchTrialJobSpecBuilder_ = null; + } + maxTrialCount_ = 0; + maxParallelTrialCount_ = 0; + maxFailedTrialCount_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.NasJobProto + .internal_static_google_cloud_aiplatform_v1_NasJobSpec_MultiTrialAlgorithmSpec_SearchTrialSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec + build() { + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec + buildPartial() { + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec result = + new com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.searchTrialJobSpec_ = + searchTrialJobSpecBuilder_ == null + ? searchTrialJobSpec_ + : searchTrialJobSpecBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.maxTrialCount_ = maxTrialCount_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.maxParallelTrialCount_ = maxParallelTrialCount_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.maxFailedTrialCount_ = maxFailedTrialCount_; + } + } + + @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.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec + other) { + if (other + == com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec + .getDefaultInstance()) return this; + if (other.hasSearchTrialJobSpec()) { + mergeSearchTrialJobSpec(other.getSearchTrialJobSpec()); + } + if (other.getMaxTrialCount() != 0) { + setMaxTrialCount(other.getMaxTrialCount()); + } + if (other.getMaxParallelTrialCount() != 0) { + setMaxParallelTrialCount(other.getMaxParallelTrialCount()); + } + if (other.getMaxFailedTrialCount() != 0) { + setMaxFailedTrialCount(other.getMaxFailedTrialCount()); + } + 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( + getSearchTrialJobSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + maxTrialCount_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + maxParallelTrialCount_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + maxFailedTrialCount_ = 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 com.google.cloud.aiplatform.v1.CustomJobSpec searchTrialJobSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.CustomJobSpec, + com.google.cloud.aiplatform.v1.CustomJobSpec.Builder, + com.google.cloud.aiplatform.v1.CustomJobSpecOrBuilder> + searchTrialJobSpecBuilder_; + /** + * + * + *
+         * Required. The spec of a search trial job. The same spec applies to
+         * all search trials.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec search_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the searchTrialJobSpec field is set. + */ + public boolean hasSearchTrialJobSpec() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+         * Required. The spec of a search trial job. The same spec applies to
+         * all search trials.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec search_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The searchTrialJobSpec. + */ + public com.google.cloud.aiplatform.v1.CustomJobSpec getSearchTrialJobSpec() { + if (searchTrialJobSpecBuilder_ == null) { + return searchTrialJobSpec_ == null + ? com.google.cloud.aiplatform.v1.CustomJobSpec.getDefaultInstance() + : searchTrialJobSpec_; + } else { + return searchTrialJobSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+         * Required. The spec of a search trial job. The same spec applies to
+         * all search trials.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec search_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSearchTrialJobSpec(com.google.cloud.aiplatform.v1.CustomJobSpec value) { + if (searchTrialJobSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + searchTrialJobSpec_ = value; + } else { + searchTrialJobSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The spec of a search trial job. The same spec applies to
+         * all search trials.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec search_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSearchTrialJobSpec( + com.google.cloud.aiplatform.v1.CustomJobSpec.Builder builderForValue) { + if (searchTrialJobSpecBuilder_ == null) { + searchTrialJobSpec_ = builderForValue.build(); + } else { + searchTrialJobSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The spec of a search trial job. The same spec applies to
+         * all search trials.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec search_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeSearchTrialJobSpec(com.google.cloud.aiplatform.v1.CustomJobSpec value) { + if (searchTrialJobSpecBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && searchTrialJobSpec_ != null + && searchTrialJobSpec_ + != com.google.cloud.aiplatform.v1.CustomJobSpec.getDefaultInstance()) { + getSearchTrialJobSpecBuilder().mergeFrom(value); + } else { + searchTrialJobSpec_ = value; + } + } else { + searchTrialJobSpecBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The spec of a search trial job. The same spec applies to
+         * all search trials.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec search_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearSearchTrialJobSpec() { + bitField0_ = (bitField0_ & ~0x00000001); + searchTrialJobSpec_ = null; + if (searchTrialJobSpecBuilder_ != null) { + searchTrialJobSpecBuilder_.dispose(); + searchTrialJobSpecBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The spec of a search trial job. The same spec applies to
+         * all search trials.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec search_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.CustomJobSpec.Builder getSearchTrialJobSpecBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getSearchTrialJobSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * Required. The spec of a search trial job. The same spec applies to
+         * all search trials.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec search_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.CustomJobSpecOrBuilder + getSearchTrialJobSpecOrBuilder() { + if (searchTrialJobSpecBuilder_ != null) { + return searchTrialJobSpecBuilder_.getMessageOrBuilder(); + } else { + return searchTrialJobSpec_ == null + ? com.google.cloud.aiplatform.v1.CustomJobSpec.getDefaultInstance() + : searchTrialJobSpec_; + } + } + /** + * + * + *
+         * Required. The spec of a search trial job. The same spec applies to
+         * all search trials.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec search_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.CustomJobSpec, + com.google.cloud.aiplatform.v1.CustomJobSpec.Builder, + com.google.cloud.aiplatform.v1.CustomJobSpecOrBuilder> + getSearchTrialJobSpecFieldBuilder() { + if (searchTrialJobSpecBuilder_ == null) { + searchTrialJobSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.CustomJobSpec, + com.google.cloud.aiplatform.v1.CustomJobSpec.Builder, + com.google.cloud.aiplatform.v1.CustomJobSpecOrBuilder>( + getSearchTrialJobSpec(), getParentForChildren(), isClean()); + searchTrialJobSpec_ = null; + } + return searchTrialJobSpecBuilder_; + } + + private int maxTrialCount_; + /** + * + * + *
+         * Required. The maximum number of Neural Architecture Search (NAS) trials
+         * to run.
+         * 
+ * + * int32 max_trial_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The maxTrialCount. + */ + @java.lang.Override + public int getMaxTrialCount() { + return maxTrialCount_; + } + /** + * + * + *
+         * Required. The maximum number of Neural Architecture Search (NAS) trials
+         * to run.
+         * 
+ * + * int32 max_trial_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The maxTrialCount to set. + * @return This builder for chaining. + */ + public Builder setMaxTrialCount(int value) { + + maxTrialCount_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The maximum number of Neural Architecture Search (NAS) trials
+         * to run.
+         * 
+ * + * int32 max_trial_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearMaxTrialCount() { + bitField0_ = (bitField0_ & ~0x00000002); + maxTrialCount_ = 0; + onChanged(); + return this; + } + + private int maxParallelTrialCount_; + /** + * + * + *
+         * Required. The maximum number of trials to run in parallel.
+         * 
+ * + * int32 max_parallel_trial_count = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The maxParallelTrialCount. + */ + @java.lang.Override + public int getMaxParallelTrialCount() { + return maxParallelTrialCount_; + } + /** + * + * + *
+         * Required. The maximum number of trials to run in parallel.
+         * 
+ * + * int32 max_parallel_trial_count = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The maxParallelTrialCount to set. + * @return This builder for chaining. + */ + public Builder setMaxParallelTrialCount(int value) { + + maxParallelTrialCount_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The maximum number of trials to run in parallel.
+         * 
+ * + * int32 max_parallel_trial_count = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearMaxParallelTrialCount() { + bitField0_ = (bitField0_ & ~0x00000004); + maxParallelTrialCount_ = 0; + onChanged(); + return this; + } + + private int maxFailedTrialCount_; + /** + * + * + *
+         * The number of failed trials that need to be seen before failing
+         * the NasJob.
+         * If set to 0, Vertex AI decides how many trials must fail
+         * before the whole job fails.
+         * 
+ * + * int32 max_failed_trial_count = 4; + * + * @return The maxFailedTrialCount. + */ + @java.lang.Override + public int getMaxFailedTrialCount() { + return maxFailedTrialCount_; + } + /** + * + * + *
+         * The number of failed trials that need to be seen before failing
+         * the NasJob.
+         * If set to 0, Vertex AI decides how many trials must fail
+         * before the whole job fails.
+         * 
+ * + * int32 max_failed_trial_count = 4; + * + * @param value The maxFailedTrialCount to set. + * @return This builder for chaining. + */ + public Builder setMaxFailedTrialCount(int value) { + + maxFailedTrialCount_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+         * The number of failed trials that need to be seen before failing
+         * the NasJob.
+         * If set to 0, Vertex AI decides how many trials must fail
+         * before the whole job fails.
+         * 
+ * + * int32 max_failed_trial_count = 4; + * + * @return This builder for chaining. + */ + public Builder clearMaxFailedTrialCount() { + bitField0_ = (bitField0_ & ~0x00000008); + maxFailedTrialCount_ = 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.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec) + private static final com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec(); + } + + public static com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchTrialSpec 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.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface TrainTrialSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Required. The spec of a train trial job. The same spec applies to
+       * all train trials.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec train_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the trainTrialJobSpec field is set. + */ + boolean hasTrainTrialJobSpec(); + /** + * + * + *
+       * Required. The spec of a train trial job. The same spec applies to
+       * all train trials.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec train_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The trainTrialJobSpec. + */ + com.google.cloud.aiplatform.v1.CustomJobSpec getTrainTrialJobSpec(); + /** + * + * + *
+       * Required. The spec of a train trial job. The same spec applies to
+       * all train trials.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec train_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1.CustomJobSpecOrBuilder getTrainTrialJobSpecOrBuilder(); + + /** + * + * + *
+       * Required. The maximum number of trials to run in parallel.
+       * 
+ * + * int32 max_parallel_trial_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The maxParallelTrialCount. + */ + int getMaxParallelTrialCount(); + + /** + * + * + *
+       * Required. Frequency of search trials to start train stage. Top N
+       * [TrainTrialSpec.max_parallel_trial_count]
+       * search trials will be trained for every M
+       * [TrainTrialSpec.frequency] trials searched.
+       * 
+ * + * int32 frequency = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The frequency. + */ + int getFrequency(); + } + /** + * + * + *
+     * Represent spec for train trials.
+     * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec} + */ + public static final class TrainTrialSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec) + TrainTrialSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use TrainTrialSpec.newBuilder() to construct. + private TrainTrialSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TrainTrialSpec() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TrainTrialSpec(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NasJobProto + .internal_static_google_cloud_aiplatform_v1_NasJobSpec_MultiTrialAlgorithmSpec_TrainTrialSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NasJobProto + .internal_static_google_cloud_aiplatform_v1_NasJobSpec_MultiTrialAlgorithmSpec_TrainTrialSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + .class, + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + .Builder.class); + } + + public static final int TRAIN_TRIAL_JOB_SPEC_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1.CustomJobSpec trainTrialJobSpec_; + /** + * + * + *
+       * Required. The spec of a train trial job. The same spec applies to
+       * all train trials.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec train_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the trainTrialJobSpec field is set. + */ + @java.lang.Override + public boolean hasTrainTrialJobSpec() { + return trainTrialJobSpec_ != null; + } + /** + * + * + *
+       * Required. The spec of a train trial job. The same spec applies to
+       * all train trials.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec train_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The trainTrialJobSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.CustomJobSpec getTrainTrialJobSpec() { + return trainTrialJobSpec_ == null + ? com.google.cloud.aiplatform.v1.CustomJobSpec.getDefaultInstance() + : trainTrialJobSpec_; + } + /** + * + * + *
+       * Required. The spec of a train trial job. The same spec applies to
+       * all train trials.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec train_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.CustomJobSpecOrBuilder getTrainTrialJobSpecOrBuilder() { + return trainTrialJobSpec_ == null + ? com.google.cloud.aiplatform.v1.CustomJobSpec.getDefaultInstance() + : trainTrialJobSpec_; + } + + public static final int MAX_PARALLEL_TRIAL_COUNT_FIELD_NUMBER = 2; + private int maxParallelTrialCount_ = 0; + /** + * + * + *
+       * Required. The maximum number of trials to run in parallel.
+       * 
+ * + * int32 max_parallel_trial_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The maxParallelTrialCount. + */ + @java.lang.Override + public int getMaxParallelTrialCount() { + return maxParallelTrialCount_; + } + + public static final int FREQUENCY_FIELD_NUMBER = 3; + private int frequency_ = 0; + /** + * + * + *
+       * Required. Frequency of search trials to start train stage. Top N
+       * [TrainTrialSpec.max_parallel_trial_count]
+       * search trials will be trained for every M
+       * [TrainTrialSpec.frequency] trials searched.
+       * 
+ * + * int32 frequency = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The frequency. + */ + @java.lang.Override + public int getFrequency() { + return frequency_; + } + + 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 (trainTrialJobSpec_ != null) { + output.writeMessage(1, getTrainTrialJobSpec()); + } + if (maxParallelTrialCount_ != 0) { + output.writeInt32(2, maxParallelTrialCount_); + } + if (frequency_ != 0) { + output.writeInt32(3, frequency_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (trainTrialJobSpec_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTrainTrialJobSpec()); + } + if (maxParallelTrialCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, maxParallelTrialCount_); + } + if (frequency_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, frequency_); + } + 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.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec other = + (com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec) obj; + + if (hasTrainTrialJobSpec() != other.hasTrainTrialJobSpec()) return false; + if (hasTrainTrialJobSpec()) { + if (!getTrainTrialJobSpec().equals(other.getTrainTrialJobSpec())) return false; + } + if (getMaxParallelTrialCount() != other.getMaxParallelTrialCount()) return false; + if (getFrequency() != other.getFrequency()) 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 (hasTrainTrialJobSpec()) { + hash = (37 * hash) + TRAIN_TRIAL_JOB_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getTrainTrialJobSpec().hashCode(); + } + hash = (37 * hash) + MAX_PARALLEL_TRIAL_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getMaxParallelTrialCount(); + hash = (37 * hash) + FREQUENCY_FIELD_NUMBER; + hash = (53 * hash) + getFrequency(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + 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.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + 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.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + 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.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + 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.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + 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.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + 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.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + 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.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + 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; + } + /** + * + * + *
+       * Represent spec for train trials.
+       * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec) + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec + .TrainTrialSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NasJobProto + .internal_static_google_cloud_aiplatform_v1_NasJobSpec_MultiTrialAlgorithmSpec_TrainTrialSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NasJobProto + .internal_static_google_cloud_aiplatform_v1_NasJobSpec_MultiTrialAlgorithmSpec_TrainTrialSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + .class, + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + .Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + trainTrialJobSpec_ = null; + if (trainTrialJobSpecBuilder_ != null) { + trainTrialJobSpecBuilder_.dispose(); + trainTrialJobSpecBuilder_ = null; + } + maxParallelTrialCount_ = 0; + frequency_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.NasJobProto + .internal_static_google_cloud_aiplatform_v1_NasJobSpec_MultiTrialAlgorithmSpec_TrainTrialSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + build() { + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + buildPartial() { + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec result = + new com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.trainTrialJobSpec_ = + trainTrialJobSpecBuilder_ == null + ? trainTrialJobSpec_ + : trainTrialJobSpecBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.maxParallelTrialCount_ = maxParallelTrialCount_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.frequency_ = frequency_; + } + } + + @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.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + other) { + if (other + == com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + .getDefaultInstance()) return this; + if (other.hasTrainTrialJobSpec()) { + mergeTrainTrialJobSpec(other.getTrainTrialJobSpec()); + } + if (other.getMaxParallelTrialCount() != 0) { + setMaxParallelTrialCount(other.getMaxParallelTrialCount()); + } + if (other.getFrequency() != 0) { + setFrequency(other.getFrequency()); + } + 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( + getTrainTrialJobSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + maxParallelTrialCount_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + frequency_ = 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 com.google.cloud.aiplatform.v1.CustomJobSpec trainTrialJobSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.CustomJobSpec, + com.google.cloud.aiplatform.v1.CustomJobSpec.Builder, + com.google.cloud.aiplatform.v1.CustomJobSpecOrBuilder> + trainTrialJobSpecBuilder_; + /** + * + * + *
+         * Required. The spec of a train trial job. The same spec applies to
+         * all train trials.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec train_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the trainTrialJobSpec field is set. + */ + public boolean hasTrainTrialJobSpec() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+         * Required. The spec of a train trial job. The same spec applies to
+         * all train trials.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec train_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The trainTrialJobSpec. + */ + public com.google.cloud.aiplatform.v1.CustomJobSpec getTrainTrialJobSpec() { + if (trainTrialJobSpecBuilder_ == null) { + return trainTrialJobSpec_ == null + ? com.google.cloud.aiplatform.v1.CustomJobSpec.getDefaultInstance() + : trainTrialJobSpec_; + } else { + return trainTrialJobSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+         * Required. The spec of a train trial job. The same spec applies to
+         * all train trials.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec train_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTrainTrialJobSpec(com.google.cloud.aiplatform.v1.CustomJobSpec value) { + if (trainTrialJobSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + trainTrialJobSpec_ = value; + } else { + trainTrialJobSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The spec of a train trial job. The same spec applies to
+         * all train trials.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec train_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTrainTrialJobSpec( + com.google.cloud.aiplatform.v1.CustomJobSpec.Builder builderForValue) { + if (trainTrialJobSpecBuilder_ == null) { + trainTrialJobSpec_ = builderForValue.build(); + } else { + trainTrialJobSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The spec of a train trial job. The same spec applies to
+         * all train trials.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec train_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeTrainTrialJobSpec(com.google.cloud.aiplatform.v1.CustomJobSpec value) { + if (trainTrialJobSpecBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && trainTrialJobSpec_ != null + && trainTrialJobSpec_ + != com.google.cloud.aiplatform.v1.CustomJobSpec.getDefaultInstance()) { + getTrainTrialJobSpecBuilder().mergeFrom(value); + } else { + trainTrialJobSpec_ = value; + } + } else { + trainTrialJobSpecBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The spec of a train trial job. The same spec applies to
+         * all train trials.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec train_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearTrainTrialJobSpec() { + bitField0_ = (bitField0_ & ~0x00000001); + trainTrialJobSpec_ = null; + if (trainTrialJobSpecBuilder_ != null) { + trainTrialJobSpecBuilder_.dispose(); + trainTrialJobSpecBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The spec of a train trial job. The same spec applies to
+         * all train trials.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec train_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.CustomJobSpec.Builder getTrainTrialJobSpecBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getTrainTrialJobSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * Required. The spec of a train trial job. The same spec applies to
+         * all train trials.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec train_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.CustomJobSpecOrBuilder + getTrainTrialJobSpecOrBuilder() { + if (trainTrialJobSpecBuilder_ != null) { + return trainTrialJobSpecBuilder_.getMessageOrBuilder(); + } else { + return trainTrialJobSpec_ == null + ? com.google.cloud.aiplatform.v1.CustomJobSpec.getDefaultInstance() + : trainTrialJobSpec_; + } + } + /** + * + * + *
+         * Required. The spec of a train trial job. The same spec applies to
+         * all train trials.
+         * 
+ * + * + * .google.cloud.aiplatform.v1.CustomJobSpec train_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.CustomJobSpec, + com.google.cloud.aiplatform.v1.CustomJobSpec.Builder, + com.google.cloud.aiplatform.v1.CustomJobSpecOrBuilder> + getTrainTrialJobSpecFieldBuilder() { + if (trainTrialJobSpecBuilder_ == null) { + trainTrialJobSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.CustomJobSpec, + com.google.cloud.aiplatform.v1.CustomJobSpec.Builder, + com.google.cloud.aiplatform.v1.CustomJobSpecOrBuilder>( + getTrainTrialJobSpec(), getParentForChildren(), isClean()); + trainTrialJobSpec_ = null; + } + return trainTrialJobSpecBuilder_; + } + + private int maxParallelTrialCount_; + /** + * + * + *
+         * Required. The maximum number of trials to run in parallel.
+         * 
+ * + * int32 max_parallel_trial_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The maxParallelTrialCount. + */ + @java.lang.Override + public int getMaxParallelTrialCount() { + return maxParallelTrialCount_; + } + /** + * + * + *
+         * Required. The maximum number of trials to run in parallel.
+         * 
+ * + * int32 max_parallel_trial_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The maxParallelTrialCount to set. + * @return This builder for chaining. + */ + public Builder setMaxParallelTrialCount(int value) { + + maxParallelTrialCount_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The maximum number of trials to run in parallel.
+         * 
+ * + * int32 max_parallel_trial_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearMaxParallelTrialCount() { + bitField0_ = (bitField0_ & ~0x00000002); + maxParallelTrialCount_ = 0; + onChanged(); + return this; + } + + private int frequency_; + /** + * + * + *
+         * Required. Frequency of search trials to start train stage. Top N
+         * [TrainTrialSpec.max_parallel_trial_count]
+         * search trials will be trained for every M
+         * [TrainTrialSpec.frequency] trials searched.
+         * 
+ * + * int32 frequency = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The frequency. + */ + @java.lang.Override + public int getFrequency() { + return frequency_; + } + /** + * + * + *
+         * Required. Frequency of search trials to start train stage. Top N
+         * [TrainTrialSpec.max_parallel_trial_count]
+         * search trials will be trained for every M
+         * [TrainTrialSpec.frequency] trials searched.
+         * 
+ * + * int32 frequency = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The frequency to set. + * @return This builder for chaining. + */ + public Builder setFrequency(int value) { + + frequency_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+         * Required. Frequency of search trials to start train stage. Top N
+         * [TrainTrialSpec.max_parallel_trial_count]
+         * search trials will be trained for every M
+         * [TrainTrialSpec.frequency] trials searched.
+         * 
+ * + * int32 frequency = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearFrequency() { + bitField0_ = (bitField0_ & ~0x00000004); + frequency_ = 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.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec) + private static final com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec + .TrainTrialSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec(); + } + + public static com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TrainTrialSpec 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.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int MULTI_TRIAL_ALGORITHM_FIELD_NUMBER = 1; + private int multiTrialAlgorithm_ = 0; + /** + * + * + *
+     * The multi-trial Neural Architecture Search (NAS) algorithm
+     * type. Defaults to `REINFORCEMENT_LEARNING`.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MultiTrialAlgorithm multi_trial_algorithm = 1; + * + * + * @return The enum numeric value on the wire for multiTrialAlgorithm. + */ + @java.lang.Override + public int getMultiTrialAlgorithmValue() { + return multiTrialAlgorithm_; + } + /** + * + * + *
+     * The multi-trial Neural Architecture Search (NAS) algorithm
+     * type. Defaults to `REINFORCEMENT_LEARNING`.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MultiTrialAlgorithm multi_trial_algorithm = 1; + * + * + * @return The multiTrialAlgorithm. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MultiTrialAlgorithm + getMultiTrialAlgorithm() { + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MultiTrialAlgorithm result = + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MultiTrialAlgorithm + .forNumber(multiTrialAlgorithm_); + return result == null + ? com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MultiTrialAlgorithm + .UNRECOGNIZED + : result; + } + + public static final int METRIC_FIELD_NUMBER = 2; + private com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec metric_; + /** + * + * + *
+     * Metric specs for the NAS job.
+     * Validation for this field is done at `multi_trial_algorithm_spec` field.
+     * 
+ * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec metric = 2; + * + * + * @return Whether the metric field is set. + */ + @java.lang.Override + public boolean hasMetric() { + return metric_ != null; + } + /** + * + * + *
+     * Metric specs for the NAS job.
+     * Validation for this field is done at `multi_trial_algorithm_spec` field.
+     * 
+ * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec metric = 2; + * + * + * @return The metric. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + getMetric() { + return metric_ == null + ? com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + .getDefaultInstance() + : metric_; + } + /** + * + * + *
+     * Metric specs for the NAS job.
+     * Validation for this field is done at `multi_trial_algorithm_spec` field.
+     * 
+ * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec metric = 2; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpecOrBuilder + getMetricOrBuilder() { + return metric_ == null + ? com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + .getDefaultInstance() + : metric_; + } + + public static final int SEARCH_TRIAL_SPEC_FIELD_NUMBER = 3; + private com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec + searchTrialSpec_; + /** + * + * + *
+     * Required. Spec for search trials.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec search_trial_spec = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the searchTrialSpec field is set. + */ + @java.lang.Override + public boolean hasSearchTrialSpec() { + return searchTrialSpec_ != null; + } + /** + * + * + *
+     * Required. Spec for search trials.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec search_trial_spec = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The searchTrialSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec + getSearchTrialSpec() { + return searchTrialSpec_ == null + ? com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec + .getDefaultInstance() + : searchTrialSpec_; + } + /** + * + * + *
+     * Required. Spec for search trials.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec search_trial_spec = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpecOrBuilder + getSearchTrialSpecOrBuilder() { + return searchTrialSpec_ == null + ? com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec + .getDefaultInstance() + : searchTrialSpec_; + } + + public static final int TRAIN_TRIAL_SPEC_FIELD_NUMBER = 4; + private com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + trainTrialSpec_; + /** + * + * + *
+     * Spec for train trials. Top N [TrainTrialSpec.max_parallel_trial_count]
+     * search trials will be trained for every M
+     * [TrainTrialSpec.frequency] trials searched.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec train_trial_spec = 4; + * + * + * @return Whether the trainTrialSpec field is set. + */ + @java.lang.Override + public boolean hasTrainTrialSpec() { + return trainTrialSpec_ != null; + } + /** + * + * + *
+     * Spec for train trials. Top N [TrainTrialSpec.max_parallel_trial_count]
+     * search trials will be trained for every M
+     * [TrainTrialSpec.frequency] trials searched.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec train_trial_spec = 4; + * + * + * @return The trainTrialSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + getTrainTrialSpec() { + return trainTrialSpec_ == null + ? com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + .getDefaultInstance() + : trainTrialSpec_; + } + /** + * + * + *
+     * Spec for train trials. Top N [TrainTrialSpec.max_parallel_trial_count]
+     * search trials will be trained for every M
+     * [TrainTrialSpec.frequency] trials searched.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec train_trial_spec = 4; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpecOrBuilder + getTrainTrialSpecOrBuilder() { + return trainTrialSpec_ == null + ? com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + .getDefaultInstance() + : trainTrialSpec_; + } + + 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 (multiTrialAlgorithm_ + != com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MultiTrialAlgorithm + .MULTI_TRIAL_ALGORITHM_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, multiTrialAlgorithm_); + } + if (metric_ != null) { + output.writeMessage(2, getMetric()); + } + if (searchTrialSpec_ != null) { + output.writeMessage(3, getSearchTrialSpec()); + } + if (trainTrialSpec_ != null) { + output.writeMessage(4, getTrainTrialSpec()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (multiTrialAlgorithm_ + != com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MultiTrialAlgorithm + .MULTI_TRIAL_ALGORITHM_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, multiTrialAlgorithm_); + } + if (metric_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getMetric()); + } + if (searchTrialSpec_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getSearchTrialSpec()); + } + if (trainTrialSpec_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getTrainTrialSpec()); + } + 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.NasJobSpec.MultiTrialAlgorithmSpec)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec other = + (com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec) obj; + + if (multiTrialAlgorithm_ != other.multiTrialAlgorithm_) return false; + if (hasMetric() != other.hasMetric()) return false; + if (hasMetric()) { + if (!getMetric().equals(other.getMetric())) return false; + } + if (hasSearchTrialSpec() != other.hasSearchTrialSpec()) return false; + if (hasSearchTrialSpec()) { + if (!getSearchTrialSpec().equals(other.getSearchTrialSpec())) return false; + } + if (hasTrainTrialSpec() != other.hasTrainTrialSpec()) return false; + if (hasTrainTrialSpec()) { + if (!getTrainTrialSpec().equals(other.getTrainTrialSpec())) 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) + MULTI_TRIAL_ALGORITHM_FIELD_NUMBER; + hash = (53 * hash) + multiTrialAlgorithm_; + if (hasMetric()) { + hash = (37 * hash) + METRIC_FIELD_NUMBER; + hash = (53 * hash) + getMetric().hashCode(); + } + if (hasSearchTrialSpec()) { + hash = (37 * hash) + SEARCH_TRIAL_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getSearchTrialSpec().hashCode(); + } + if (hasTrainTrialSpec()) { + hash = (37 * hash) + TRAIN_TRIAL_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getTrainTrialSpec().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec 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.NasJobSpec.MultiTrialAlgorithmSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec 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.NasJobSpec.MultiTrialAlgorithmSpec parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec 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.NasJobSpec.MultiTrialAlgorithmSpec parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec 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.NasJobSpec.MultiTrialAlgorithmSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec + 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.NasJobSpec.MultiTrialAlgorithmSpec 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.NasJobSpec.MultiTrialAlgorithmSpec 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.NasJobSpec.MultiTrialAlgorithmSpec 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 spec of multi-trial Neural Architecture Search (NAS).
+     * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec) + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NasJobProto + .internal_static_google_cloud_aiplatform_v1_NasJobSpec_MultiTrialAlgorithmSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NasJobProto + .internal_static_google_cloud_aiplatform_v1_NasJobSpec_MultiTrialAlgorithmSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.class, + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + multiTrialAlgorithm_ = 0; + metric_ = null; + if (metricBuilder_ != null) { + metricBuilder_.dispose(); + metricBuilder_ = null; + } + searchTrialSpec_ = null; + if (searchTrialSpecBuilder_ != null) { + searchTrialSpecBuilder_.dispose(); + searchTrialSpecBuilder_ = null; + } + trainTrialSpec_ = null; + if (trainTrialSpecBuilder_ != null) { + trainTrialSpecBuilder_.dispose(); + trainTrialSpecBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.NasJobProto + .internal_static_google_cloud_aiplatform_v1_NasJobSpec_MultiTrialAlgorithmSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec build() { + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec buildPartial() { + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec result = + new com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.multiTrialAlgorithm_ = multiTrialAlgorithm_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.metric_ = metricBuilder_ == null ? metric_ : metricBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.searchTrialSpec_ = + searchTrialSpecBuilder_ == null ? searchTrialSpec_ : searchTrialSpecBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.trainTrialSpec_ = + trainTrialSpecBuilder_ == null ? trainTrialSpec_ : trainTrialSpecBuilder_.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.NasJobSpec.MultiTrialAlgorithmSpec) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec other) { + if (other + == com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec + .getDefaultInstance()) return this; + if (other.multiTrialAlgorithm_ != 0) { + setMultiTrialAlgorithmValue(other.getMultiTrialAlgorithmValue()); + } + if (other.hasMetric()) { + mergeMetric(other.getMetric()); + } + if (other.hasSearchTrialSpec()) { + mergeSearchTrialSpec(other.getSearchTrialSpec()); + } + if (other.hasTrainTrialSpec()) { + mergeTrainTrialSpec(other.getTrainTrialSpec()); + } + 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: + { + multiTrialAlgorithm_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + input.readMessage(getMetricFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + getSearchTrialSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage( + getTrainTrialSpecFieldBuilder().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 int multiTrialAlgorithm_ = 0; + /** + * + * + *
+       * The multi-trial Neural Architecture Search (NAS) algorithm
+       * type. Defaults to `REINFORCEMENT_LEARNING`.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MultiTrialAlgorithm multi_trial_algorithm = 1; + * + * + * @return The enum numeric value on the wire for multiTrialAlgorithm. + */ + @java.lang.Override + public int getMultiTrialAlgorithmValue() { + return multiTrialAlgorithm_; + } + /** + * + * + *
+       * The multi-trial Neural Architecture Search (NAS) algorithm
+       * type. Defaults to `REINFORCEMENT_LEARNING`.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MultiTrialAlgorithm multi_trial_algorithm = 1; + * + * + * @param value The enum numeric value on the wire for multiTrialAlgorithm to set. + * @return This builder for chaining. + */ + public Builder setMultiTrialAlgorithmValue(int value) { + multiTrialAlgorithm_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The multi-trial Neural Architecture Search (NAS) algorithm
+       * type. Defaults to `REINFORCEMENT_LEARNING`.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MultiTrialAlgorithm multi_trial_algorithm = 1; + * + * + * @return The multiTrialAlgorithm. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MultiTrialAlgorithm + getMultiTrialAlgorithm() { + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MultiTrialAlgorithm + result = + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec + .MultiTrialAlgorithm.forNumber(multiTrialAlgorithm_); + return result == null + ? com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MultiTrialAlgorithm + .UNRECOGNIZED + : result; + } + /** + * + * + *
+       * The multi-trial Neural Architecture Search (NAS) algorithm
+       * type. Defaults to `REINFORCEMENT_LEARNING`.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MultiTrialAlgorithm multi_trial_algorithm = 1; + * + * + * @param value The multiTrialAlgorithm to set. + * @return This builder for chaining. + */ + public Builder setMultiTrialAlgorithm( + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MultiTrialAlgorithm + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + multiTrialAlgorithm_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * The multi-trial Neural Architecture Search (NAS) algorithm
+       * type. Defaults to `REINFORCEMENT_LEARNING`.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MultiTrialAlgorithm multi_trial_algorithm = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearMultiTrialAlgorithm() { + bitField0_ = (bitField0_ & ~0x00000001); + multiTrialAlgorithm_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec metric_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec, + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec.Builder, + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpecOrBuilder> + metricBuilder_; + /** + * + * + *
+       * Metric specs for the NAS job.
+       * Validation for this field is done at `multi_trial_algorithm_spec` field.
+       * 
+ * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec metric = 2; + * + * + * @return Whether the metric field is set. + */ + public boolean hasMetric() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+       * Metric specs for the NAS job.
+       * Validation for this field is done at `multi_trial_algorithm_spec` field.
+       * 
+ * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec metric = 2; + * + * + * @return The metric. + */ + public com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + getMetric() { + if (metricBuilder_ == null) { + return metric_ == null + ? com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + .getDefaultInstance() + : metric_; + } else { + return metricBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Metric specs for the NAS job.
+       * Validation for this field is done at `multi_trial_algorithm_spec` field.
+       * 
+ * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec metric = 2; + * + */ + public Builder setMetric( + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec value) { + if (metricBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metric_ = value; + } else { + metricBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Metric specs for the NAS job.
+       * Validation for this field is done at `multi_trial_algorithm_spec` field.
+       * 
+ * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec metric = 2; + * + */ + public Builder setMetric( + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec.Builder + builderForValue) { + if (metricBuilder_ == null) { + metric_ = builderForValue.build(); + } else { + metricBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Metric specs for the NAS job.
+       * Validation for this field is done at `multi_trial_algorithm_spec` field.
+       * 
+ * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec metric = 2; + * + */ + public Builder mergeMetric( + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec value) { + if (metricBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && metric_ != null + && metric_ + != com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + .getDefaultInstance()) { + getMetricBuilder().mergeFrom(value); + } else { + metric_ = value; + } + } else { + metricBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Metric specs for the NAS job.
+       * Validation for this field is done at `multi_trial_algorithm_spec` field.
+       * 
+ * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec metric = 2; + * + */ + public Builder clearMetric() { + bitField0_ = (bitField0_ & ~0x00000002); + metric_ = null; + if (metricBuilder_ != null) { + metricBuilder_.dispose(); + metricBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Metric specs for the NAS job.
+       * Validation for this field is done at `multi_trial_algorithm_spec` field.
+       * 
+ * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec metric = 2; + * + */ + public com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec.Builder + getMetricBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getMetricFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Metric specs for the NAS job.
+       * Validation for this field is done at `multi_trial_algorithm_spec` field.
+       * 
+ * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec metric = 2; + * + */ + public com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpecOrBuilder + getMetricOrBuilder() { + if (metricBuilder_ != null) { + return metricBuilder_.getMessageOrBuilder(); + } else { + return metric_ == null + ? com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + .getDefaultInstance() + : metric_; + } + } + /** + * + * + *
+       * Metric specs for the NAS job.
+       * Validation for this field is done at `multi_trial_algorithm_spec` field.
+       * 
+ * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec metric = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec, + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec.Builder, + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpecOrBuilder> + getMetricFieldBuilder() { + if (metricBuilder_ == null) { + metricBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec, + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + .Builder, + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec + .MetricSpecOrBuilder>(getMetric(), getParentForChildren(), isClean()); + metric_ = null; + } + return metricBuilder_; + } + + private com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec + searchTrialSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec, + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec + .Builder, + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpecOrBuilder> + searchTrialSpecBuilder_; + /** + * + * + *
+       * Required. Spec for search trials.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec search_trial_spec = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the searchTrialSpec field is set. + */ + public boolean hasSearchTrialSpec() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+       * Required. Spec for search trials.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec search_trial_spec = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The searchTrialSpec. + */ + public com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec + getSearchTrialSpec() { + if (searchTrialSpecBuilder_ == null) { + return searchTrialSpec_ == null + ? com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec + .getDefaultInstance() + : searchTrialSpec_; + } else { + return searchTrialSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Required. Spec for search trials.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec search_trial_spec = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSearchTrialSpec( + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec value) { + if (searchTrialSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + searchTrialSpec_ = value; + } else { + searchTrialSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Spec for search trials.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec search_trial_spec = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSearchTrialSpec( + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec.Builder + builderForValue) { + if (searchTrialSpecBuilder_ == null) { + searchTrialSpec_ = builderForValue.build(); + } else { + searchTrialSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Spec for search trials.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec search_trial_spec = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeSearchTrialSpec( + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec value) { + if (searchTrialSpecBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && searchTrialSpec_ != null + && searchTrialSpec_ + != com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpec.getDefaultInstance()) { + getSearchTrialSpecBuilder().mergeFrom(value); + } else { + searchTrialSpec_ = value; + } + } else { + searchTrialSpecBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Spec for search trials.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec search_trial_spec = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearSearchTrialSpec() { + bitField0_ = (bitField0_ & ~0x00000004); + searchTrialSpec_ = null; + if (searchTrialSpecBuilder_ != null) { + searchTrialSpecBuilder_.dispose(); + searchTrialSpecBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Spec for search trials.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec search_trial_spec = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec + .Builder + getSearchTrialSpecBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getSearchTrialSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Required. Spec for search trials.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec search_trial_spec = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpecOrBuilder + getSearchTrialSpecOrBuilder() { + if (searchTrialSpecBuilder_ != null) { + return searchTrialSpecBuilder_.getMessageOrBuilder(); + } else { + return searchTrialSpec_ == null + ? com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec + .getDefaultInstance() + : searchTrialSpec_; + } + } + /** + * + * + *
+       * Required. Spec for search trials.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec search_trial_spec = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec, + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec + .Builder, + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpecOrBuilder> + getSearchTrialSpecFieldBuilder() { + if (searchTrialSpecBuilder_ == null) { + searchTrialSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec, + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec + .Builder, + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpecOrBuilder>( + getSearchTrialSpec(), getParentForChildren(), isClean()); + searchTrialSpec_ = null; + } + return searchTrialSpecBuilder_; + } + + private com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + trainTrialSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec, + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + .Builder, + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec + .TrainTrialSpecOrBuilder> + trainTrialSpecBuilder_; + /** + * + * + *
+       * Spec for train trials. Top N [TrainTrialSpec.max_parallel_trial_count]
+       * search trials will be trained for every M
+       * [TrainTrialSpec.frequency] trials searched.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec train_trial_spec = 4; + * + * + * @return Whether the trainTrialSpec field is set. + */ + public boolean hasTrainTrialSpec() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+       * Spec for train trials. Top N [TrainTrialSpec.max_parallel_trial_count]
+       * search trials will be trained for every M
+       * [TrainTrialSpec.frequency] trials searched.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec train_trial_spec = 4; + * + * + * @return The trainTrialSpec. + */ + public com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + getTrainTrialSpec() { + if (trainTrialSpecBuilder_ == null) { + return trainTrialSpec_ == null + ? com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + .getDefaultInstance() + : trainTrialSpec_; + } else { + return trainTrialSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Spec for train trials. Top N [TrainTrialSpec.max_parallel_trial_count]
+       * search trials will be trained for every M
+       * [TrainTrialSpec.frequency] trials searched.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec train_trial_spec = 4; + * + */ + public Builder setTrainTrialSpec( + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec value) { + if (trainTrialSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + trainTrialSpec_ = value; + } else { + trainTrialSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Spec for train trials. Top N [TrainTrialSpec.max_parallel_trial_count]
+       * search trials will be trained for every M
+       * [TrainTrialSpec.frequency] trials searched.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec train_trial_spec = 4; + * + */ + public Builder setTrainTrialSpec( + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec.Builder + builderForValue) { + if (trainTrialSpecBuilder_ == null) { + trainTrialSpec_ = builderForValue.build(); + } else { + trainTrialSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Spec for train trials. Top N [TrainTrialSpec.max_parallel_trial_count]
+       * search trials will be trained for every M
+       * [TrainTrialSpec.frequency] trials searched.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec train_trial_spec = 4; + * + */ + public Builder mergeTrainTrialSpec( + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec value) { + if (trainTrialSpecBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && trainTrialSpec_ != null + && trainTrialSpec_ + != com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec + .TrainTrialSpec.getDefaultInstance()) { + getTrainTrialSpecBuilder().mergeFrom(value); + } else { + trainTrialSpec_ = value; + } + } else { + trainTrialSpecBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Spec for train trials. Top N [TrainTrialSpec.max_parallel_trial_count]
+       * search trials will be trained for every M
+       * [TrainTrialSpec.frequency] trials searched.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec train_trial_spec = 4; + * + */ + public Builder clearTrainTrialSpec() { + bitField0_ = (bitField0_ & ~0x00000008); + trainTrialSpec_ = null; + if (trainTrialSpecBuilder_ != null) { + trainTrialSpecBuilder_.dispose(); + trainTrialSpecBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Spec for train trials. Top N [TrainTrialSpec.max_parallel_trial_count]
+       * search trials will be trained for every M
+       * [TrainTrialSpec.frequency] trials searched.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec train_trial_spec = 4; + * + */ + public com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + .Builder + getTrainTrialSpecBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getTrainTrialSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Spec for train trials. Top N [TrainTrialSpec.max_parallel_trial_count]
+       * search trials will be trained for every M
+       * [TrainTrialSpec.frequency] trials searched.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec train_trial_spec = 4; + * + */ + public com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec + .TrainTrialSpecOrBuilder + getTrainTrialSpecOrBuilder() { + if (trainTrialSpecBuilder_ != null) { + return trainTrialSpecBuilder_.getMessageOrBuilder(); + } else { + return trainTrialSpec_ == null + ? com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + .getDefaultInstance() + : trainTrialSpec_; + } + } + /** + * + * + *
+       * Spec for train trials. Top N [TrainTrialSpec.max_parallel_trial_count]
+       * search trials will be trained for every M
+       * [TrainTrialSpec.frequency] trials searched.
+       * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec train_trial_spec = 4; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec, + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + .Builder, + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec + .TrainTrialSpecOrBuilder> + getTrainTrialSpecFieldBuilder() { + if (trainTrialSpecBuilder_ == null) { + trainTrialSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec, + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + .Builder, + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec + .TrainTrialSpecOrBuilder>( + getTrainTrialSpec(), getParentForChildren(), isClean()); + trainTrialSpec_ = null; + } + return trainTrialSpecBuilder_; + } + + @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.NasJobSpec.MultiTrialAlgorithmSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec) + private static final com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec(); + } + + public static com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MultiTrialAlgorithmSpec 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.NasJobSpec.MultiTrialAlgorithmSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int nasAlgorithmSpecCase_ = 0; + private java.lang.Object nasAlgorithmSpec_; + + public enum NasAlgorithmSpecCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + MULTI_TRIAL_ALGORITHM_SPEC(2), + NASALGORITHMSPEC_NOT_SET(0); + private final int value; + + private NasAlgorithmSpecCase(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 NasAlgorithmSpecCase valueOf(int value) { + return forNumber(value); + } + + public static NasAlgorithmSpecCase forNumber(int value) { + switch (value) { + case 2: + return MULTI_TRIAL_ALGORITHM_SPEC; + case 0: + return NASALGORITHMSPEC_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public NasAlgorithmSpecCase getNasAlgorithmSpecCase() { + return NasAlgorithmSpecCase.forNumber(nasAlgorithmSpecCase_); + } + + public static final int MULTI_TRIAL_ALGORITHM_SPEC_FIELD_NUMBER = 2; + /** + * + * + *
+   * The spec of multi-trial algorithms.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec multi_trial_algorithm_spec = 2; + * + * + * @return Whether the multiTrialAlgorithmSpec field is set. + */ + @java.lang.Override + public boolean hasMultiTrialAlgorithmSpec() { + return nasAlgorithmSpecCase_ == 2; + } + /** + * + * + *
+   * The spec of multi-trial algorithms.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec multi_trial_algorithm_spec = 2; + * + * + * @return The multiTrialAlgorithmSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec + getMultiTrialAlgorithmSpec() { + if (nasAlgorithmSpecCase_ == 2) { + return (com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec) nasAlgorithmSpec_; + } + return com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.getDefaultInstance(); + } + /** + * + * + *
+   * The spec of multi-trial algorithms.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec multi_trial_algorithm_spec = 2; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpecOrBuilder + getMultiTrialAlgorithmSpecOrBuilder() { + if (nasAlgorithmSpecCase_ == 2) { + return (com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec) nasAlgorithmSpec_; + } + return com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.getDefaultInstance(); + } + + public static final int RESUME_NAS_JOB_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object resumeNasJobId_ = ""; + /** + * + * + *
+   * The ID of the existing NasJob in the same Project and Location
+   * which will be used to resume search. search_space_spec and
+   * nas_algorithm_spec are obtained from previous NasJob hence should not
+   * provide them again for this NasJob.
+   * 
+ * + * string resume_nas_job_id = 3; + * + * @return The resumeNasJobId. + */ + @java.lang.Override + public java.lang.String getResumeNasJobId() { + java.lang.Object ref = resumeNasJobId_; + 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(); + resumeNasJobId_ = s; + return s; + } + } + /** + * + * + *
+   * The ID of the existing NasJob in the same Project and Location
+   * which will be used to resume search. search_space_spec and
+   * nas_algorithm_spec are obtained from previous NasJob hence should not
+   * provide them again for this NasJob.
+   * 
+ * + * string resume_nas_job_id = 3; + * + * @return The bytes for resumeNasJobId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResumeNasJobIdBytes() { + java.lang.Object ref = resumeNasJobId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resumeNasJobId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SEARCH_SPACE_SPEC_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object searchSpaceSpec_ = ""; + /** + * + * + *
+   * It defines the search space for Neural Architecture Search (NAS).
+   * 
+ * + * string search_space_spec = 1; + * + * @return The searchSpaceSpec. + */ + @java.lang.Override + public java.lang.String getSearchSpaceSpec() { + java.lang.Object ref = searchSpaceSpec_; + 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(); + searchSpaceSpec_ = s; + return s; + } + } + /** + * + * + *
+   * It defines the search space for Neural Architecture Search (NAS).
+   * 
+ * + * string search_space_spec = 1; + * + * @return The bytes for searchSpaceSpec. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSearchSpaceSpecBytes() { + java.lang.Object ref = searchSpaceSpec_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + searchSpaceSpec_ = 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(searchSpaceSpec_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, searchSpaceSpec_); + } + if (nasAlgorithmSpecCase_ == 2) { + output.writeMessage( + 2, (com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec) nasAlgorithmSpec_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resumeNasJobId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, resumeNasJobId_); + } + 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(searchSpaceSpec_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, searchSpaceSpec_); + } + if (nasAlgorithmSpecCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, + (com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec) + nasAlgorithmSpec_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resumeNasJobId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, resumeNasJobId_); + } + 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.NasJobSpec)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.NasJobSpec other = + (com.google.cloud.aiplatform.v1.NasJobSpec) obj; + + if (!getResumeNasJobId().equals(other.getResumeNasJobId())) return false; + if (!getSearchSpaceSpec().equals(other.getSearchSpaceSpec())) return false; + if (!getNasAlgorithmSpecCase().equals(other.getNasAlgorithmSpecCase())) return false; + switch (nasAlgorithmSpecCase_) { + case 2: + if (!getMultiTrialAlgorithmSpec().equals(other.getMultiTrialAlgorithmSpec())) 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) + RESUME_NAS_JOB_ID_FIELD_NUMBER; + hash = (53 * hash) + getResumeNasJobId().hashCode(); + hash = (37 * hash) + SEARCH_SPACE_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getSearchSpaceSpec().hashCode(); + switch (nasAlgorithmSpecCase_) { + case 2: + hash = (37 * hash) + MULTI_TRIAL_ALGORITHM_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getMultiTrialAlgorithmSpec().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.NasJobSpec parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.NasJobSpec 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.NasJobSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.NasJobSpec 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.NasJobSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.NasJobSpec 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.NasJobSpec parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.NasJobSpec 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.NasJobSpec parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.NasJobSpec 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.NasJobSpec 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.NasJobSpec 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.NasJobSpec 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 NasJob.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.NasJobSpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.NasJobSpec) + com.google.cloud.aiplatform.v1.NasJobSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NasJobProto + .internal_static_google_cloud_aiplatform_v1_NasJobSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NasJobProto + .internal_static_google_cloud_aiplatform_v1_NasJobSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.NasJobSpec.class, + com.google.cloud.aiplatform.v1.NasJobSpec.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.NasJobSpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (multiTrialAlgorithmSpecBuilder_ != null) { + multiTrialAlgorithmSpecBuilder_.clear(); + } + resumeNasJobId_ = ""; + searchSpaceSpec_ = ""; + nasAlgorithmSpecCase_ = 0; + nasAlgorithmSpec_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.NasJobProto + .internal_static_google_cloud_aiplatform_v1_NasJobSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasJobSpec getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.NasJobSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasJobSpec build() { + com.google.cloud.aiplatform.v1.NasJobSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasJobSpec buildPartial() { + com.google.cloud.aiplatform.v1.NasJobSpec result = + new com.google.cloud.aiplatform.v1.NasJobSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.NasJobSpec result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.resumeNasJobId_ = resumeNasJobId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.searchSpaceSpec_ = searchSpaceSpec_; + } + } + + private void buildPartialOneofs(com.google.cloud.aiplatform.v1.NasJobSpec result) { + result.nasAlgorithmSpecCase_ = nasAlgorithmSpecCase_; + result.nasAlgorithmSpec_ = this.nasAlgorithmSpec_; + if (nasAlgorithmSpecCase_ == 2 && multiTrialAlgorithmSpecBuilder_ != null) { + result.nasAlgorithmSpec_ = multiTrialAlgorithmSpecBuilder_.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.NasJobSpec) { + return mergeFrom((com.google.cloud.aiplatform.v1.NasJobSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.NasJobSpec other) { + if (other == com.google.cloud.aiplatform.v1.NasJobSpec.getDefaultInstance()) return this; + if (!other.getResumeNasJobId().isEmpty()) { + resumeNasJobId_ = other.resumeNasJobId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getSearchSpaceSpec().isEmpty()) { + searchSpaceSpec_ = other.searchSpaceSpec_; + bitField0_ |= 0x00000004; + onChanged(); + } + switch (other.getNasAlgorithmSpecCase()) { + case MULTI_TRIAL_ALGORITHM_SPEC: + { + mergeMultiTrialAlgorithmSpec(other.getMultiTrialAlgorithmSpec()); + break; + } + case NASALGORITHMSPEC_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: + { + searchSpaceSpec_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 10 + case 18: + { + input.readMessage( + getMultiTrialAlgorithmSpecFieldBuilder().getBuilder(), extensionRegistry); + nasAlgorithmSpecCase_ = 2; + break; + } // case 18 + case 26: + { + resumeNasJobId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + 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 nasAlgorithmSpecCase_ = 0; + private java.lang.Object nasAlgorithmSpec_; + + public NasAlgorithmSpecCase getNasAlgorithmSpecCase() { + return NasAlgorithmSpecCase.forNumber(nasAlgorithmSpecCase_); + } + + public Builder clearNasAlgorithmSpec() { + nasAlgorithmSpecCase_ = 0; + nasAlgorithmSpec_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec, + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.Builder, + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpecOrBuilder> + multiTrialAlgorithmSpecBuilder_; + /** + * + * + *
+     * The spec of multi-trial algorithms.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec multi_trial_algorithm_spec = 2; + * + * + * @return Whether the multiTrialAlgorithmSpec field is set. + */ + @java.lang.Override + public boolean hasMultiTrialAlgorithmSpec() { + return nasAlgorithmSpecCase_ == 2; + } + /** + * + * + *
+     * The spec of multi-trial algorithms.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec multi_trial_algorithm_spec = 2; + * + * + * @return The multiTrialAlgorithmSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec + getMultiTrialAlgorithmSpec() { + if (multiTrialAlgorithmSpecBuilder_ == null) { + if (nasAlgorithmSpecCase_ == 2) { + return (com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec) + nasAlgorithmSpec_; + } + return com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec + .getDefaultInstance(); + } else { + if (nasAlgorithmSpecCase_ == 2) { + return multiTrialAlgorithmSpecBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec + .getDefaultInstance(); + } + } + /** + * + * + *
+     * The spec of multi-trial algorithms.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec multi_trial_algorithm_spec = 2; + * + */ + public Builder setMultiTrialAlgorithmSpec( + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec value) { + if (multiTrialAlgorithmSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + nasAlgorithmSpec_ = value; + onChanged(); + } else { + multiTrialAlgorithmSpecBuilder_.setMessage(value); + } + nasAlgorithmSpecCase_ = 2; + return this; + } + /** + * + * + *
+     * The spec of multi-trial algorithms.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec multi_trial_algorithm_spec = 2; + * + */ + public Builder setMultiTrialAlgorithmSpec( + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.Builder builderForValue) { + if (multiTrialAlgorithmSpecBuilder_ == null) { + nasAlgorithmSpec_ = builderForValue.build(); + onChanged(); + } else { + multiTrialAlgorithmSpecBuilder_.setMessage(builderForValue.build()); + } + nasAlgorithmSpecCase_ = 2; + return this; + } + /** + * + * + *
+     * The spec of multi-trial algorithms.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec multi_trial_algorithm_spec = 2; + * + */ + public Builder mergeMultiTrialAlgorithmSpec( + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec value) { + if (multiTrialAlgorithmSpecBuilder_ == null) { + if (nasAlgorithmSpecCase_ == 2 + && nasAlgorithmSpec_ + != com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec + .getDefaultInstance()) { + nasAlgorithmSpec_ = + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.newBuilder( + (com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec) + nasAlgorithmSpec_) + .mergeFrom(value) + .buildPartial(); + } else { + nasAlgorithmSpec_ = value; + } + onChanged(); + } else { + if (nasAlgorithmSpecCase_ == 2) { + multiTrialAlgorithmSpecBuilder_.mergeFrom(value); + } else { + multiTrialAlgorithmSpecBuilder_.setMessage(value); + } + } + nasAlgorithmSpecCase_ = 2; + return this; + } + /** + * + * + *
+     * The spec of multi-trial algorithms.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec multi_trial_algorithm_spec = 2; + * + */ + public Builder clearMultiTrialAlgorithmSpec() { + if (multiTrialAlgorithmSpecBuilder_ == null) { + if (nasAlgorithmSpecCase_ == 2) { + nasAlgorithmSpecCase_ = 0; + nasAlgorithmSpec_ = null; + onChanged(); + } + } else { + if (nasAlgorithmSpecCase_ == 2) { + nasAlgorithmSpecCase_ = 0; + nasAlgorithmSpec_ = null; + } + multiTrialAlgorithmSpecBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The spec of multi-trial algorithms.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec multi_trial_algorithm_spec = 2; + * + */ + public com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.Builder + getMultiTrialAlgorithmSpecBuilder() { + return getMultiTrialAlgorithmSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The spec of multi-trial algorithms.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec multi_trial_algorithm_spec = 2; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpecOrBuilder + getMultiTrialAlgorithmSpecOrBuilder() { + if ((nasAlgorithmSpecCase_ == 2) && (multiTrialAlgorithmSpecBuilder_ != null)) { + return multiTrialAlgorithmSpecBuilder_.getMessageOrBuilder(); + } else { + if (nasAlgorithmSpecCase_ == 2) { + return (com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec) + nasAlgorithmSpec_; + } + return com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec + .getDefaultInstance(); + } + } + /** + * + * + *
+     * The spec of multi-trial algorithms.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec multi_trial_algorithm_spec = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec, + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.Builder, + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpecOrBuilder> + getMultiTrialAlgorithmSpecFieldBuilder() { + if (multiTrialAlgorithmSpecBuilder_ == null) { + if (!(nasAlgorithmSpecCase_ == 2)) { + nasAlgorithmSpec_ = + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec + .getDefaultInstance(); + } + multiTrialAlgorithmSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec, + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec.Builder, + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpecOrBuilder>( + (com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec) + nasAlgorithmSpec_, + getParentForChildren(), + isClean()); + nasAlgorithmSpec_ = null; + } + nasAlgorithmSpecCase_ = 2; + onChanged(); + return multiTrialAlgorithmSpecBuilder_; + } + + private java.lang.Object resumeNasJobId_ = ""; + /** + * + * + *
+     * The ID of the existing NasJob in the same Project and Location
+     * which will be used to resume search. search_space_spec and
+     * nas_algorithm_spec are obtained from previous NasJob hence should not
+     * provide them again for this NasJob.
+     * 
+ * + * string resume_nas_job_id = 3; + * + * @return The resumeNasJobId. + */ + public java.lang.String getResumeNasJobId() { + java.lang.Object ref = resumeNasJobId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resumeNasJobId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The ID of the existing NasJob in the same Project and Location
+     * which will be used to resume search. search_space_spec and
+     * nas_algorithm_spec are obtained from previous NasJob hence should not
+     * provide them again for this NasJob.
+     * 
+ * + * string resume_nas_job_id = 3; + * + * @return The bytes for resumeNasJobId. + */ + public com.google.protobuf.ByteString getResumeNasJobIdBytes() { + java.lang.Object ref = resumeNasJobId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resumeNasJobId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The ID of the existing NasJob in the same Project and Location
+     * which will be used to resume search. search_space_spec and
+     * nas_algorithm_spec are obtained from previous NasJob hence should not
+     * provide them again for this NasJob.
+     * 
+ * + * string resume_nas_job_id = 3; + * + * @param value The resumeNasJobId to set. + * @return This builder for chaining. + */ + public Builder setResumeNasJobId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + resumeNasJobId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The ID of the existing NasJob in the same Project and Location
+     * which will be used to resume search. search_space_spec and
+     * nas_algorithm_spec are obtained from previous NasJob hence should not
+     * provide them again for this NasJob.
+     * 
+ * + * string resume_nas_job_id = 3; + * + * @return This builder for chaining. + */ + public Builder clearResumeNasJobId() { + resumeNasJobId_ = getDefaultInstance().getResumeNasJobId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The ID of the existing NasJob in the same Project and Location
+     * which will be used to resume search. search_space_spec and
+     * nas_algorithm_spec are obtained from previous NasJob hence should not
+     * provide them again for this NasJob.
+     * 
+ * + * string resume_nas_job_id = 3; + * + * @param value The bytes for resumeNasJobId to set. + * @return This builder for chaining. + */ + public Builder setResumeNasJobIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + resumeNasJobId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object searchSpaceSpec_ = ""; + /** + * + * + *
+     * It defines the search space for Neural Architecture Search (NAS).
+     * 
+ * + * string search_space_spec = 1; + * + * @return The searchSpaceSpec. + */ + public java.lang.String getSearchSpaceSpec() { + java.lang.Object ref = searchSpaceSpec_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + searchSpaceSpec_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * It defines the search space for Neural Architecture Search (NAS).
+     * 
+ * + * string search_space_spec = 1; + * + * @return The bytes for searchSpaceSpec. + */ + public com.google.protobuf.ByteString getSearchSpaceSpecBytes() { + java.lang.Object ref = searchSpaceSpec_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + searchSpaceSpec_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * It defines the search space for Neural Architecture Search (NAS).
+     * 
+ * + * string search_space_spec = 1; + * + * @param value The searchSpaceSpec to set. + * @return This builder for chaining. + */ + public Builder setSearchSpaceSpec(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + searchSpaceSpec_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * It defines the search space for Neural Architecture Search (NAS).
+     * 
+ * + * string search_space_spec = 1; + * + * @return This builder for chaining. + */ + public Builder clearSearchSpaceSpec() { + searchSpaceSpec_ = getDefaultInstance().getSearchSpaceSpec(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * It defines the search space for Neural Architecture Search (NAS).
+     * 
+ * + * string search_space_spec = 1; + * + * @param value The bytes for searchSpaceSpec to set. + * @return This builder for chaining. + */ + public Builder setSearchSpaceSpecBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + searchSpaceSpec_ = 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.NasJobSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.NasJobSpec) + private static final com.google.cloud.aiplatform.v1.NasJobSpec DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.NasJobSpec(); + } + + public static com.google.cloud.aiplatform.v1.NasJobSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NasJobSpec 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.NasJobSpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NasJobSpecOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NasJobSpecOrBuilder.java new file mode 100644 index 000000000000..64bd0cfc6906 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NasJobSpecOrBuilder.java @@ -0,0 +1,125 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/nas_job.proto + +package com.google.cloud.aiplatform.v1; + +public interface NasJobSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.NasJobSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The spec of multi-trial algorithms.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec multi_trial_algorithm_spec = 2; + * + * + * @return Whether the multiTrialAlgorithmSpec field is set. + */ + boolean hasMultiTrialAlgorithmSpec(); + /** + * + * + *
+   * The spec of multi-trial algorithms.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec multi_trial_algorithm_spec = 2; + * + * + * @return The multiTrialAlgorithmSpec. + */ + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec getMultiTrialAlgorithmSpec(); + /** + * + * + *
+   * The spec of multi-trial algorithms.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpec multi_trial_algorithm_spec = 2; + * + */ + com.google.cloud.aiplatform.v1.NasJobSpec.MultiTrialAlgorithmSpecOrBuilder + getMultiTrialAlgorithmSpecOrBuilder(); + + /** + * + * + *
+   * The ID of the existing NasJob in the same Project and Location
+   * which will be used to resume search. search_space_spec and
+   * nas_algorithm_spec are obtained from previous NasJob hence should not
+   * provide them again for this NasJob.
+   * 
+ * + * string resume_nas_job_id = 3; + * + * @return The resumeNasJobId. + */ + java.lang.String getResumeNasJobId(); + /** + * + * + *
+   * The ID of the existing NasJob in the same Project and Location
+   * which will be used to resume search. search_space_spec and
+   * nas_algorithm_spec are obtained from previous NasJob hence should not
+   * provide them again for this NasJob.
+   * 
+ * + * string resume_nas_job_id = 3; + * + * @return The bytes for resumeNasJobId. + */ + com.google.protobuf.ByteString getResumeNasJobIdBytes(); + + /** + * + * + *
+   * It defines the search space for Neural Architecture Search (NAS).
+   * 
+ * + * string search_space_spec = 1; + * + * @return The searchSpaceSpec. + */ + java.lang.String getSearchSpaceSpec(); + /** + * + * + *
+   * It defines the search space for Neural Architecture Search (NAS).
+   * 
+ * + * string search_space_spec = 1; + * + * @return The bytes for searchSpaceSpec. + */ + com.google.protobuf.ByteString getSearchSpaceSpecBytes(); + + public com.google.cloud.aiplatform.v1.NasJobSpec.NasAlgorithmSpecCase getNasAlgorithmSpecCase(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NasTrial.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NasTrial.java new file mode 100644 index 000000000000..2980de9825bc --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NasTrial.java @@ -0,0 +1,1858 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/nas_job.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Represents a uCAIP NasJob trial.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.NasTrial} + */ +public final class NasTrial extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.NasTrial) + NasTrialOrBuilder { + private static final long serialVersionUID = 0L; + // Use NasTrial.newBuilder() to construct. + private NasTrial(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NasTrial() { + id_ = ""; + state_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NasTrial(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NasJobProto + .internal_static_google_cloud_aiplatform_v1_NasTrial_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NasJobProto + .internal_static_google_cloud_aiplatform_v1_NasTrial_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.NasTrial.class, + com.google.cloud.aiplatform.v1.NasTrial.Builder.class); + } + + /** + * + * + *
+   * Describes a NasTrial state.
+   * 
+ * + * Protobuf enum {@code google.cloud.aiplatform.v1.NasTrial.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The NasTrial state is unspecified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * Indicates that a specific NasTrial has been requested, but it has not yet
+     * been suggested by the service.
+     * 
+ * + * REQUESTED = 1; + */ + REQUESTED(1), + /** + * + * + *
+     * Indicates that the NasTrial has been suggested.
+     * 
+ * + * ACTIVE = 2; + */ + ACTIVE(2), + /** + * + * + *
+     * Indicates that the NasTrial should stop according to the service.
+     * 
+ * + * STOPPING = 3; + */ + STOPPING(3), + /** + * + * + *
+     * Indicates that the NasTrial is completed successfully.
+     * 
+ * + * SUCCEEDED = 4; + */ + SUCCEEDED(4), + /** + * + * + *
+     * Indicates that the NasTrial should not be attempted again.
+     * The service will set a NasTrial to INFEASIBLE when it's done but missing
+     * the final_measurement.
+     * 
+ * + * INFEASIBLE = 5; + */ + INFEASIBLE(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The NasTrial state is unspecified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Indicates that a specific NasTrial has been requested, but it has not yet
+     * been suggested by the service.
+     * 
+ * + * REQUESTED = 1; + */ + public static final int REQUESTED_VALUE = 1; + /** + * + * + *
+     * Indicates that the NasTrial has been suggested.
+     * 
+ * + * ACTIVE = 2; + */ + public static final int ACTIVE_VALUE = 2; + /** + * + * + *
+     * Indicates that the NasTrial should stop according to the service.
+     * 
+ * + * STOPPING = 3; + */ + public static final int STOPPING_VALUE = 3; + /** + * + * + *
+     * Indicates that the NasTrial is completed successfully.
+     * 
+ * + * SUCCEEDED = 4; + */ + public static final int SUCCEEDED_VALUE = 4; + /** + * + * + *
+     * Indicates that the NasTrial should not be attempted again.
+     * The service will set a NasTrial to INFEASIBLE when it's done but missing
+     * the final_measurement.
+     * 
+ * + * INFEASIBLE = 5; + */ + public static final int INFEASIBLE_VALUE = 5; + + 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 REQUESTED; + case 2: + return ACTIVE; + case 3: + return STOPPING; + case 4: + return SUCCEEDED; + case 5: + return INFEASIBLE; + 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.NasTrial.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.NasTrial.State) + } + + public static final int ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * + * + *
+   * Output only. The identifier of the NasTrial assigned by the service.
+   * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + /** + * + * + *
+   * Output only. The identifier of the NasTrial assigned by the service.
+   * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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 STATE_FIELD_NUMBER = 2; + private int state_ = 0; + /** + * + * + *
+   * Output only. The detailed state of the NasTrial.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NasTrial.State state = 2 [(.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 NasTrial.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NasTrial.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasTrial.State getState() { + com.google.cloud.aiplatform.v1.NasTrial.State result = + com.google.cloud.aiplatform.v1.NasTrial.State.forNumber(state_); + return result == null ? com.google.cloud.aiplatform.v1.NasTrial.State.UNRECOGNIZED : result; + } + + public static final int FINAL_MEASUREMENT_FIELD_NUMBER = 3; + private com.google.cloud.aiplatform.v1.Measurement finalMeasurement_; + /** + * + * + *
+   * Output only. The final measurement containing the objective value.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Measurement final_measurement = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the finalMeasurement field is set. + */ + @java.lang.Override + public boolean hasFinalMeasurement() { + return finalMeasurement_ != null; + } + /** + * + * + *
+   * Output only. The final measurement containing the objective value.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Measurement final_measurement = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The finalMeasurement. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.Measurement getFinalMeasurement() { + return finalMeasurement_ == null + ? com.google.cloud.aiplatform.v1.Measurement.getDefaultInstance() + : finalMeasurement_; + } + /** + * + * + *
+   * Output only. The final measurement containing the objective value.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Measurement final_measurement = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.MeasurementOrBuilder getFinalMeasurementOrBuilder() { + return finalMeasurement_ == null + ? com.google.cloud.aiplatform.v1.Measurement.getDefaultInstance() + : finalMeasurement_; + } + + public static final int START_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp startTime_; + /** + * + * + *
+   * Output only. Time when the NasTrial was started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return startTime_ != null; + } + /** + * + * + *
+   * Output only. Time when the NasTrial was started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 4 [(.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 NasTrial was started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 4 [(.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 = 5; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+   * Output only. Time when the NasTrial's status changed to `SUCCEEDED` or
+   * `INFEASIBLE`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + * + * + *
+   * Output only. Time when the NasTrial's status changed to `SUCCEEDED` or
+   * `INFEASIBLE`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.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 NasTrial's status changed to `SUCCEEDED` or
+   * `INFEASIBLE`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + 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 (state_ != com.google.cloud.aiplatform.v1.NasTrial.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(2, state_); + } + if (finalMeasurement_ != null) { + output.writeMessage(3, getFinalMeasurement()); + } + if (startTime_ != null) { + output.writeMessage(4, getStartTime()); + } + if (endTime_ != null) { + output.writeMessage(5, getEndTime()); + } + 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 (state_ != com.google.cloud.aiplatform.v1.NasTrial.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, state_); + } + if (finalMeasurement_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getFinalMeasurement()); + } + if (startTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getStartTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getEndTime()); + } + 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.NasTrial)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.NasTrial other = (com.google.cloud.aiplatform.v1.NasTrial) obj; + + if (!getId().equals(other.getId())) return false; + if (state_ != other.state_) return false; + if (hasFinalMeasurement() != other.hasFinalMeasurement()) return false; + if (hasFinalMeasurement()) { + if (!getFinalMeasurement().equals(other.getFinalMeasurement())) 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 (!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) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (hasFinalMeasurement()) { + hash = (37 * hash) + FINAL_MEASUREMENT_FIELD_NUMBER; + hash = (53 * hash) + getFinalMeasurement().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(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.NasTrial parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.NasTrial 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.NasTrial parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.NasTrial 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.NasTrial parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.NasTrial 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.NasTrial parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.NasTrial 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.NasTrial parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.NasTrial 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.NasTrial 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.NasTrial 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.NasTrial 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 uCAIP NasJob trial.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.NasTrial} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.NasTrial) + com.google.cloud.aiplatform.v1.NasTrialOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NasJobProto + .internal_static_google_cloud_aiplatform_v1_NasTrial_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NasJobProto + .internal_static_google_cloud_aiplatform_v1_NasTrial_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.NasTrial.class, + com.google.cloud.aiplatform.v1.NasTrial.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.NasTrial.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + state_ = 0; + finalMeasurement_ = null; + if (finalMeasurementBuilder_ != null) { + finalMeasurementBuilder_.dispose(); + finalMeasurementBuilder_ = null; + } + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.NasJobProto + .internal_static_google_cloud_aiplatform_v1_NasTrial_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasTrial getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.NasTrial.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasTrial build() { + com.google.cloud.aiplatform.v1.NasTrial result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasTrial buildPartial() { + com.google.cloud.aiplatform.v1.NasTrial result = + new com.google.cloud.aiplatform.v1.NasTrial(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.NasTrial result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.finalMeasurement_ = + finalMeasurementBuilder_ == null ? finalMeasurement_ : finalMeasurementBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.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.NasTrial) { + return mergeFrom((com.google.cloud.aiplatform.v1.NasTrial) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.NasTrial other) { + if (other == com.google.cloud.aiplatform.v1.NasTrial.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.hasFinalMeasurement()) { + mergeFinalMeasurement(other.getFinalMeasurement()); + } + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + 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 16: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + input.readMessage( + getFinalMeasurementFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage(getEndTimeFieldBuilder().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 id_ = ""; + /** + * + * + *
+     * Output only. The identifier of the NasTrial assigned by the service.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + /** + * + * + *
+     * Output only. The identifier of the NasTrial assigned by the service.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + /** + * + * + *
+     * Output only. The identifier of the NasTrial assigned by the service.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + /** + * + * + *
+     * Output only. The identifier of the NasTrial assigned by the service.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The identifier of the NasTrial assigned by the service.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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 int state_ = 0; + /** + * + * + *
+     * Output only. The detailed state of the NasTrial.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasTrial.State state = 2 [(.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 NasTrial.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasTrial.State state = 2 [(.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_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The detailed state of the NasTrial.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasTrial.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasTrial.State getState() { + com.google.cloud.aiplatform.v1.NasTrial.State result = + com.google.cloud.aiplatform.v1.NasTrial.State.forNumber(state_); + return result == null ? com.google.cloud.aiplatform.v1.NasTrial.State.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Output only. The detailed state of the NasTrial.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasTrial.State state = 2 [(.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.NasTrial.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The detailed state of the NasTrial.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.NasTrial.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000002); + state_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1.Measurement finalMeasurement_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.Measurement, + com.google.cloud.aiplatform.v1.Measurement.Builder, + com.google.cloud.aiplatform.v1.MeasurementOrBuilder> + finalMeasurementBuilder_; + /** + * + * + *
+     * Output only. The final measurement containing the objective value.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Measurement final_measurement = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the finalMeasurement field is set. + */ + public boolean hasFinalMeasurement() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Output only. The final measurement containing the objective value.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Measurement final_measurement = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The finalMeasurement. + */ + public com.google.cloud.aiplatform.v1.Measurement getFinalMeasurement() { + if (finalMeasurementBuilder_ == null) { + return finalMeasurement_ == null + ? com.google.cloud.aiplatform.v1.Measurement.getDefaultInstance() + : finalMeasurement_; + } else { + return finalMeasurementBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The final measurement containing the objective value.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Measurement final_measurement = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setFinalMeasurement(com.google.cloud.aiplatform.v1.Measurement value) { + if (finalMeasurementBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + finalMeasurement_ = value; + } else { + finalMeasurementBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The final measurement containing the objective value.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Measurement final_measurement = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setFinalMeasurement( + com.google.cloud.aiplatform.v1.Measurement.Builder builderForValue) { + if (finalMeasurementBuilder_ == null) { + finalMeasurement_ = builderForValue.build(); + } else { + finalMeasurementBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The final measurement containing the objective value.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Measurement final_measurement = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeFinalMeasurement(com.google.cloud.aiplatform.v1.Measurement value) { + if (finalMeasurementBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && finalMeasurement_ != null + && finalMeasurement_ + != com.google.cloud.aiplatform.v1.Measurement.getDefaultInstance()) { + getFinalMeasurementBuilder().mergeFrom(value); + } else { + finalMeasurement_ = value; + } + } else { + finalMeasurementBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The final measurement containing the objective value.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Measurement final_measurement = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearFinalMeasurement() { + bitField0_ = (bitField0_ & ~0x00000004); + finalMeasurement_ = null; + if (finalMeasurementBuilder_ != null) { + finalMeasurementBuilder_.dispose(); + finalMeasurementBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The final measurement containing the objective value.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Measurement final_measurement = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.Measurement.Builder getFinalMeasurementBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getFinalMeasurementFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The final measurement containing the objective value.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Measurement final_measurement = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1.MeasurementOrBuilder getFinalMeasurementOrBuilder() { + if (finalMeasurementBuilder_ != null) { + return finalMeasurementBuilder_.getMessageOrBuilder(); + } else { + return finalMeasurement_ == null + ? com.google.cloud.aiplatform.v1.Measurement.getDefaultInstance() + : finalMeasurement_; + } + } + /** + * + * + *
+     * Output only. The final measurement containing the objective value.
+     * 
+ * + * + * .google.cloud.aiplatform.v1.Measurement final_measurement = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.Measurement, + com.google.cloud.aiplatform.v1.Measurement.Builder, + com.google.cloud.aiplatform.v1.MeasurementOrBuilder> + getFinalMeasurementFieldBuilder() { + if (finalMeasurementBuilder_ == null) { + finalMeasurementBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.Measurement, + com.google.cloud.aiplatform.v1.Measurement.Builder, + com.google.cloud.aiplatform.v1.MeasurementOrBuilder>( + getFinalMeasurement(), getParentForChildren(), isClean()); + finalMeasurement_ = null; + } + return finalMeasurementBuilder_; + } + + 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 NasTrial was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Output only. Time when the NasTrial was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4 [(.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 NasTrial was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4 [(.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_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the NasTrial was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4 [(.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_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the NasTrial was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && startTime_ != null + && startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getStartTimeBuilder().mergeFrom(value); + } else { + startTime_ = value; + } + } else { + startTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the NasTrial was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearStartTime() { + bitField0_ = (bitField0_ & ~0x00000008); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the NasTrial was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when the NasTrial was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4 [(.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 NasTrial was started.
+     * 
+ * + * .google.protobuf.Timestamp start_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> + 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 NasTrial's status changed to `SUCCEEDED` or
+     * `INFEASIBLE`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Output only. Time when the NasTrial's status changed to `SUCCEEDED` or
+     * `INFEASIBLE`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.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 NasTrial's status changed to `SUCCEEDED` or
+     * `INFEASIBLE`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.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_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the NasTrial's status changed to `SUCCEEDED` or
+     * `INFEASIBLE`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.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_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the NasTrial's status changed to `SUCCEEDED` or
+     * `INFEASIBLE`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && endTime_ != null + && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the NasTrial's status changed to `SUCCEEDED` or
+     * `INFEASIBLE`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000010); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the NasTrial's status changed to `SUCCEEDED` or
+     * `INFEASIBLE`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when the NasTrial's status changed to `SUCCEEDED` or
+     * `INFEASIBLE`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.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 NasTrial's status changed to `SUCCEEDED` or
+     * `INFEASIBLE`.
+     * 
+ * + * .google.protobuf.Timestamp end_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> + 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_; + } + + @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.NasTrial) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.NasTrial) + private static final com.google.cloud.aiplatform.v1.NasTrial DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.NasTrial(); + } + + public static com.google.cloud.aiplatform.v1.NasTrial getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NasTrial 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.NasTrial getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NasTrialDetail.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NasTrialDetail.java new file mode 100644 index 000000000000..3ba364a1f075 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NasTrialDetail.java @@ -0,0 +1,1389 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/nas_job.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Represents a NasTrial details along with it's parameters. If there is a
+ * corresponding train NasTrial, the train NasTrial is also returned.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.NasTrialDetail} + */ +public final class NasTrialDetail extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.NasTrialDetail) + NasTrialDetailOrBuilder { + private static final long serialVersionUID = 0L; + // Use NasTrialDetail.newBuilder() to construct. + private NasTrialDetail(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NasTrialDetail() { + name_ = ""; + parameters_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NasTrialDetail(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NasJobProto + .internal_static_google_cloud_aiplatform_v1_NasTrialDetail_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NasJobProto + .internal_static_google_cloud_aiplatform_v1_NasTrialDetail_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.NasTrialDetail.class, + com.google.cloud.aiplatform.v1.NasTrialDetail.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Output only. Resource name of the NasTrialDetail.
+   * 
+ * + * 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. Resource name of the NasTrialDetail.
+   * 
+ * + * 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 PARAMETERS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object parameters_ = ""; + /** + * + * + *
+   * The parameters for the NasJob NasTrial.
+   * 
+ * + * string parameters = 2; + * + * @return The parameters. + */ + @java.lang.Override + public java.lang.String getParameters() { + java.lang.Object ref = parameters_; + 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(); + parameters_ = s; + return s; + } + } + /** + * + * + *
+   * The parameters for the NasJob NasTrial.
+   * 
+ * + * string parameters = 2; + * + * @return The bytes for parameters. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParametersBytes() { + java.lang.Object ref = parameters_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parameters_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SEARCH_TRIAL_FIELD_NUMBER = 3; + private com.google.cloud.aiplatform.v1.NasTrial searchTrial_; + /** + * + * + *
+   * The requested search NasTrial.
+   * 
+ * + * .google.cloud.aiplatform.v1.NasTrial search_trial = 3; + * + * @return Whether the searchTrial field is set. + */ + @java.lang.Override + public boolean hasSearchTrial() { + return searchTrial_ != null; + } + /** + * + * + *
+   * The requested search NasTrial.
+   * 
+ * + * .google.cloud.aiplatform.v1.NasTrial search_trial = 3; + * + * @return The searchTrial. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasTrial getSearchTrial() { + return searchTrial_ == null + ? com.google.cloud.aiplatform.v1.NasTrial.getDefaultInstance() + : searchTrial_; + } + /** + * + * + *
+   * The requested search NasTrial.
+   * 
+ * + * .google.cloud.aiplatform.v1.NasTrial search_trial = 3; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasTrialOrBuilder getSearchTrialOrBuilder() { + return searchTrial_ == null + ? com.google.cloud.aiplatform.v1.NasTrial.getDefaultInstance() + : searchTrial_; + } + + public static final int TRAIN_TRIAL_FIELD_NUMBER = 4; + private com.google.cloud.aiplatform.v1.NasTrial trainTrial_; + /** + * + * + *
+   * The train NasTrial corresponding to
+   * [search_trial][google.cloud.aiplatform.v1.NasTrialDetail.search_trial].
+   * Only populated if
+   * [search_trial][google.cloud.aiplatform.v1.NasTrialDetail.search_trial] is
+   * used for training.
+   * 
+ * + * .google.cloud.aiplatform.v1.NasTrial train_trial = 4; + * + * @return Whether the trainTrial field is set. + */ + @java.lang.Override + public boolean hasTrainTrial() { + return trainTrial_ != null; + } + /** + * + * + *
+   * The train NasTrial corresponding to
+   * [search_trial][google.cloud.aiplatform.v1.NasTrialDetail.search_trial].
+   * Only populated if
+   * [search_trial][google.cloud.aiplatform.v1.NasTrialDetail.search_trial] is
+   * used for training.
+   * 
+ * + * .google.cloud.aiplatform.v1.NasTrial train_trial = 4; + * + * @return The trainTrial. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasTrial getTrainTrial() { + return trainTrial_ == null + ? com.google.cloud.aiplatform.v1.NasTrial.getDefaultInstance() + : trainTrial_; + } + /** + * + * + *
+   * The train NasTrial corresponding to
+   * [search_trial][google.cloud.aiplatform.v1.NasTrialDetail.search_trial].
+   * Only populated if
+   * [search_trial][google.cloud.aiplatform.v1.NasTrialDetail.search_trial] is
+   * used for training.
+   * 
+ * + * .google.cloud.aiplatform.v1.NasTrial train_trial = 4; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasTrialOrBuilder getTrainTrialOrBuilder() { + return trainTrial_ == null + ? com.google.cloud.aiplatform.v1.NasTrial.getDefaultInstance() + : trainTrial_; + } + + 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(parameters_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, parameters_); + } + if (searchTrial_ != null) { + output.writeMessage(3, getSearchTrial()); + } + if (trainTrial_ != null) { + output.writeMessage(4, getTrainTrial()); + } + 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(parameters_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, parameters_); + } + if (searchTrial_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getSearchTrial()); + } + if (trainTrial_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getTrainTrial()); + } + 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.NasTrialDetail)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.NasTrialDetail other = + (com.google.cloud.aiplatform.v1.NasTrialDetail) obj; + + if (!getName().equals(other.getName())) return false; + if (!getParameters().equals(other.getParameters())) return false; + if (hasSearchTrial() != other.hasSearchTrial()) return false; + if (hasSearchTrial()) { + if (!getSearchTrial().equals(other.getSearchTrial())) return false; + } + if (hasTrainTrial() != other.hasTrainTrial()) return false; + if (hasTrainTrial()) { + if (!getTrainTrial().equals(other.getTrainTrial())) 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) + PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getParameters().hashCode(); + if (hasSearchTrial()) { + hash = (37 * hash) + SEARCH_TRIAL_FIELD_NUMBER; + hash = (53 * hash) + getSearchTrial().hashCode(); + } + if (hasTrainTrial()) { + hash = (37 * hash) + TRAIN_TRIAL_FIELD_NUMBER; + hash = (53 * hash) + getTrainTrial().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.NasTrialDetail parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.NasTrialDetail 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.NasTrialDetail parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.NasTrialDetail 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.NasTrialDetail parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.NasTrialDetail 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.NasTrialDetail parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.NasTrialDetail 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.NasTrialDetail parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.NasTrialDetail 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.NasTrialDetail 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.NasTrialDetail 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.NasTrialDetail 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 NasTrial details along with it's parameters. If there is a
+   * corresponding train NasTrial, the train NasTrial is also returned.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.NasTrialDetail} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.NasTrialDetail) + com.google.cloud.aiplatform.v1.NasTrialDetailOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.NasJobProto + .internal_static_google_cloud_aiplatform_v1_NasTrialDetail_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.NasJobProto + .internal_static_google_cloud_aiplatform_v1_NasTrialDetail_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.NasTrialDetail.class, + com.google.cloud.aiplatform.v1.NasTrialDetail.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.NasTrialDetail.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + parameters_ = ""; + searchTrial_ = null; + if (searchTrialBuilder_ != null) { + searchTrialBuilder_.dispose(); + searchTrialBuilder_ = null; + } + trainTrial_ = null; + if (trainTrialBuilder_ != null) { + trainTrialBuilder_.dispose(); + trainTrialBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.NasJobProto + .internal_static_google_cloud_aiplatform_v1_NasTrialDetail_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasTrialDetail getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.NasTrialDetail.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasTrialDetail build() { + com.google.cloud.aiplatform.v1.NasTrialDetail result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.NasTrialDetail buildPartial() { + com.google.cloud.aiplatform.v1.NasTrialDetail result = + new com.google.cloud.aiplatform.v1.NasTrialDetail(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.NasTrialDetail result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.parameters_ = parameters_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.searchTrial_ = + searchTrialBuilder_ == null ? searchTrial_ : searchTrialBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.trainTrial_ = trainTrialBuilder_ == null ? trainTrial_ : trainTrialBuilder_.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.NasTrialDetail) { + return mergeFrom((com.google.cloud.aiplatform.v1.NasTrialDetail) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.NasTrialDetail other) { + if (other == com.google.cloud.aiplatform.v1.NasTrialDetail.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getParameters().isEmpty()) { + parameters_ = other.parameters_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasSearchTrial()) { + mergeSearchTrial(other.getSearchTrial()); + } + if (other.hasTrainTrial()) { + mergeTrainTrial(other.getTrainTrial()); + } + 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: + { + parameters_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getSearchTrialFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(getTrainTrialFieldBuilder().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 name_ = ""; + /** + * + * + *
+     * Output only. Resource name of the NasTrialDetail.
+     * 
+ * + * 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. Resource name of the NasTrialDetail.
+     * 
+ * + * 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. Resource name of the NasTrialDetail.
+     * 
+ * + * 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. Resource name of the NasTrialDetail.
+     * 
+ * + * 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. Resource name of the NasTrialDetail.
+     * 
+ * + * 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 parameters_ = ""; + /** + * + * + *
+     * The parameters for the NasJob NasTrial.
+     * 
+ * + * string parameters = 2; + * + * @return The parameters. + */ + public java.lang.String getParameters() { + java.lang.Object ref = parameters_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parameters_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The parameters for the NasJob NasTrial.
+     * 
+ * + * string parameters = 2; + * + * @return The bytes for parameters. + */ + public com.google.protobuf.ByteString getParametersBytes() { + java.lang.Object ref = parameters_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parameters_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The parameters for the NasJob NasTrial.
+     * 
+ * + * string parameters = 2; + * + * @param value The parameters to set. + * @return This builder for chaining. + */ + public Builder setParameters(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parameters_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The parameters for the NasJob NasTrial.
+     * 
+ * + * string parameters = 2; + * + * @return This builder for chaining. + */ + public Builder clearParameters() { + parameters_ = getDefaultInstance().getParameters(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The parameters for the NasJob NasTrial.
+     * 
+ * + * string parameters = 2; + * + * @param value The bytes for parameters to set. + * @return This builder for chaining. + */ + public Builder setParametersBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parameters_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1.NasTrial searchTrial_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.NasTrial, + com.google.cloud.aiplatform.v1.NasTrial.Builder, + com.google.cloud.aiplatform.v1.NasTrialOrBuilder> + searchTrialBuilder_; + /** + * + * + *
+     * The requested search NasTrial.
+     * 
+ * + * .google.cloud.aiplatform.v1.NasTrial search_trial = 3; + * + * @return Whether the searchTrial field is set. + */ + public boolean hasSearchTrial() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * The requested search NasTrial.
+     * 
+ * + * .google.cloud.aiplatform.v1.NasTrial search_trial = 3; + * + * @return The searchTrial. + */ + public com.google.cloud.aiplatform.v1.NasTrial getSearchTrial() { + if (searchTrialBuilder_ == null) { + return searchTrial_ == null + ? com.google.cloud.aiplatform.v1.NasTrial.getDefaultInstance() + : searchTrial_; + } else { + return searchTrialBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The requested search NasTrial.
+     * 
+ * + * .google.cloud.aiplatform.v1.NasTrial search_trial = 3; + */ + public Builder setSearchTrial(com.google.cloud.aiplatform.v1.NasTrial value) { + if (searchTrialBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + searchTrial_ = value; + } else { + searchTrialBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The requested search NasTrial.
+     * 
+ * + * .google.cloud.aiplatform.v1.NasTrial search_trial = 3; + */ + public Builder setSearchTrial(com.google.cloud.aiplatform.v1.NasTrial.Builder builderForValue) { + if (searchTrialBuilder_ == null) { + searchTrial_ = builderForValue.build(); + } else { + searchTrialBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The requested search NasTrial.
+     * 
+ * + * .google.cloud.aiplatform.v1.NasTrial search_trial = 3; + */ + public Builder mergeSearchTrial(com.google.cloud.aiplatform.v1.NasTrial value) { + if (searchTrialBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && searchTrial_ != null + && searchTrial_ != com.google.cloud.aiplatform.v1.NasTrial.getDefaultInstance()) { + getSearchTrialBuilder().mergeFrom(value); + } else { + searchTrial_ = value; + } + } else { + searchTrialBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The requested search NasTrial.
+     * 
+ * + * .google.cloud.aiplatform.v1.NasTrial search_trial = 3; + */ + public Builder clearSearchTrial() { + bitField0_ = (bitField0_ & ~0x00000004); + searchTrial_ = null; + if (searchTrialBuilder_ != null) { + searchTrialBuilder_.dispose(); + searchTrialBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The requested search NasTrial.
+     * 
+ * + * .google.cloud.aiplatform.v1.NasTrial search_trial = 3; + */ + public com.google.cloud.aiplatform.v1.NasTrial.Builder getSearchTrialBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getSearchTrialFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The requested search NasTrial.
+     * 
+ * + * .google.cloud.aiplatform.v1.NasTrial search_trial = 3; + */ + public com.google.cloud.aiplatform.v1.NasTrialOrBuilder getSearchTrialOrBuilder() { + if (searchTrialBuilder_ != null) { + return searchTrialBuilder_.getMessageOrBuilder(); + } else { + return searchTrial_ == null + ? com.google.cloud.aiplatform.v1.NasTrial.getDefaultInstance() + : searchTrial_; + } + } + /** + * + * + *
+     * The requested search NasTrial.
+     * 
+ * + * .google.cloud.aiplatform.v1.NasTrial search_trial = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.NasTrial, + com.google.cloud.aiplatform.v1.NasTrial.Builder, + com.google.cloud.aiplatform.v1.NasTrialOrBuilder> + getSearchTrialFieldBuilder() { + if (searchTrialBuilder_ == null) { + searchTrialBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.NasTrial, + com.google.cloud.aiplatform.v1.NasTrial.Builder, + com.google.cloud.aiplatform.v1.NasTrialOrBuilder>( + getSearchTrial(), getParentForChildren(), isClean()); + searchTrial_ = null; + } + return searchTrialBuilder_; + } + + private com.google.cloud.aiplatform.v1.NasTrial trainTrial_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.NasTrial, + com.google.cloud.aiplatform.v1.NasTrial.Builder, + com.google.cloud.aiplatform.v1.NasTrialOrBuilder> + trainTrialBuilder_; + /** + * + * + *
+     * The train NasTrial corresponding to
+     * [search_trial][google.cloud.aiplatform.v1.NasTrialDetail.search_trial].
+     * Only populated if
+     * [search_trial][google.cloud.aiplatform.v1.NasTrialDetail.search_trial] is
+     * used for training.
+     * 
+ * + * .google.cloud.aiplatform.v1.NasTrial train_trial = 4; + * + * @return Whether the trainTrial field is set. + */ + public boolean hasTrainTrial() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * The train NasTrial corresponding to
+     * [search_trial][google.cloud.aiplatform.v1.NasTrialDetail.search_trial].
+     * Only populated if
+     * [search_trial][google.cloud.aiplatform.v1.NasTrialDetail.search_trial] is
+     * used for training.
+     * 
+ * + * .google.cloud.aiplatform.v1.NasTrial train_trial = 4; + * + * @return The trainTrial. + */ + public com.google.cloud.aiplatform.v1.NasTrial getTrainTrial() { + if (trainTrialBuilder_ == null) { + return trainTrial_ == null + ? com.google.cloud.aiplatform.v1.NasTrial.getDefaultInstance() + : trainTrial_; + } else { + return trainTrialBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The train NasTrial corresponding to
+     * [search_trial][google.cloud.aiplatform.v1.NasTrialDetail.search_trial].
+     * Only populated if
+     * [search_trial][google.cloud.aiplatform.v1.NasTrialDetail.search_trial] is
+     * used for training.
+     * 
+ * + * .google.cloud.aiplatform.v1.NasTrial train_trial = 4; + */ + public Builder setTrainTrial(com.google.cloud.aiplatform.v1.NasTrial value) { + if (trainTrialBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + trainTrial_ = value; + } else { + trainTrialBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The train NasTrial corresponding to
+     * [search_trial][google.cloud.aiplatform.v1.NasTrialDetail.search_trial].
+     * Only populated if
+     * [search_trial][google.cloud.aiplatform.v1.NasTrialDetail.search_trial] is
+     * used for training.
+     * 
+ * + * .google.cloud.aiplatform.v1.NasTrial train_trial = 4; + */ + public Builder setTrainTrial(com.google.cloud.aiplatform.v1.NasTrial.Builder builderForValue) { + if (trainTrialBuilder_ == null) { + trainTrial_ = builderForValue.build(); + } else { + trainTrialBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The train NasTrial corresponding to
+     * [search_trial][google.cloud.aiplatform.v1.NasTrialDetail.search_trial].
+     * Only populated if
+     * [search_trial][google.cloud.aiplatform.v1.NasTrialDetail.search_trial] is
+     * used for training.
+     * 
+ * + * .google.cloud.aiplatform.v1.NasTrial train_trial = 4; + */ + public Builder mergeTrainTrial(com.google.cloud.aiplatform.v1.NasTrial value) { + if (trainTrialBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && trainTrial_ != null + && trainTrial_ != com.google.cloud.aiplatform.v1.NasTrial.getDefaultInstance()) { + getTrainTrialBuilder().mergeFrom(value); + } else { + trainTrial_ = value; + } + } else { + trainTrialBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The train NasTrial corresponding to
+     * [search_trial][google.cloud.aiplatform.v1.NasTrialDetail.search_trial].
+     * Only populated if
+     * [search_trial][google.cloud.aiplatform.v1.NasTrialDetail.search_trial] is
+     * used for training.
+     * 
+ * + * .google.cloud.aiplatform.v1.NasTrial train_trial = 4; + */ + public Builder clearTrainTrial() { + bitField0_ = (bitField0_ & ~0x00000008); + trainTrial_ = null; + if (trainTrialBuilder_ != null) { + trainTrialBuilder_.dispose(); + trainTrialBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The train NasTrial corresponding to
+     * [search_trial][google.cloud.aiplatform.v1.NasTrialDetail.search_trial].
+     * Only populated if
+     * [search_trial][google.cloud.aiplatform.v1.NasTrialDetail.search_trial] is
+     * used for training.
+     * 
+ * + * .google.cloud.aiplatform.v1.NasTrial train_trial = 4; + */ + public com.google.cloud.aiplatform.v1.NasTrial.Builder getTrainTrialBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getTrainTrialFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The train NasTrial corresponding to
+     * [search_trial][google.cloud.aiplatform.v1.NasTrialDetail.search_trial].
+     * Only populated if
+     * [search_trial][google.cloud.aiplatform.v1.NasTrialDetail.search_trial] is
+     * used for training.
+     * 
+ * + * .google.cloud.aiplatform.v1.NasTrial train_trial = 4; + */ + public com.google.cloud.aiplatform.v1.NasTrialOrBuilder getTrainTrialOrBuilder() { + if (trainTrialBuilder_ != null) { + return trainTrialBuilder_.getMessageOrBuilder(); + } else { + return trainTrial_ == null + ? com.google.cloud.aiplatform.v1.NasTrial.getDefaultInstance() + : trainTrial_; + } + } + /** + * + * + *
+     * The train NasTrial corresponding to
+     * [search_trial][google.cloud.aiplatform.v1.NasTrialDetail.search_trial].
+     * Only populated if
+     * [search_trial][google.cloud.aiplatform.v1.NasTrialDetail.search_trial] is
+     * used for training.
+     * 
+ * + * .google.cloud.aiplatform.v1.NasTrial train_trial = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.NasTrial, + com.google.cloud.aiplatform.v1.NasTrial.Builder, + com.google.cloud.aiplatform.v1.NasTrialOrBuilder> + getTrainTrialFieldBuilder() { + if (trainTrialBuilder_ == null) { + trainTrialBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.NasTrial, + com.google.cloud.aiplatform.v1.NasTrial.Builder, + com.google.cloud.aiplatform.v1.NasTrialOrBuilder>( + getTrainTrial(), getParentForChildren(), isClean()); + trainTrial_ = null; + } + return trainTrialBuilder_; + } + + @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.NasTrialDetail) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.NasTrialDetail) + private static final com.google.cloud.aiplatform.v1.NasTrialDetail DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.NasTrialDetail(); + } + + public static com.google.cloud.aiplatform.v1.NasTrialDetail getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NasTrialDetail 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.NasTrialDetail getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NasTrialDetailName.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NasTrialDetailName.java new file mode 100644 index 000000000000..8ac7c0804c59 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NasTrialDetailName.java @@ -0,0 +1,269 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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 NasTrialDetailName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_NAS_JOB_NAS_TRIAL_DETAIL = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String nasJob; + private final String nasTrialDetail; + + @Deprecated + protected NasTrialDetailName() { + project = null; + location = null; + nasJob = null; + nasTrialDetail = null; + } + + private NasTrialDetailName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + nasJob = Preconditions.checkNotNull(builder.getNasJob()); + nasTrialDetail = Preconditions.checkNotNull(builder.getNasTrialDetail()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getNasJob() { + return nasJob; + } + + public String getNasTrialDetail() { + return nasTrialDetail; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static NasTrialDetailName of( + String project, String location, String nasJob, String nasTrialDetail) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setNasJob(nasJob) + .setNasTrialDetail(nasTrialDetail) + .build(); + } + + public static String format( + String project, String location, String nasJob, String nasTrialDetail) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setNasJob(nasJob) + .setNasTrialDetail(nasTrialDetail) + .build() + .toString(); + } + + public static NasTrialDetailName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_NAS_JOB_NAS_TRIAL_DETAIL.validatedMatch( + formattedString, "NasTrialDetailName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("nas_job"), + matchMap.get("nas_trial_detail")); + } + + 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 (NasTrialDetailName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_NAS_JOB_NAS_TRIAL_DETAIL.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 (nasJob != null) { + fieldMapBuilder.put("nas_job", nasJob); + } + if (nasTrialDetail != null) { + fieldMapBuilder.put("nas_trial_detail", nasTrialDetail); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_NAS_JOB_NAS_TRIAL_DETAIL.instantiate( + "project", + project, + "location", + location, + "nas_job", + nasJob, + "nas_trial_detail", + nasTrialDetail); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + NasTrialDetailName that = ((NasTrialDetailName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.nasJob, that.nasJob) + && Objects.equals(this.nasTrialDetail, that.nasTrialDetail); + } + 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(nasJob); + h *= 1000003; + h ^= Objects.hashCode(nasTrialDetail); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}. + */ + public static class Builder { + private String project; + private String location; + private String nasJob; + private String nasTrialDetail; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getNasJob() { + return nasJob; + } + + public String getNasTrialDetail() { + return nasTrialDetail; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setNasJob(String nasJob) { + this.nasJob = nasJob; + return this; + } + + public Builder setNasTrialDetail(String nasTrialDetail) { + this.nasTrialDetail = nasTrialDetail; + return this; + } + + private Builder(NasTrialDetailName nasTrialDetailName) { + this.project = nasTrialDetailName.project; + this.location = nasTrialDetailName.location; + this.nasJob = nasTrialDetailName.nasJob; + this.nasTrialDetail = nasTrialDetailName.nasTrialDetail; + } + + public NasTrialDetailName build() { + return new NasTrialDetailName(this); + } + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NasTrialDetailOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NasTrialDetailOrBuilder.java new file mode 100644 index 000000000000..d1e0078015c8 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NasTrialDetailOrBuilder.java @@ -0,0 +1,157 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/nas_job.proto + +package com.google.cloud.aiplatform.v1; + +public interface NasTrialDetailOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.NasTrialDetail) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Resource name of the NasTrialDetail.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Resource name of the NasTrialDetail.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * The parameters for the NasJob NasTrial.
+   * 
+ * + * string parameters = 2; + * + * @return The parameters. + */ + java.lang.String getParameters(); + /** + * + * + *
+   * The parameters for the NasJob NasTrial.
+   * 
+ * + * string parameters = 2; + * + * @return The bytes for parameters. + */ + com.google.protobuf.ByteString getParametersBytes(); + + /** + * + * + *
+   * The requested search NasTrial.
+   * 
+ * + * .google.cloud.aiplatform.v1.NasTrial search_trial = 3; + * + * @return Whether the searchTrial field is set. + */ + boolean hasSearchTrial(); + /** + * + * + *
+   * The requested search NasTrial.
+   * 
+ * + * .google.cloud.aiplatform.v1.NasTrial search_trial = 3; + * + * @return The searchTrial. + */ + com.google.cloud.aiplatform.v1.NasTrial getSearchTrial(); + /** + * + * + *
+   * The requested search NasTrial.
+   * 
+ * + * .google.cloud.aiplatform.v1.NasTrial search_trial = 3; + */ + com.google.cloud.aiplatform.v1.NasTrialOrBuilder getSearchTrialOrBuilder(); + + /** + * + * + *
+   * The train NasTrial corresponding to
+   * [search_trial][google.cloud.aiplatform.v1.NasTrialDetail.search_trial].
+   * Only populated if
+   * [search_trial][google.cloud.aiplatform.v1.NasTrialDetail.search_trial] is
+   * used for training.
+   * 
+ * + * .google.cloud.aiplatform.v1.NasTrial train_trial = 4; + * + * @return Whether the trainTrial field is set. + */ + boolean hasTrainTrial(); + /** + * + * + *
+   * The train NasTrial corresponding to
+   * [search_trial][google.cloud.aiplatform.v1.NasTrialDetail.search_trial].
+   * Only populated if
+   * [search_trial][google.cloud.aiplatform.v1.NasTrialDetail.search_trial] is
+   * used for training.
+   * 
+ * + * .google.cloud.aiplatform.v1.NasTrial train_trial = 4; + * + * @return The trainTrial. + */ + com.google.cloud.aiplatform.v1.NasTrial getTrainTrial(); + /** + * + * + *
+   * The train NasTrial corresponding to
+   * [search_trial][google.cloud.aiplatform.v1.NasTrialDetail.search_trial].
+   * Only populated if
+   * [search_trial][google.cloud.aiplatform.v1.NasTrialDetail.search_trial] is
+   * used for training.
+   * 
+ * + * .google.cloud.aiplatform.v1.NasTrial train_trial = 4; + */ + com.google.cloud.aiplatform.v1.NasTrialOrBuilder getTrainTrialOrBuilder(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NasTrialOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NasTrialOrBuilder.java new file mode 100644 index 000000000000..dcbbca582855 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/NasTrialOrBuilder.java @@ -0,0 +1,199 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/nas_job.proto + +package com.google.cloud.aiplatform.v1; + +public interface NasTrialOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.NasTrial) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The identifier of the NasTrial assigned by the service.
+   * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+   * Output only. The identifier of the NasTrial assigned by the service.
+   * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + + /** + * + * + *
+   * Output only. The detailed state of the NasTrial.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NasTrial.State state = 2 [(.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 NasTrial.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.NasTrial.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.aiplatform.v1.NasTrial.State getState(); + + /** + * + * + *
+   * Output only. The final measurement containing the objective value.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Measurement final_measurement = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the finalMeasurement field is set. + */ + boolean hasFinalMeasurement(); + /** + * + * + *
+   * Output only. The final measurement containing the objective value.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Measurement final_measurement = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The finalMeasurement. + */ + com.google.cloud.aiplatform.v1.Measurement getFinalMeasurement(); + /** + * + * + *
+   * Output only. The final measurement containing the objective value.
+   * 
+ * + * + * .google.cloud.aiplatform.v1.Measurement final_measurement = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1.MeasurementOrBuilder getFinalMeasurementOrBuilder(); + + /** + * + * + *
+   * Output only. Time when the NasTrial was started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + * + * + *
+   * Output only. Time when the NasTrial was started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + * + * + *
+   * Output only. Time when the NasTrial was started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time when the NasTrial's status changed to `SUCCEEDED` or
+   * `INFEASIBLE`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+   * Output only. Time when the NasTrial's status changed to `SUCCEEDED` or
+   * `INFEASIBLE`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * Output only. Time when the NasTrial's status changed to `SUCCEEDED` or
+   * `INFEASIBLE`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Pipeline.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Pipeline.java index 12d545d8ee2f..3ee64e5001a0 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Pipeline.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/Pipeline.java @@ -206,28 +206,29 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "NDING\020\001\022\013\n\007RUNNING\020\002\022\r\n\tSUCCEEDED\020\003\022\022\n\016C" + "ANCEL_PENDING\020\004\022\016\n\nCANCELLING\020\005\022\r\n\tCANCE" + "LLED\020\006\022\n\n\006FAILED\020\007\022\013\n\007SKIPPED\020\010\022\021\n\rNOT_T" - + "RIGGERED\020\t\"\267\004\n\032PipelineTaskExecutorDetai" + + "RIGGERED\020\t\"\313\004\n\032PipelineTaskExecutorDetai" + "l\022g\n\020container_detail\030\001 \001(\0132F.google.clo" + "ud.aiplatform.v1.PipelineTaskExecutorDet" - + "ail.ContainerDetailB\003\340A\003H\000\022j\n\021custom_job" + + "ail.ContainerDetailB\003\340A\003H\000\022h\n\021custom_job" + "_detail\030\002 \001(\0132F.google.cloud.aiplatform." + "v1.PipelineTaskExecutorDetail.CustomJobD" - + "etailB\005\030\001\340A\003H\000\032\347\001\n\017ContainerDetail\022=\n\010ma" - + "in_job\030\001 \001(\tB+\340A\003\372A%\n#aiplatform.googlea" - + "pis.com/CustomJob\022J\n\025pre_caching_check_j" - + "ob\030\002 \001(\tB+\340A\003\372A%\n#aiplatform.googleapis." - + "com/CustomJob\022\035\n\020failed_main_jobs\030\003 \003(\tB" - + "\003\340A\003\022*\n\035failed_pre_caching_check_jobs\030\004 " - + "\003(\tB\003\340A\003\032O\n\017CustomJobDetail\0228\n\003job\030\001 \001(\t" - + "B+\340A\003\372A%\n#aiplatform.googleapis.com/Cust" - + "omJob:\002\030\001B\t\n\007detailsB\227\002\n\036com.google.clou" - + "d.aiplatform.v1B\010PipelineP\001Z>cloud.googl" - + "e.com/go/aiplatform/apiv1/aiplatformpb;a" - + "iplatformpb\252\002\032Google.Cloud.AIPlatform.V1" - + "\312\002\032Google\\Cloud\\AIPlatform\\V1\352\002\035Google::" - + "Cloud::AIPlatform::V1\352AN\n\036compute.google" - + "apis.com/Network\022,projects/{project}/glo" - + "bal/networks/{network}b\006proto3" + + "etailB\003\340A\003H\000\032\347\001\n\017ContainerDetail\022=\n\010main" + + "_job\030\001 \001(\tB+\340A\003\372A%\n#aiplatform.googleapi" + + "s.com/CustomJob\022J\n\025pre_caching_check_job" + + "\030\002 \001(\tB+\340A\003\372A%\n#aiplatform.googleapis.co" + + "m/CustomJob\022\035\n\020failed_main_jobs\030\003 \003(\tB\003\340" + + "A\003\022*\n\035failed_pre_caching_check_jobs\030\004 \003(" + + "\tB\003\340A\003\032e\n\017CustomJobDetail\0228\n\003job\030\001 \001(\tB+" + + "\340A\003\372A%\n#aiplatform.googleapis.com/Custom" + + "Job\022\030\n\013failed_jobs\030\003 \003(\tB\003\340A\003B\t\n\007details" + + "B\227\002\n\036com.google.cloud.aiplatform.v1B\010Pip" + + "elineP\001Z>cloud.google.com/go/aiplatform/" + + "apiv1/aiplatformpb;aiplatformpb\252\002\032Google" + + ".Cloud.AIPlatform.V1\312\002\032Google\\Cloud\\AIPl" + + "atform\\V1\352\002\035Google::Cloud::AIPlatform::V" + + "1\352AN\n\036compute.googleapis.com/Network\022,pr" + + "ojects/{project}/global/networks/{networ" + + "k}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -432,7 +433,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_PipelineTaskExecutorDetail_CustomJobDetail_descriptor, new java.lang.String[] { - "Job", + "Job", "FailedJobs", }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PipelineTaskExecutorDetail.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PipelineTaskExecutorDetail.java index f18a68d0f2f3..b48ebc909881 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PipelineTaskExecutorDetail.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PipelineTaskExecutorDetail.java @@ -1858,7 +1858,6 @@ public com.google.protobuf.Parser getParserForType() { } } - @java.lang.Deprecated public interface CustomJobDetailOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.CustomJobDetail) @@ -1894,6 +1893,65 @@ public interface CustomJobDetailOrBuilder * @return The bytes for job. */ com.google.protobuf.ByteString getJobBytes(); + + /** + * + * + *
+     * Output only. The names of the previously failed
+     * [CustomJob][google.cloud.aiplatform.v1.CustomJob]. The list includes the
+     * all attempts in chronological order.
+     * 
+ * + * repeated string failed_jobs = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the failedJobs. + */ + java.util.List getFailedJobsList(); + /** + * + * + *
+     * Output only. The names of the previously failed
+     * [CustomJob][google.cloud.aiplatform.v1.CustomJob]. The list includes the
+     * all attempts in chronological order.
+     * 
+ * + * repeated string failed_jobs = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of failedJobs. + */ + int getFailedJobsCount(); + /** + * + * + *
+     * Output only. The names of the previously failed
+     * [CustomJob][google.cloud.aiplatform.v1.CustomJob]. The list includes the
+     * all attempts in chronological order.
+     * 
+ * + * repeated string failed_jobs = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The failedJobs at the given index. + */ + java.lang.String getFailedJobs(int index); + /** + * + * + *
+     * Output only. The names of the previously failed
+     * [CustomJob][google.cloud.aiplatform.v1.CustomJob]. The list includes the
+     * all attempts in chronological order.
+     * 
+ * + * repeated string failed_jobs = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the failedJobs at the given index. + */ + com.google.protobuf.ByteString getFailedJobsBytes(int index); } /** * @@ -1904,7 +1962,6 @@ public interface CustomJobDetailOrBuilder * * Protobuf type {@code google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.CustomJobDetail} */ - @java.lang.Deprecated public static final class CustomJobDetail extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.CustomJobDetail) @@ -1917,6 +1974,7 @@ private CustomJobDetail(com.google.protobuf.GeneratedMessageV3.Builder builde private CustomJobDetail() { job_ = ""; + failedJobs_ = com.google.protobuf.LazyStringArrayList.EMPTY; } @java.lang.Override @@ -2003,6 +2061,77 @@ public com.google.protobuf.ByteString getJobBytes() { } } + public static final int FAILED_JOBS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList failedJobs_; + /** + * + * + *
+     * Output only. The names of the previously failed
+     * [CustomJob][google.cloud.aiplatform.v1.CustomJob]. The list includes the
+     * all attempts in chronological order.
+     * 
+ * + * repeated string failed_jobs = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the failedJobs. + */ + public com.google.protobuf.ProtocolStringList getFailedJobsList() { + return failedJobs_; + } + /** + * + * + *
+     * Output only. The names of the previously failed
+     * [CustomJob][google.cloud.aiplatform.v1.CustomJob]. The list includes the
+     * all attempts in chronological order.
+     * 
+ * + * repeated string failed_jobs = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of failedJobs. + */ + public int getFailedJobsCount() { + return failedJobs_.size(); + } + /** + * + * + *
+     * Output only. The names of the previously failed
+     * [CustomJob][google.cloud.aiplatform.v1.CustomJob]. The list includes the
+     * all attempts in chronological order.
+     * 
+ * + * repeated string failed_jobs = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The failedJobs at the given index. + */ + public java.lang.String getFailedJobs(int index) { + return failedJobs_.get(index); + } + /** + * + * + *
+     * Output only. The names of the previously failed
+     * [CustomJob][google.cloud.aiplatform.v1.CustomJob]. The list includes the
+     * all attempts in chronological order.
+     * 
+ * + * repeated string failed_jobs = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the failedJobs at the given index. + */ + public com.google.protobuf.ByteString getFailedJobsBytes(int index) { + return failedJobs_.getByteString(index); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -2020,6 +2149,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(job_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, job_); } + for (int i = 0; i < failedJobs_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, failedJobs_.getRaw(i)); + } getUnknownFields().writeTo(output); } @@ -2032,6 +2164,14 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(job_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, job_); } + { + int dataSize = 0; + for (int i = 0; i < failedJobs_.size(); i++) { + dataSize += computeStringSizeNoTag(failedJobs_.getRaw(i)); + } + size += dataSize; + size += 1 * getFailedJobsList().size(); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -2050,6 +2190,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.CustomJobDetail) obj; if (!getJob().equals(other.getJob())) return false; + if (!getFailedJobsList().equals(other.getFailedJobsList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2063,6 +2204,10 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + JOB_FIELD_NUMBER; hash = (53 * hash) + getJob().hashCode(); + if (getFailedJobsCount() > 0) { + hash = (37 * hash) + FAILED_JOBS_FIELD_NUMBER; + hash = (53 * hash) + getFailedJobsList().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -2214,6 +2359,8 @@ public Builder clear() { super.clear(); bitField0_ = 0; job_ = ""; + failedJobs_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -2245,6 +2392,7 @@ public com.google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.CustomJobDetail buildPartial() { com.google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.CustomJobDetail result = new com.google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.CustomJobDetail(this); + buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } @@ -2252,6 +2400,15 @@ public com.google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.CustomJobDetail return result; } + private void buildPartialRepeatedFields( + com.google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.CustomJobDetail result) { + if (((bitField0_ & 0x00000002) != 0)) { + failedJobs_ = failedJobs_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.failedJobs_ = failedJobs_; + } + private void buildPartial0( com.google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.CustomJobDetail result) { int from_bitField0_ = bitField0_; @@ -2317,6 +2474,16 @@ public Builder mergeFrom( bitField0_ |= 0x00000001; onChanged(); } + if (!other.failedJobs_.isEmpty()) { + if (failedJobs_.isEmpty()) { + failedJobs_ = other.failedJobs_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureFailedJobsIsMutable(); + failedJobs_.addAll(other.failedJobs_); + } + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -2349,6 +2516,13 @@ public Builder mergeFrom( bitField0_ |= 0x00000001; break; } // case 10 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureFailedJobsIsMutable(); + failedJobs_.add(s); + break; + } // case 26 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -2489,6 +2663,192 @@ public Builder setJobBytes(com.google.protobuf.ByteString value) { return this; } + private com.google.protobuf.LazyStringList failedJobs_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureFailedJobsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + failedJobs_ = new com.google.protobuf.LazyStringArrayList(failedJobs_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+       * Output only. The names of the previously failed
+       * [CustomJob][google.cloud.aiplatform.v1.CustomJob]. The list includes the
+       * all attempts in chronological order.
+       * 
+ * + * repeated string failed_jobs = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the failedJobs. + */ + public com.google.protobuf.ProtocolStringList getFailedJobsList() { + return failedJobs_.getUnmodifiableView(); + } + /** + * + * + *
+       * Output only. The names of the previously failed
+       * [CustomJob][google.cloud.aiplatform.v1.CustomJob]. The list includes the
+       * all attempts in chronological order.
+       * 
+ * + * repeated string failed_jobs = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of failedJobs. + */ + public int getFailedJobsCount() { + return failedJobs_.size(); + } + /** + * + * + *
+       * Output only. The names of the previously failed
+       * [CustomJob][google.cloud.aiplatform.v1.CustomJob]. The list includes the
+       * all attempts in chronological order.
+       * 
+ * + * repeated string failed_jobs = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The failedJobs at the given index. + */ + public java.lang.String getFailedJobs(int index) { + return failedJobs_.get(index); + } + /** + * + * + *
+       * Output only. The names of the previously failed
+       * [CustomJob][google.cloud.aiplatform.v1.CustomJob]. The list includes the
+       * all attempts in chronological order.
+       * 
+ * + * repeated string failed_jobs = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the failedJobs at the given index. + */ + public com.google.protobuf.ByteString getFailedJobsBytes(int index) { + return failedJobs_.getByteString(index); + } + /** + * + * + *
+       * Output only. The names of the previously failed
+       * [CustomJob][google.cloud.aiplatform.v1.CustomJob]. The list includes the
+       * all attempts in chronological order.
+       * 
+ * + * repeated string failed_jobs = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index to set the value at. + * @param value The failedJobs to set. + * @return This builder for chaining. + */ + public Builder setFailedJobs(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFailedJobsIsMutable(); + failedJobs_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The names of the previously failed
+       * [CustomJob][google.cloud.aiplatform.v1.CustomJob]. The list includes the
+       * all attempts in chronological order.
+       * 
+ * + * repeated string failed_jobs = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The failedJobs to add. + * @return This builder for chaining. + */ + public Builder addFailedJobs(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFailedJobsIsMutable(); + failedJobs_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The names of the previously failed
+       * [CustomJob][google.cloud.aiplatform.v1.CustomJob]. The list includes the
+       * all attempts in chronological order.
+       * 
+ * + * repeated string failed_jobs = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param values The failedJobs to add. + * @return This builder for chaining. + */ + public Builder addAllFailedJobs(java.lang.Iterable values) { + ensureFailedJobsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, failedJobs_); + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The names of the previously failed
+       * [CustomJob][google.cloud.aiplatform.v1.CustomJob]. The list includes the
+       * all attempts in chronological order.
+       * 
+ * + * repeated string failed_jobs = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearFailedJobs() { + failedJobs_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The names of the previously failed
+       * [CustomJob][google.cloud.aiplatform.v1.CustomJob]. The list includes the
+       * all attempts in chronological order.
+       * 
+ * + * repeated string failed_jobs = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes of the failedJobs to add. + * @return This builder for chaining. + */ + public Builder addFailedJobsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureFailedJobsIsMutable(); + failedJobs_.add(value); + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -2565,7 +2925,6 @@ public enum DetailsCase com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { CONTAINER_DETAIL(1), - @java.lang.Deprecated CUSTOM_JOB_DETAIL(2), DETAILS_NOT_SET(0); private final int value; @@ -2675,15 +3034,12 @@ public boolean hasContainerDetail() { *
* * - * .google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * - * @deprecated google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.custom_job_detail is - * deprecated. See google/cloud/aiplatform/v1/pipeline_job.proto;l=401 * @return Whether the customJobDetail field is set. */ @java.lang.Override - @java.lang.Deprecated public boolean hasCustomJobDetail() { return detailsCase_ == 2; } @@ -2695,15 +3051,12 @@ public boolean hasCustomJobDetail() { *
* * - * .google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * - * @deprecated google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.custom_job_detail is - * deprecated. See google/cloud/aiplatform/v1/pipeline_job.proto;l=401 * @return The customJobDetail. */ @java.lang.Override - @java.lang.Deprecated public com.google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.CustomJobDetail getCustomJobDetail() { if (detailsCase_ == 2) { @@ -2720,11 +3073,10 @@ public boolean hasCustomJobDetail() { *
* * - * .google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override - @java.lang.Deprecated public com.google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.CustomJobDetailOrBuilder getCustomJobDetailOrBuilder() { if (detailsCase_ == 2) { @@ -3416,15 +3768,12 @@ public Builder clearContainerDetail() { *
* * - * .google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * - * @deprecated google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.custom_job_detail is - * deprecated. See google/cloud/aiplatform/v1/pipeline_job.proto;l=401 * @return Whether the customJobDetail field is set. */ @java.lang.Override - @java.lang.Deprecated public boolean hasCustomJobDetail() { return detailsCase_ == 2; } @@ -3436,15 +3785,12 @@ public boolean hasCustomJobDetail() { *
* * - * .google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * - * @deprecated google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.custom_job_detail is - * deprecated. See google/cloud/aiplatform/v1/pipeline_job.proto;l=401 * @return The customJobDetail. */ @java.lang.Override - @java.lang.Deprecated public com.google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.CustomJobDetail getCustomJobDetail() { if (customJobDetailBuilder_ == null) { @@ -3470,10 +3816,9 @@ public boolean hasCustomJobDetail() { * * * - * .google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - @java.lang.Deprecated public Builder setCustomJobDetail( com.google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.CustomJobDetail value) { if (customJobDetailBuilder_ == null) { @@ -3496,10 +3841,9 @@ public Builder setCustomJobDetail( * * * - * .google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - @java.lang.Deprecated public Builder setCustomJobDetail( com.google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.CustomJobDetail.Builder builderForValue) { @@ -3520,10 +3864,9 @@ public Builder setCustomJobDetail( * * * - * .google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - @java.lang.Deprecated public Builder mergeCustomJobDetail( com.google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.CustomJobDetail value) { if (customJobDetailBuilder_ == null) { @@ -3559,10 +3902,9 @@ public Builder mergeCustomJobDetail( * * * - * .google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - @java.lang.Deprecated public Builder clearCustomJobDetail() { if (customJobDetailBuilder_ == null) { if (detailsCase_ == 2) { @@ -3587,10 +3929,9 @@ public Builder clearCustomJobDetail() { * * * - * .google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - @java.lang.Deprecated public com.google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.CustomJobDetail.Builder getCustomJobDetailBuilder() { return getCustomJobDetailFieldBuilder().getBuilder(); @@ -3603,11 +3944,10 @@ public Builder clearCustomJobDetail() { * * * - * .google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override - @java.lang.Deprecated public com.google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.CustomJobDetailOrBuilder getCustomJobDetailOrBuilder() { if ((detailsCase_ == 2) && (customJobDetailBuilder_ != null)) { @@ -3629,7 +3969,7 @@ public Builder clearCustomJobDetail() { * * * - * .google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ private com.google.protobuf.SingleFieldBuilderV3< diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PipelineTaskExecutorDetailOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PipelineTaskExecutorDetailOrBuilder.java index e88466bdf692..87eeb5dd8d61 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PipelineTaskExecutorDetailOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PipelineTaskExecutorDetailOrBuilder.java @@ -73,14 +73,11 @@ public interface PipelineTaskExecutorDetailOrBuilder * * * - * .google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * - * @deprecated google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.custom_job_detail is - * deprecated. See google/cloud/aiplatform/v1/pipeline_job.proto;l=401 * @return Whether the customJobDetail field is set. */ - @java.lang.Deprecated boolean hasCustomJobDetail(); /** * @@ -90,14 +87,11 @@ public interface PipelineTaskExecutorDetailOrBuilder * * * - * .google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * - * @deprecated google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.custom_job_detail is - * deprecated. See google/cloud/aiplatform/v1/pipeline_job.proto;l=401 * @return The customJobDetail. */ - @java.lang.Deprecated com.google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.CustomJobDetail getCustomJobDetail(); /** * @@ -107,10 +101,9 @@ public interface PipelineTaskExecutorDetailOrBuilder * * * - * .google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - @java.lang.Deprecated com.google.cloud.aiplatform.v1.PipelineTaskExecutorDetail.CustomJobDetailOrBuilder getCustomJobDetailOrBuilder(); diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PrivateServiceConnectConfig.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PrivateServiceConnectConfig.java new file mode 100644 index 000000000000..cbb8736a5d15 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PrivateServiceConnectConfig.java @@ -0,0 +1,835 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/service_networking.proto + +package com.google.cloud.aiplatform.v1; + +/** + * + * + *
+ * Represents configuration for private service connect.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.PrivateServiceConnectConfig} + */ +public final class PrivateServiceConnectConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.PrivateServiceConnectConfig) + PrivateServiceConnectConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use PrivateServiceConnectConfig.newBuilder() to construct. + private PrivateServiceConnectConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PrivateServiceConnectConfig() { + projectAllowlist_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PrivateServiceConnectConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ServiceNetworkingProto + .internal_static_google_cloud_aiplatform_v1_PrivateServiceConnectConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ServiceNetworkingProto + .internal_static_google_cloud_aiplatform_v1_PrivateServiceConnectConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.PrivateServiceConnectConfig.class, + com.google.cloud.aiplatform.v1.PrivateServiceConnectConfig.Builder.class); + } + + public static final int ENABLE_PRIVATE_SERVICE_CONNECT_FIELD_NUMBER = 1; + private boolean enablePrivateServiceConnect_ = false; + /** + * + * + *
+   * Required. If true, expose the IndexEndpoint via private service connect.
+   * 
+ * + * bool enable_private_service_connect = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The enablePrivateServiceConnect. + */ + @java.lang.Override + public boolean getEnablePrivateServiceConnect() { + return enablePrivateServiceConnect_; + } + + public static final int PROJECT_ALLOWLIST_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList projectAllowlist_; + /** + * + * + *
+   * A list of Projects from which the forwarding rule will target the service
+   * attachment.
+   * 
+ * + * repeated string project_allowlist = 2; + * + * @return A list containing the projectAllowlist. + */ + public com.google.protobuf.ProtocolStringList getProjectAllowlistList() { + return projectAllowlist_; + } + /** + * + * + *
+   * A list of Projects from which the forwarding rule will target the service
+   * attachment.
+   * 
+ * + * repeated string project_allowlist = 2; + * + * @return The count of projectAllowlist. + */ + public int getProjectAllowlistCount() { + return projectAllowlist_.size(); + } + /** + * + * + *
+   * A list of Projects from which the forwarding rule will target the service
+   * attachment.
+   * 
+ * + * repeated string project_allowlist = 2; + * + * @param index The index of the element to return. + * @return The projectAllowlist at the given index. + */ + public java.lang.String getProjectAllowlist(int index) { + return projectAllowlist_.get(index); + } + /** + * + * + *
+   * A list of Projects from which the forwarding rule will target the service
+   * attachment.
+   * 
+ * + * repeated string project_allowlist = 2; + * + * @param index The index of the value to return. + * @return The bytes of the projectAllowlist at the given index. + */ + public com.google.protobuf.ByteString getProjectAllowlistBytes(int index) { + return projectAllowlist_.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 (enablePrivateServiceConnect_ != false) { + output.writeBool(1, enablePrivateServiceConnect_); + } + for (int i = 0; i < projectAllowlist_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, projectAllowlist_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enablePrivateServiceConnect_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(1, enablePrivateServiceConnect_); + } + { + int dataSize = 0; + for (int i = 0; i < projectAllowlist_.size(); i++) { + dataSize += computeStringSizeNoTag(projectAllowlist_.getRaw(i)); + } + size += dataSize; + size += 1 * getProjectAllowlistList().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.PrivateServiceConnectConfig)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.PrivateServiceConnectConfig other = + (com.google.cloud.aiplatform.v1.PrivateServiceConnectConfig) obj; + + if (getEnablePrivateServiceConnect() != other.getEnablePrivateServiceConnect()) return false; + if (!getProjectAllowlistList().equals(other.getProjectAllowlistList())) 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_PRIVATE_SERVICE_CONNECT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnablePrivateServiceConnect()); + if (getProjectAllowlistCount() > 0) { + hash = (37 * hash) + PROJECT_ALLOWLIST_FIELD_NUMBER; + hash = (53 * hash) + getProjectAllowlistList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.PrivateServiceConnectConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.PrivateServiceConnectConfig 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.PrivateServiceConnectConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.PrivateServiceConnectConfig 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.PrivateServiceConnectConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.PrivateServiceConnectConfig 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.PrivateServiceConnectConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.PrivateServiceConnectConfig 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.PrivateServiceConnectConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.PrivateServiceConnectConfig 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.PrivateServiceConnectConfig 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.PrivateServiceConnectConfig 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.PrivateServiceConnectConfig 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 configuration for private service connect.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.PrivateServiceConnectConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.PrivateServiceConnectConfig) + com.google.cloud.aiplatform.v1.PrivateServiceConnectConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.ServiceNetworkingProto + .internal_static_google_cloud_aiplatform_v1_PrivateServiceConnectConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.ServiceNetworkingProto + .internal_static_google_cloud_aiplatform_v1_PrivateServiceConnectConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.PrivateServiceConnectConfig.class, + com.google.cloud.aiplatform.v1.PrivateServiceConnectConfig.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1.PrivateServiceConnectConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + enablePrivateServiceConnect_ = false; + projectAllowlist_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.ServiceNetworkingProto + .internal_static_google_cloud_aiplatform_v1_PrivateServiceConnectConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.PrivateServiceConnectConfig getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.PrivateServiceConnectConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.PrivateServiceConnectConfig build() { + com.google.cloud.aiplatform.v1.PrivateServiceConnectConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.PrivateServiceConnectConfig buildPartial() { + com.google.cloud.aiplatform.v1.PrivateServiceConnectConfig result = + new com.google.cloud.aiplatform.v1.PrivateServiceConnectConfig(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.aiplatform.v1.PrivateServiceConnectConfig result) { + if (((bitField0_ & 0x00000002) != 0)) { + projectAllowlist_ = projectAllowlist_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.projectAllowlist_ = projectAllowlist_; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1.PrivateServiceConnectConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.enablePrivateServiceConnect_ = enablePrivateServiceConnect_; + } + } + + @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.PrivateServiceConnectConfig) { + return mergeFrom((com.google.cloud.aiplatform.v1.PrivateServiceConnectConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1.PrivateServiceConnectConfig other) { + if (other == com.google.cloud.aiplatform.v1.PrivateServiceConnectConfig.getDefaultInstance()) + return this; + if (other.getEnablePrivateServiceConnect() != false) { + setEnablePrivateServiceConnect(other.getEnablePrivateServiceConnect()); + } + if (!other.projectAllowlist_.isEmpty()) { + if (projectAllowlist_.isEmpty()) { + projectAllowlist_ = other.projectAllowlist_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureProjectAllowlistIsMutable(); + projectAllowlist_.addAll(other.projectAllowlist_); + } + 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: + { + enablePrivateServiceConnect_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureProjectAllowlistIsMutable(); + projectAllowlist_.add(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 bitField0_; + + private boolean enablePrivateServiceConnect_; + /** + * + * + *
+     * Required. If true, expose the IndexEndpoint via private service connect.
+     * 
+ * + * bool enable_private_service_connect = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enablePrivateServiceConnect. + */ + @java.lang.Override + public boolean getEnablePrivateServiceConnect() { + return enablePrivateServiceConnect_; + } + /** + * + * + *
+     * Required. If true, expose the IndexEndpoint via private service connect.
+     * 
+ * + * bool enable_private_service_connect = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enablePrivateServiceConnect to set. + * @return This builder for chaining. + */ + public Builder setEnablePrivateServiceConnect(boolean value) { + + enablePrivateServiceConnect_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. If true, expose the IndexEndpoint via private service connect.
+     * 
+ * + * bool enable_private_service_connect = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearEnablePrivateServiceConnect() { + bitField0_ = (bitField0_ & ~0x00000001); + enablePrivateServiceConnect_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList projectAllowlist_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureProjectAllowlistIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + projectAllowlist_ = new com.google.protobuf.LazyStringArrayList(projectAllowlist_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * A list of Projects from which the forwarding rule will target the service
+     * attachment.
+     * 
+ * + * repeated string project_allowlist = 2; + * + * @return A list containing the projectAllowlist. + */ + public com.google.protobuf.ProtocolStringList getProjectAllowlistList() { + return projectAllowlist_.getUnmodifiableView(); + } + /** + * + * + *
+     * A list of Projects from which the forwarding rule will target the service
+     * attachment.
+     * 
+ * + * repeated string project_allowlist = 2; + * + * @return The count of projectAllowlist. + */ + public int getProjectAllowlistCount() { + return projectAllowlist_.size(); + } + /** + * + * + *
+     * A list of Projects from which the forwarding rule will target the service
+     * attachment.
+     * 
+ * + * repeated string project_allowlist = 2; + * + * @param index The index of the element to return. + * @return The projectAllowlist at the given index. + */ + public java.lang.String getProjectAllowlist(int index) { + return projectAllowlist_.get(index); + } + /** + * + * + *
+     * A list of Projects from which the forwarding rule will target the service
+     * attachment.
+     * 
+ * + * repeated string project_allowlist = 2; + * + * @param index The index of the value to return. + * @return The bytes of the projectAllowlist at the given index. + */ + public com.google.protobuf.ByteString getProjectAllowlistBytes(int index) { + return projectAllowlist_.getByteString(index); + } + /** + * + * + *
+     * A list of Projects from which the forwarding rule will target the service
+     * attachment.
+     * 
+ * + * repeated string project_allowlist = 2; + * + * @param index The index to set the value at. + * @param value The projectAllowlist to set. + * @return This builder for chaining. + */ + public Builder setProjectAllowlist(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureProjectAllowlistIsMutable(); + projectAllowlist_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of Projects from which the forwarding rule will target the service
+     * attachment.
+     * 
+ * + * repeated string project_allowlist = 2; + * + * @param value The projectAllowlist to add. + * @return This builder for chaining. + */ + public Builder addProjectAllowlist(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureProjectAllowlistIsMutable(); + projectAllowlist_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of Projects from which the forwarding rule will target the service
+     * attachment.
+     * 
+ * + * repeated string project_allowlist = 2; + * + * @param values The projectAllowlist to add. + * @return This builder for chaining. + */ + public Builder addAllProjectAllowlist(java.lang.Iterable values) { + ensureProjectAllowlistIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, projectAllowlist_); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of Projects from which the forwarding rule will target the service
+     * attachment.
+     * 
+ * + * repeated string project_allowlist = 2; + * + * @return This builder for chaining. + */ + public Builder clearProjectAllowlist() { + projectAllowlist_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of Projects from which the forwarding rule will target the service
+     * attachment.
+     * 
+ * + * repeated string project_allowlist = 2; + * + * @param value The bytes of the projectAllowlist to add. + * @return This builder for chaining. + */ + public Builder addProjectAllowlistBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureProjectAllowlistIsMutable(); + projectAllowlist_.add(value); + 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.PrivateServiceConnectConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.PrivateServiceConnectConfig) + private static final com.google.cloud.aiplatform.v1.PrivateServiceConnectConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.PrivateServiceConnectConfig(); + } + + public static com.google.cloud.aiplatform.v1.PrivateServiceConnectConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PrivateServiceConnectConfig 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.PrivateServiceConnectConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PrivateServiceConnectConfigOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PrivateServiceConnectConfigOrBuilder.java new file mode 100644 index 000000000000..96c260e12517 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/PrivateServiceConnectConfigOrBuilder.java @@ -0,0 +1,93 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/service_networking.proto + +package com.google.cloud.aiplatform.v1; + +public interface PrivateServiceConnectConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.PrivateServiceConnectConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. If true, expose the IndexEndpoint via private service connect.
+   * 
+ * + * bool enable_private_service_connect = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The enablePrivateServiceConnect. + */ + boolean getEnablePrivateServiceConnect(); + + /** + * + * + *
+   * A list of Projects from which the forwarding rule will target the service
+   * attachment.
+   * 
+ * + * repeated string project_allowlist = 2; + * + * @return A list containing the projectAllowlist. + */ + java.util.List getProjectAllowlistList(); + /** + * + * + *
+   * A list of Projects from which the forwarding rule will target the service
+   * attachment.
+   * 
+ * + * repeated string project_allowlist = 2; + * + * @return The count of projectAllowlist. + */ + int getProjectAllowlistCount(); + /** + * + * + *
+   * A list of Projects from which the forwarding rule will target the service
+   * attachment.
+   * 
+ * + * repeated string project_allowlist = 2; + * + * @param index The index of the element to return. + * @return The projectAllowlist at the given index. + */ + java.lang.String getProjectAllowlist(int index); + /** + * + * + *
+   * A list of Projects from which the forwarding rule will target the service
+   * attachment.
+   * 
+ * + * repeated string project_allowlist = 2; + * + * @param index The index of the value to return. + * @return The bytes of the projectAllowlist at the given index. + */ + com.google.protobuf.ByteString getProjectAllowlistBytes(int index); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ServiceNetworkingProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ServiceNetworkingProto.java new file mode 100644 index 000000000000..365aa9606617 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/ServiceNetworkingProto.java @@ -0,0 +1,78 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/service_networking.proto + +package com.google.cloud.aiplatform.v1; + +public final class ServiceNetworkingProto { + private ServiceNetworkingProto() {} + + 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_PrivateServiceConnectConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_PrivateServiceConnectConfig_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n3google/cloud/aiplatform/v1/service_net" + + "working.proto\022\032google.cloud.aiplatform.v" + + "1\032\037google/api/field_behavior.proto\"e\n\033Pr" + + "ivateServiceConnectConfig\022+\n\036enable_priv" + + "ate_service_connect\030\001 \001(\010B\003\340A\002\022\031\n\021projec" + + "t_allowlist\030\002 \003(\tB\324\001\n\036com.google.cloud.a" + + "iplatform.v1B\026ServiceNetworkingProtoP\001Z>" + + "cloud.google.com/go/aiplatform/apiv1/aip" + + "latformpb;aiplatformpb\252\002\032Google.Cloud.AI" + + "Platform.V1\312\002\032Google\\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.FieldBehaviorProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1_PrivateServiceConnectConfig_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1_PrivateServiceConnectConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_PrivateServiceConnectConfig_descriptor, + new java.lang.String[] { + "EnablePrivateServiceConnect", "ProjectAllowlist", + }); + 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/StudyProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StudyProto.java index 97c4f953cbc2..e2f6d2413bb9 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StudyProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StudyProto.java @@ -51,6 +51,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_aiplatform_v1_StudySpec_MetricSpec_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_aiplatform_v1_StudySpec_MetricSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1_StudySpec_MetricSpec_SafetyMetricConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1_StudySpec_MetricSpec_SafetyMetricConfig_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -156,7 +160,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\022\014\n\010STOPPING\020\003\022\r\n\tSUCCEEDED\020\004\022\016\n\nINFEASI" + "BLE\020\005:l\352Ai\n\037aiplatform.googleapis.com/Tr" + "ial\022Fprojects/{project}/locations/{locat" - + "ion}/studies/{study}/trials/{trial}\"\206\033\n\t" + + "ion}/studies/{study}/trials/{trial}\"\376\034\n\t" + "StudySpec\022j\n\031decay_curve_stopping_spec\030\004" + " \001(\0132E.google.cloud.aiplatform.v1.StudyS" + "pec.DecayCurveAutomatedStoppingSpecH\000\022k\n" @@ -175,86 +179,92 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "atform.v1.StudySpec.ObservationNoise\022b\n\032" + "measurement_selection_type\030\007 \001(\0162>.googl" + "e.cloud.aiplatform.v1.StudySpec.Measurem" - + "entSelectionType\032\265\001\n\nMetricSpec\022\026\n\tmetri" + + "entSelectionType\032\255\003\n\nMetricSpec\022\026\n\tmetri" + "c_id\030\001 \001(\tB\003\340A\002\022L\n\004goal\030\002 \001(\01629.google.c" + "loud.aiplatform.v1.StudySpec.MetricSpec." - + "GoalTypeB\003\340A\002\"A\n\010GoalType\022\031\n\025GOAL_TYPE_U" - + "NSPECIFIED\020\000\022\014\n\010MAXIMIZE\020\001\022\014\n\010MINIMIZE\020\002" - + "\032\315\016\n\rParameterSpec\022`\n\021double_value_spec\030" - + "\002 \001(\0132C.google.cloud.aiplatform.v1.Study" - + "Spec.ParameterSpec.DoubleValueSpecH\000\022b\n\022" - + "integer_value_spec\030\003 \001(\0132D.google.cloud." - + "aiplatform.v1.StudySpec.ParameterSpec.In" - + "tegerValueSpecH\000\022j\n\026categorical_value_sp" - + "ec\030\004 \001(\0132H.google.cloud.aiplatform.v1.St" - + "udySpec.ParameterSpec.CategoricalValueSp" - + "ecH\000\022d\n\023discrete_value_spec\030\005 \001(\0132E.goog" - + "le.cloud.aiplatform.v1.StudySpec.Paramet" - + "erSpec.DiscreteValueSpecH\000\022\031\n\014parameter_" - + "id\030\001 \001(\tB\003\340A\002\022Q\n\nscale_type\030\006 \001(\0162=.goog" - + "le.cloud.aiplatform.v1.StudySpec.Paramet" - + "erSpec.ScaleType\022q\n\033conditional_paramete" - + "r_specs\030\n \003(\0132L.google.cloud.aiplatform." - + "v1.StudySpec.ParameterSpec.ConditionalPa" - + "rameterSpec\032o\n\017DoubleValueSpec\022\026\n\tmin_va" - + "lue\030\001 \001(\001B\003\340A\002\022\026\n\tmax_value\030\002 \001(\001B\003\340A\002\022\032" - + "\n\rdefault_value\030\004 \001(\001H\000\210\001\001B\020\n\016_default_v" - + "alue\032p\n\020IntegerValueSpec\022\026\n\tmin_value\030\001 " - + "\001(\003B\003\340A\002\022\026\n\tmax_value\030\002 \001(\003B\003\340A\002\022\032\n\rdefa" - + "ult_value\030\004 \001(\003H\000\210\001\001B\020\n\016_default_value\032Y" - + "\n\024CategoricalValueSpec\022\023\n\006values\030\001 \003(\tB\003" - + "\340A\002\022\032\n\rdefault_value\030\003 \001(\tH\000\210\001\001B\020\n\016_defa" - + "ult_value\032V\n\021DiscreteValueSpec\022\023\n\006values" - + "\030\001 \003(\001B\003\340A\002\022\032\n\rdefault_value\030\003 \001(\001H\000\210\001\001B" - + "\020\n\016_default_value\032\244\005\n\030ConditionalParamet" - + "erSpec\022\205\001\n\026parent_discrete_values\030\002 \001(\0132" - + "c.google.cloud.aiplatform.v1.StudySpec.P" - + "arameterSpec.ConditionalParameterSpec.Di" - + "screteValueConditionH\000\022{\n\021parent_int_val" - + "ues\030\003 \001(\0132^.google.cloud.aiplatform.v1.S" - + "tudySpec.ParameterSpec.ConditionalParame" - + "terSpec.IntValueConditionH\000\022\213\001\n\031parent_c" - + "ategorical_values\030\004 \001(\0132f.google.cloud.a" - + "iplatform.v1.StudySpec.ParameterSpec.Con" - + "ditionalParameterSpec.CategoricalValueCo" - + "nditionH\000\022P\n\016parameter_spec\030\001 \001(\01323.goog" - + "le.cloud.aiplatform.v1.StudySpec.Paramet" - + "erSpecB\003\340A\002\032-\n\026DiscreteValueCondition\022\023\n" - + "\006values\030\001 \003(\001B\003\340A\002\032(\n\021IntValueCondition\022" - + "\023\n\006values\030\001 \003(\003B\003\340A\002\0320\n\031CategoricalValue" - + "Condition\022\023\n\006values\030\001 \003(\tB\003\340A\002B\030\n\026parent" - + "_value_condition\"n\n\tScaleType\022\032\n\026SCALE_T" - + "YPE_UNSPECIFIED\020\000\022\025\n\021UNIT_LINEAR_SCALE\020\001" - + "\022\022\n\016UNIT_LOG_SCALE\020\002\022\032\n\026UNIT_REVERSE_LOG" - + "_SCALE\020\003B\026\n\024parameter_value_spec\032?\n\037Deca" - + "yCurveAutomatedStoppingSpec\022\034\n\024use_elaps" - + "ed_duration\030\001 \001(\010\032;\n\033MedianAutomatedStop" - + "pingSpec\022\034\n\024use_elapsed_duration\030\001 \001(\010\032\366" - + "\001\n\033ConvexAutomatedStoppingSpec\022\026\n\016max_st" - + "ep_count\030\001 \001(\003\022\026\n\016min_step_count\030\002 \001(\003\022\035" - + "\n\025min_measurement_count\030\003 \001(\003\022$\n\034learnin" - + "g_rate_parameter_name\030\004 \001(\t\022\034\n\024use_elaps" - + "ed_duration\030\005 \001(\010\022&\n\031update_all_stopped_" - + "trials\030\006 \001(\010H\000\210\001\001B\034\n\032_update_all_stopped" - + "_trials\"J\n\tAlgorithm\022\031\n\025ALGORITHM_UNSPEC" - + "IFIED\020\000\022\017\n\013GRID_SEARCH\020\002\022\021\n\rRANDOM_SEARC" - + "H\020\003\"H\n\020ObservationNoise\022!\n\035OBSERVATION_N" - + "OISE_UNSPECIFIED\020\000\022\007\n\003LOW\020\001\022\010\n\004HIGH\020\002\"r\n" - + "\030MeasurementSelectionType\022*\n&MEASUREMENT" - + "_SELECTION_TYPE_UNSPECIFIED\020\000\022\024\n\020LAST_ME" - + "ASUREMENT\020\001\022\024\n\020BEST_MEASUREMENT\020\002B\031\n\027aut" - + "omated_stopping_spec\"\334\001\n\013Measurement\0228\n\020" - + "elapsed_duration\030\001 \001(\0132\031.google.protobuf" - + ".DurationB\003\340A\003\022\027\n\nstep_count\030\002 \001(\003B\003\340A\003\022" - + "D\n\007metrics\030\003 \003(\0132..google.cloud.aiplatfo" - + "rm.v1.Measurement.MetricB\003\340A\003\0324\n\006Metric\022" - + "\026\n\tmetric_id\030\001 \001(\tB\003\340A\003\022\022\n\005value\030\002 \001(\001B\003" - + "\340A\003B\310\001\n\036com.google.cloud.aiplatform.v1B\n" - + "StudyProtoP\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" + + "GoalTypeB\003\340A\002\022_\n\rsafety_config\030\003 \001(\0132C.g" + + "oogle.cloud.aiplatform.v1.StudySpec.Metr" + + "icSpec.SafetyMetricConfigH\000\210\001\001\032\202\001\n\022Safet" + + "yMetricConfig\022\030\n\020safety_threshold\030\001 \001(\001\022" + + "-\n desired_min_safe_trials_fraction\030\002 \001(" + + "\001H\000\210\001\001B#\n!_desired_min_safe_trials_fract" + + "ion\"A\n\010GoalType\022\031\n\025GOAL_TYPE_UNSPECIFIED" + + "\020\000\022\014\n\010MAXIMIZE\020\001\022\014\n\010MINIMIZE\020\002B\020\n\016_safet" + + "y_config\032\315\016\n\rParameterSpec\022`\n\021double_val" + + "ue_spec\030\002 \001(\0132C.google.cloud.aiplatform." + + "v1.StudySpec.ParameterSpec.DoubleValueSp" + + "ecH\000\022b\n\022integer_value_spec\030\003 \001(\0132D.googl" + + "e.cloud.aiplatform.v1.StudySpec.Paramete" + + "rSpec.IntegerValueSpecH\000\022j\n\026categorical_" + + "value_spec\030\004 \001(\0132H.google.cloud.aiplatfo" + + "rm.v1.StudySpec.ParameterSpec.Categorica" + + "lValueSpecH\000\022d\n\023discrete_value_spec\030\005 \001(" + + "\0132E.google.cloud.aiplatform.v1.StudySpec" + + ".ParameterSpec.DiscreteValueSpecH\000\022\031\n\014pa" + + "rameter_id\030\001 \001(\tB\003\340A\002\022Q\n\nscale_type\030\006 \001(" + + "\0162=.google.cloud.aiplatform.v1.StudySpec" + + ".ParameterSpec.ScaleType\022q\n\033conditional_" + + "parameter_specs\030\n \003(\0132L.google.cloud.aip" + + "latform.v1.StudySpec.ParameterSpec.Condi" + + "tionalParameterSpec\032o\n\017DoubleValueSpec\022\026" + + "\n\tmin_value\030\001 \001(\001B\003\340A\002\022\026\n\tmax_value\030\002 \001(" + + "\001B\003\340A\002\022\032\n\rdefault_value\030\004 \001(\001H\000\210\001\001B\020\n\016_d" + + "efault_value\032p\n\020IntegerValueSpec\022\026\n\tmin_" + + "value\030\001 \001(\003B\003\340A\002\022\026\n\tmax_value\030\002 \001(\003B\003\340A\002" + + "\022\032\n\rdefault_value\030\004 \001(\003H\000\210\001\001B\020\n\016_default" + + "_value\032Y\n\024CategoricalValueSpec\022\023\n\006values" + + "\030\001 \003(\tB\003\340A\002\022\032\n\rdefault_value\030\003 \001(\tH\000\210\001\001B" + + "\020\n\016_default_value\032V\n\021DiscreteValueSpec\022\023" + + "\n\006values\030\001 \003(\001B\003\340A\002\022\032\n\rdefault_value\030\003 \001" + + "(\001H\000\210\001\001B\020\n\016_default_value\032\244\005\n\030Conditiona" + + "lParameterSpec\022\205\001\n\026parent_discrete_value" + + "s\030\002 \001(\0132c.google.cloud.aiplatform.v1.Stu" + + "dySpec.ParameterSpec.ConditionalParamete" + + "rSpec.DiscreteValueConditionH\000\022{\n\021parent" + + "_int_values\030\003 \001(\0132^.google.cloud.aiplatf" + + "orm.v1.StudySpec.ParameterSpec.Condition" + + "alParameterSpec.IntValueConditionH\000\022\213\001\n\031" + + "parent_categorical_values\030\004 \001(\0132f.google" + + ".cloud.aiplatform.v1.StudySpec.Parameter" + + "Spec.ConditionalParameterSpec.Categorica" + + "lValueConditionH\000\022P\n\016parameter_spec\030\001 \001(" + + "\01323.google.cloud.aiplatform.v1.StudySpec" + + ".ParameterSpecB\003\340A\002\032-\n\026DiscreteValueCond" + + "ition\022\023\n\006values\030\001 \003(\001B\003\340A\002\032(\n\021IntValueCo" + + "ndition\022\023\n\006values\030\001 \003(\003B\003\340A\002\0320\n\031Categori" + + "calValueCondition\022\023\n\006values\030\001 \003(\tB\003\340A\002B\030" + + "\n\026parent_value_condition\"n\n\tScaleType\022\032\n" + + "\026SCALE_TYPE_UNSPECIFIED\020\000\022\025\n\021UNIT_LINEAR" + + "_SCALE\020\001\022\022\n\016UNIT_LOG_SCALE\020\002\022\032\n\026UNIT_REV" + + "ERSE_LOG_SCALE\020\003B\026\n\024parameter_value_spec" + + "\032?\n\037DecayCurveAutomatedStoppingSpec\022\034\n\024u" + + "se_elapsed_duration\030\001 \001(\010\032;\n\033MedianAutom" + + "atedStoppingSpec\022\034\n\024use_elapsed_duration" + + "\030\001 \001(\010\032\366\001\n\033ConvexAutomatedStoppingSpec\022\026" + + "\n\016max_step_count\030\001 \001(\003\022\026\n\016min_step_count" + + "\030\002 \001(\003\022\035\n\025min_measurement_count\030\003 \001(\003\022$\n" + + "\034learning_rate_parameter_name\030\004 \001(\t\022\034\n\024u" + + "se_elapsed_duration\030\005 \001(\010\022&\n\031update_all_" + + "stopped_trials\030\006 \001(\010H\000\210\001\001B\034\n\032_update_all" + + "_stopped_trials\"J\n\tAlgorithm\022\031\n\025ALGORITH" + + "M_UNSPECIFIED\020\000\022\017\n\013GRID_SEARCH\020\002\022\021\n\rRAND" + + "OM_SEARCH\020\003\"H\n\020ObservationNoise\022!\n\035OBSER" + + "VATION_NOISE_UNSPECIFIED\020\000\022\007\n\003LOW\020\001\022\010\n\004H" + + "IGH\020\002\"r\n\030MeasurementSelectionType\022*\n&MEA" + + "SUREMENT_SELECTION_TYPE_UNSPECIFIED\020\000\022\024\n" + + "\020LAST_MEASUREMENT\020\001\022\024\n\020BEST_MEASUREMENT\020" + + "\002B\031\n\027automated_stopping_spec\"\334\001\n\013Measure" + + "ment\0228\n\020elapsed_duration\030\001 \001(\0132\031.google." + + "protobuf.DurationB\003\340A\003\022\027\n\nstep_count\030\002 \001" + + "(\003B\003\340A\003\022D\n\007metrics\030\003 \003(\0132..google.cloud." + + "aiplatform.v1.Measurement.MetricB\003\340A\003\0324\n" + + "\006Metric\022\026\n\tmetric_id\030\001 \001(\tB\003\340A\003\022\022\n\005value" + + "\030\002 \001(\001B\003\340A\003B\310\001\n\036com.google.cloud.aiplatf" + + "orm.v1B\nStudyProtoP\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( @@ -331,7 +341,17 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1_StudySpec_MetricSpec_descriptor, new java.lang.String[] { - "MetricId", "Goal", + "MetricId", "Goal", "SafetyConfig", "SafetyConfig", + }); + internal_static_google_cloud_aiplatform_v1_StudySpec_MetricSpec_SafetyMetricConfig_descriptor = + internal_static_google_cloud_aiplatform_v1_StudySpec_MetricSpec_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_aiplatform_v1_StudySpec_MetricSpec_SafetyMetricConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1_StudySpec_MetricSpec_SafetyMetricConfig_descriptor, + new java.lang.String[] { + "SafetyThreshold", "DesiredMinSafeTrialsFraction", "DesiredMinSafeTrialsFraction", }); internal_static_google_cloud_aiplatform_v1_StudySpec_ParameterSpec_descriptor = internal_static_google_cloud_aiplatform_v1_StudySpec_descriptor.getNestedTypes().get(1); diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StudySpec.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StudySpec.java index 01149947c752..d9036ffd8453 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StudySpec.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StudySpec.java @@ -633,6 +633,51 @@ public interface MetricSpecOrBuilder * @return The goal. */ com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.GoalType getGoal(); + + /** + * + * + *
+     * Used for safe search. In the case, the metric will be a safety
+     * metric. You must provide a separate metric for objective metric.
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig safety_config = 3; + * + * + * @return Whether the safetyConfig field is set. + */ + boolean hasSafetyConfig(); + /** + * + * + *
+     * Used for safe search. In the case, the metric will be a safety
+     * metric. You must provide a separate metric for objective metric.
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig safety_config = 3; + * + * + * @return The safetyConfig. + */ + com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig getSafetyConfig(); + /** + * + * + *
+     * Used for safe search. In the case, the metric will be a safety
+     * metric. You must provide a separate metric for objective metric.
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig safety_config = 3; + * + */ + com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfigOrBuilder + getSafetyConfigOrBuilder(); } /** * @@ -804,45 +849,830 @@ public GoalType findValueByNumber(int 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."); + 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.StudySpec.MetricSpec.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final GoalType[] VALUES = values(); + + public static GoalType 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 GoalType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.aiplatform.v1.StudySpec.MetricSpec.GoalType) + } + + public interface SafetyMetricConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Safety threshold (boundary value between safe and unsafe). NOTE that if
+       * you leave SafetyMetricConfig unset, a default value of 0 will be used.
+       * 
+ * + * double safety_threshold = 1; + * + * @return The safetyThreshold. + */ + double getSafetyThreshold(); + + /** + * + * + *
+       * Desired minimum fraction of safe trials (over total number of trials)
+       * that should be targeted by the algorithm at any time during the
+       * study (best effort). This should be between 0.0 and 1.0 and a value of
+       * 0.0 means that there is no minimum and an algorithm proceeds without
+       * targeting any specific fraction. A value of 1.0 means that the
+       * algorithm attempts to only Suggest safe Trials.
+       * 
+ * + * optional double desired_min_safe_trials_fraction = 2; + * + * @return Whether the desiredMinSafeTrialsFraction field is set. + */ + boolean hasDesiredMinSafeTrialsFraction(); + /** + * + * + *
+       * Desired minimum fraction of safe trials (over total number of trials)
+       * that should be targeted by the algorithm at any time during the
+       * study (best effort). This should be between 0.0 and 1.0 and a value of
+       * 0.0 means that there is no minimum and an algorithm proceeds without
+       * targeting any specific fraction. A value of 1.0 means that the
+       * algorithm attempts to only Suggest safe Trials.
+       * 
+ * + * optional double desired_min_safe_trials_fraction = 2; + * + * @return The desiredMinSafeTrialsFraction. + */ + double getDesiredMinSafeTrialsFraction(); + } + /** + * + * + *
+     * Used in safe optimization to specify threshold levels and risk tolerance.
+     * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig} + */ + public static final class SafetyMetricConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig) + SafetyMetricConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use SafetyMetricConfig.newBuilder() to construct. + private SafetyMetricConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SafetyMetricConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SafetyMetricConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_MetricSpec_SafetyMetricConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_MetricSpec_SafetyMetricConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig.class, + com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig.Builder + .class); + } + + private int bitField0_; + public static final int SAFETY_THRESHOLD_FIELD_NUMBER = 1; + private double safetyThreshold_ = 0D; + /** + * + * + *
+       * Safety threshold (boundary value between safe and unsafe). NOTE that if
+       * you leave SafetyMetricConfig unset, a default value of 0 will be used.
+       * 
+ * + * double safety_threshold = 1; + * + * @return The safetyThreshold. + */ + @java.lang.Override + public double getSafetyThreshold() { + return safetyThreshold_; + } + + public static final int DESIRED_MIN_SAFE_TRIALS_FRACTION_FIELD_NUMBER = 2; + private double desiredMinSafeTrialsFraction_ = 0D; + /** + * + * + *
+       * Desired minimum fraction of safe trials (over total number of trials)
+       * that should be targeted by the algorithm at any time during the
+       * study (best effort). This should be between 0.0 and 1.0 and a value of
+       * 0.0 means that there is no minimum and an algorithm proceeds without
+       * targeting any specific fraction. A value of 1.0 means that the
+       * algorithm attempts to only Suggest safe Trials.
+       * 
+ * + * optional double desired_min_safe_trials_fraction = 2; + * + * @return Whether the desiredMinSafeTrialsFraction field is set. + */ + @java.lang.Override + public boolean hasDesiredMinSafeTrialsFraction() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * Desired minimum fraction of safe trials (over total number of trials)
+       * that should be targeted by the algorithm at any time during the
+       * study (best effort). This should be between 0.0 and 1.0 and a value of
+       * 0.0 means that there is no minimum and an algorithm proceeds without
+       * targeting any specific fraction. A value of 1.0 means that the
+       * algorithm attempts to only Suggest safe Trials.
+       * 
+ * + * optional double desired_min_safe_trials_fraction = 2; + * + * @return The desiredMinSafeTrialsFraction. + */ + @java.lang.Override + public double getDesiredMinSafeTrialsFraction() { + return desiredMinSafeTrialsFraction_; + } + + 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(safetyThreshold_) != 0) { + output.writeDouble(1, safetyThreshold_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeDouble(2, desiredMinSafeTrialsFraction_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Double.doubleToRawLongBits(safetyThreshold_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(1, safetyThreshold_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeDoubleSize( + 2, desiredMinSafeTrialsFraction_); + } + 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.StudySpec.MetricSpec.SafetyMetricConfig)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig other = + (com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig) obj; + + if (java.lang.Double.doubleToLongBits(getSafetyThreshold()) + != java.lang.Double.doubleToLongBits(other.getSafetyThreshold())) return false; + if (hasDesiredMinSafeTrialsFraction() != other.hasDesiredMinSafeTrialsFraction()) + return false; + if (hasDesiredMinSafeTrialsFraction()) { + if (java.lang.Double.doubleToLongBits(getDesiredMinSafeTrialsFraction()) + != java.lang.Double.doubleToLongBits(other.getDesiredMinSafeTrialsFraction())) + 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) + SAFETY_THRESHOLD_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getSafetyThreshold())); + if (hasDesiredMinSafeTrialsFraction()) { + hash = (37 * hash) + DESIRED_MIN_SAFE_TRIALS_FRACTION_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getDesiredMinSafeTrialsFraction())); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig + 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.StudySpec.MetricSpec.SafetyMetricConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig + 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.StudySpec.MetricSpec.SafetyMetricConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig + 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.StudySpec.MetricSpec.SafetyMetricConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig + 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.StudySpec.MetricSpec.SafetyMetricConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig + 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.StudySpec.MetricSpec.SafetyMetricConfig + 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.StudySpec.MetricSpec.SafetyMetricConfig + 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.StudySpec.MetricSpec.SafetyMetricConfig 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; + } + /** + * + * + *
+       * Used in safe optimization to specify threshold levels and risk tolerance.
+       * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig) + com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_MetricSpec_SafetyMetricConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_MetricSpec_SafetyMetricConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig.class, + com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig.Builder + .class); + } + + // Construct using + // com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + safetyThreshold_ = 0D; + desiredMinSafeTrialsFraction_ = 0D; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1.StudyProto + .internal_static_google_cloud_aiplatform_v1_StudySpec_MetricSpec_SafetyMetricConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig build() { + com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig + buildPartial() { + com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig result = + new com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.safetyThreshold_ = safetyThreshold_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.desiredMinSafeTrialsFraction_ = desiredMinSafeTrialsFraction_; + 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.StudySpec.MetricSpec.SafetyMetricConfig) { + return mergeFrom( + (com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig other) { + if (other + == com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig + .getDefaultInstance()) return this; + if (other.getSafetyThreshold() != 0D) { + setSafetyThreshold(other.getSafetyThreshold()); + } + if (other.hasDesiredMinSafeTrialsFraction()) { + setDesiredMinSafeTrialsFraction(other.getDesiredMinSafeTrialsFraction()); + } + 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: + { + safetyThreshold_ = input.readDouble(); + bitField0_ |= 0x00000001; + break; + } // case 9 + case 17: + { + desiredMinSafeTrialsFraction_ = input.readDouble(); + bitField0_ |= 0x00000002; + break; + } // case 17 + 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 safetyThreshold_; + /** + * + * + *
+         * Safety threshold (boundary value between safe and unsafe). NOTE that if
+         * you leave SafetyMetricConfig unset, a default value of 0 will be used.
+         * 
+ * + * double safety_threshold = 1; + * + * @return The safetyThreshold. + */ + @java.lang.Override + public double getSafetyThreshold() { + return safetyThreshold_; + } + /** + * + * + *
+         * Safety threshold (boundary value between safe and unsafe). NOTE that if
+         * you leave SafetyMetricConfig unset, a default value of 0 will be used.
+         * 
+ * + * double safety_threshold = 1; + * + * @param value The safetyThreshold to set. + * @return This builder for chaining. + */ + public Builder setSafetyThreshold(double value) { + + safetyThreshold_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * Safety threshold (boundary value between safe and unsafe). NOTE that if
+         * you leave SafetyMetricConfig unset, a default value of 0 will be used.
+         * 
+ * + * double safety_threshold = 1; + * + * @return This builder for chaining. + */ + public Builder clearSafetyThreshold() { + bitField0_ = (bitField0_ & ~0x00000001); + safetyThreshold_ = 0D; + onChanged(); + return this; + } + + private double desiredMinSafeTrialsFraction_; + /** + * + * + *
+         * Desired minimum fraction of safe trials (over total number of trials)
+         * that should be targeted by the algorithm at any time during the
+         * study (best effort). This should be between 0.0 and 1.0 and a value of
+         * 0.0 means that there is no minimum and an algorithm proceeds without
+         * targeting any specific fraction. A value of 1.0 means that the
+         * algorithm attempts to only Suggest safe Trials.
+         * 
+ * + * optional double desired_min_safe_trials_fraction = 2; + * + * @return Whether the desiredMinSafeTrialsFraction field is set. + */ + @java.lang.Override + public boolean hasDesiredMinSafeTrialsFraction() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+         * Desired minimum fraction of safe trials (over total number of trials)
+         * that should be targeted by the algorithm at any time during the
+         * study (best effort). This should be between 0.0 and 1.0 and a value of
+         * 0.0 means that there is no minimum and an algorithm proceeds without
+         * targeting any specific fraction. A value of 1.0 means that the
+         * algorithm attempts to only Suggest safe Trials.
+         * 
+ * + * optional double desired_min_safe_trials_fraction = 2; + * + * @return The desiredMinSafeTrialsFraction. + */ + @java.lang.Override + public double getDesiredMinSafeTrialsFraction() { + return desiredMinSafeTrialsFraction_; + } + /** + * + * + *
+         * Desired minimum fraction of safe trials (over total number of trials)
+         * that should be targeted by the algorithm at any time during the
+         * study (best effort). This should be between 0.0 and 1.0 and a value of
+         * 0.0 means that there is no minimum and an algorithm proceeds without
+         * targeting any specific fraction. A value of 1.0 means that the
+         * algorithm attempts to only Suggest safe Trials.
+         * 
+ * + * optional double desired_min_safe_trials_fraction = 2; + * + * @param value The desiredMinSafeTrialsFraction to set. + * @return This builder for chaining. + */ + public Builder setDesiredMinSafeTrialsFraction(double value) { + + desiredMinSafeTrialsFraction_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Desired minimum fraction of safe trials (over total number of trials)
+         * that should be targeted by the algorithm at any time during the
+         * study (best effort). This should be between 0.0 and 1.0 and a value of
+         * 0.0 means that there is no minimum and an algorithm proceeds without
+         * targeting any specific fraction. A value of 1.0 means that the
+         * algorithm attempts to only Suggest safe Trials.
+         * 
+ * + * optional double desired_min_safe_trials_fraction = 2; + * + * @return This builder for chaining. + */ + public Builder clearDesiredMinSafeTrialsFraction() { + bitField0_ = (bitField0_ & ~0x00000002); + desiredMinSafeTrialsFraction_ = 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); } - return getDescriptor().getValues().get(ordinal()); + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig) } - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig) + private static final com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig(); } - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.getDescriptor() - .getEnumTypes() - .get(0); + public static com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; } - private static final GoalType[] VALUES = values(); + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SafetyMetricConfig 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 GoalType 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.protobuf.Parser parser() { + return PARSER; } - private final int value; - - private GoalType(int value) { - this.value = value; + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; } - // @@protoc_insertion_point(enum_scope:google.cloud.aiplatform.v1.StudySpec.MetricSpec.GoalType) + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } + private int bitField0_; public static final int METRIC_ID_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -937,6 +1767,69 @@ public com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.GoalType getGoal() { : result; } + public static final int SAFETY_CONFIG_FIELD_NUMBER = 3; + private com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig safetyConfig_; + /** + * + * + *
+     * Used for safe search. In the case, the metric will be a safety
+     * metric. You must provide a separate metric for objective metric.
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig safety_config = 3; + * + * + * @return Whether the safetyConfig field is set. + */ + @java.lang.Override + public boolean hasSafetyConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Used for safe search. In the case, the metric will be a safety
+     * metric. You must provide a separate metric for objective metric.
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig safety_config = 3; + * + * + * @return The safetyConfig. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig + getSafetyConfig() { + return safetyConfig_ == null + ? com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig + .getDefaultInstance() + : safetyConfig_; + } + /** + * + * + *
+     * Used for safe search. In the case, the metric will be a safety
+     * metric. You must provide a separate metric for objective metric.
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig safety_config = 3; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfigOrBuilder + getSafetyConfigOrBuilder() { + return safetyConfig_ == null + ? com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig + .getDefaultInstance() + : safetyConfig_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -959,6 +1852,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(2, goal_); } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getSafetyConfig()); + } getUnknownFields().writeTo(output); } @@ -976,6 +1872,9 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, goal_); } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getSafetyConfig()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -994,6 +1893,10 @@ public boolean equals(final java.lang.Object obj) { if (!getMetricId().equals(other.getMetricId())) return false; if (goal_ != other.goal_) return false; + if (hasSafetyConfig() != other.hasSafetyConfig()) return false; + if (hasSafetyConfig()) { + if (!getSafetyConfig().equals(other.getSafetyConfig())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1009,6 +1912,10 @@ public int hashCode() { hash = (53 * hash) + getMetricId().hashCode(); hash = (37 * hash) + GOAL_FIELD_NUMBER; hash = (53 * hash) + goal_; + if (hasSafetyConfig()) { + hash = (37 * hash) + SAFETY_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getSafetyConfig().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -1141,10 +2048,19 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.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) { + getSafetyConfigFieldBuilder(); + } } @java.lang.Override @@ -1153,6 +2069,11 @@ public Builder clear() { bitField0_ = 0; metricId_ = ""; goal_ = 0; + safetyConfig_ = null; + if (safetyConfigBuilder_ != null) { + safetyConfigBuilder_.dispose(); + safetyConfigBuilder_ = null; + } return this; } @@ -1195,6 +2116,13 @@ private void buildPartial0(com.google.cloud.aiplatform.v1.StudySpec.MetricSpec r if (((from_bitField0_ & 0x00000002) != 0)) { result.goal_ = goal_; } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.safetyConfig_ = + safetyConfigBuilder_ == null ? safetyConfig_ : safetyConfigBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -1253,6 +2181,9 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1.StudySpec.MetricSpec oth if (other.goal_ != 0) { setGoalValue(other.getGoalValue()); } + if (other.hasSafetyConfig()) { + mergeSafetyConfig(other.getSafetyConfig()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1291,6 +2222,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000002; break; } // case 16 + case 26: + { + input.readMessage(getSafetyConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1523,6 +2460,227 @@ public Builder clearGoal() { return this; } + private com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig safetyConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig, + com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig.Builder, + com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfigOrBuilder> + safetyConfigBuilder_; + /** + * + * + *
+       * Used for safe search. In the case, the metric will be a safety
+       * metric. You must provide a separate metric for objective metric.
+       * 
+ * + * + * optional .google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig safety_config = 3; + * + * + * @return Whether the safetyConfig field is set. + */ + public boolean hasSafetyConfig() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+       * Used for safe search. In the case, the metric will be a safety
+       * metric. You must provide a separate metric for objective metric.
+       * 
+ * + * + * optional .google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig safety_config = 3; + * + * + * @return The safetyConfig. + */ + public com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig + getSafetyConfig() { + if (safetyConfigBuilder_ == null) { + return safetyConfig_ == null + ? com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig + .getDefaultInstance() + : safetyConfig_; + } else { + return safetyConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Used for safe search. In the case, the metric will be a safety
+       * metric. You must provide a separate metric for objective metric.
+       * 
+ * + * + * optional .google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig safety_config = 3; + * + */ + public Builder setSafetyConfig( + com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig value) { + if (safetyConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + safetyConfig_ = value; + } else { + safetyConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Used for safe search. In the case, the metric will be a safety
+       * metric. You must provide a separate metric for objective metric.
+       * 
+ * + * + * optional .google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig safety_config = 3; + * + */ + public Builder setSafetyConfig( + com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig.Builder + builderForValue) { + if (safetyConfigBuilder_ == null) { + safetyConfig_ = builderForValue.build(); + } else { + safetyConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Used for safe search. In the case, the metric will be a safety
+       * metric. You must provide a separate metric for objective metric.
+       * 
+ * + * + * optional .google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig safety_config = 3; + * + */ + public Builder mergeSafetyConfig( + com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig value) { + if (safetyConfigBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && safetyConfig_ != null + && safetyConfig_ + != com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig + .getDefaultInstance()) { + getSafetyConfigBuilder().mergeFrom(value); + } else { + safetyConfig_ = value; + } + } else { + safetyConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Used for safe search. In the case, the metric will be a safety
+       * metric. You must provide a separate metric for objective metric.
+       * 
+ * + * + * optional .google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig safety_config = 3; + * + */ + public Builder clearSafetyConfig() { + bitField0_ = (bitField0_ & ~0x00000004); + safetyConfig_ = null; + if (safetyConfigBuilder_ != null) { + safetyConfigBuilder_.dispose(); + safetyConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Used for safe search. In the case, the metric will be a safety
+       * metric. You must provide a separate metric for objective metric.
+       * 
+ * + * + * optional .google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig safety_config = 3; + * + */ + public com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig.Builder + getSafetyConfigBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getSafetyConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Used for safe search. In the case, the metric will be a safety
+       * metric. You must provide a separate metric for objective metric.
+       * 
+ * + * + * optional .google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig safety_config = 3; + * + */ + public com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfigOrBuilder + getSafetyConfigOrBuilder() { + if (safetyConfigBuilder_ != null) { + return safetyConfigBuilder_.getMessageOrBuilder(); + } else { + return safetyConfig_ == null + ? com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig + .getDefaultInstance() + : safetyConfig_; + } + } + /** + * + * + *
+       * Used for safe search. In the case, the metric will be a safety
+       * metric. You must provide a separate metric for objective metric.
+       * 
+ * + * + * optional .google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig safety_config = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig, + com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig.Builder, + com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfigOrBuilder> + getSafetyConfigFieldBuilder() { + if (safetyConfigBuilder_ == null) { + safetyConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig, + com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfig.Builder, + com.google.cloud.aiplatform.v1.StudySpec.MetricSpec.SafetyMetricConfigOrBuilder>( + getSafetyConfig(), getParentForChildren(), isClean()); + safetyConfig_ = null; + } + return safetyConfigBuilder_; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { 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 1f3a5a190699..edbfc0cbe4e8 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 @@ -96,7 +96,7 @@ message Endpoint { // this key. EncryptionSpec encryption_spec = 10; - // The full name of the Google Compute Engine + // Optional. The full name of the Google Compute Engine // [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks) // to which the Endpoint should be peered. // @@ -113,6 +113,7 @@ message Endpoint { // Where `{project}` is a project number, as in `12345`, and `{network}` is // network name. string network = 13 [ + (google.api.field_behavior) = OPTIONAL, (google.api.resource_reference) = { type: "compute.googleapis.com/Network" } ]; @@ -224,6 +225,8 @@ message DeployedModel { // User can disable container logging by setting this flag to true. bool disable_container_logging = 15; + // If true, online prediction access logs are sent to StackDriver + // Logging. // These logs are like standard server access logs, containing // information like timestamp and latency for each prediction request. // diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/index_endpoint.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/index_endpoint.proto index 8f699671d33e..6fbbb8817e02 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/index_endpoint.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/index_endpoint.proto @@ -19,6 +19,7 @@ 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/service_networking.proto"; import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.AIPlatform.V1"; @@ -102,6 +103,14 @@ message IndexEndpoint { // can be set. bool enable_private_service_connect = 10 [deprecated = true, (google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration for private service connect. + // + // [network][google.cloud.aiplatform.v1.IndexEndpoint.network] and + // [private_service_connect_config][google.cloud.aiplatform.v1.IndexEndpoint.private_service_connect_config] + // are mutually exclusive. + PrivateServiceConnectConfig private_service_connect_config = 12 + [(google.api.field_behavior) = OPTIONAL]; } // A deployment of an Index. IndexEndpoints contain one or more DeployedIndexes. @@ -177,10 +186,10 @@ message DeployedIndex { // e2-standard-16 and all machine types available for LARGE shard. // // Available machine types for LARGE shard: - // e2-standard-32, e2-highmem-16, n2d-standard-32. + // e2-highmem-16, n2d-standard-32. // // n1-standard-16 and n1-standard-32 are still available, but we recommend - // e2-standard-16 and e2-standard-32 for cost efficiency. + // e2-standard-16 and e2-highmem-16 for cost efficiency. DedicatedResources dedicated_resources = 16 [(google.api.field_behavior) = OPTIONAL]; diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/job_service.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/job_service.proto index bac4eb93b792..ce8d664a379e 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/job_service.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/job_service.proto @@ -25,6 +25,7 @@ import "google/cloud/aiplatform/v1/custom_job.proto"; import "google/cloud/aiplatform/v1/data_labeling_job.proto"; import "google/cloud/aiplatform/v1/hyperparameter_tuning_job.proto"; import "google/cloud/aiplatform/v1/model_deployment_monitoring_job.proto"; +import "google/cloud/aiplatform/v1/nas_job.proto"; import "google/cloud/aiplatform/v1/operation.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; @@ -43,7 +44,8 @@ option ruby_package = "Google::Cloud::AIPlatform::V1"; service JobService { option (google.api.default_host) = "aiplatform.googleapis.com"; option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud-platform.read-only"; // Creates a CustomJob. A created CustomJob right away // will be attempted to be run. @@ -219,6 +221,81 @@ service JobService { option (google.api.method_signature) = "name"; } + // Creates a NasJob + rpc CreateNasJob(CreateNasJobRequest) returns (NasJob) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/nasJobs" + body: "nas_job" + }; + option (google.api.method_signature) = "parent,nas_job"; + } + + // Gets a NasJob + rpc GetNasJob(GetNasJobRequest) returns (NasJob) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/nasJobs/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists NasJobs in a Location. + rpc ListNasJobs(ListNasJobsRequest) returns (ListNasJobsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/nasJobs" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a NasJob. + rpc DeleteNasJob(DeleteNasJobRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/nasJobs/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "DeleteOperationMetadata" + }; + } + + // Cancels a NasJob. + // Starts asynchronous cancellation on the NasJob. The server + // makes a best effort to cancel the job, but success is not + // guaranteed. Clients can use + // [JobService.GetNasJob][google.cloud.aiplatform.v1.JobService.GetNasJob] or + // other methods to check whether the cancellation succeeded or whether the + // job completed despite cancellation. On successful cancellation, + // the NasJob is not deleted; instead it becomes a job with + // a [NasJob.error][google.cloud.aiplatform.v1.NasJob.error] value with a + // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + // `Code.CANCELLED`, and + // [NasJob.state][google.cloud.aiplatform.v1.NasJob.state] is set to + // `CANCELLED`. + rpc CancelNasJob(CancelNasJobRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/nasJobs/*}:cancel" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Gets a NasTrialDetail. + rpc GetNasTrialDetail(GetNasTrialDetailRequest) returns (NasTrialDetail) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/nasJobs/*/nasTrialDetails/*}" + }; + option (google.api.method_signature) = "name"; + } + + // List top NasTrialDetails of a NasJob. + rpc ListNasTrialDetails(ListNasTrialDetailsRequest) + returns (ListNasTrialDetailsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/nasJobs/*}/nasTrialDetails" + }; + option (google.api.method_signature) = "parent"; + } + // Creates a BatchPredictionJob. A BatchPredictionJob once created will // right away be attempted to start. rpc CreateBatchPredictionJob(CreateBatchPredictionJobRequest) @@ -752,6 +829,180 @@ message CancelHyperparameterTuningJobRequest { ]; } +// Request message for +// [JobService.CreateNasJob][google.cloud.aiplatform.v1.JobService.CreateNasJob]. +message CreateNasJobRequest { + // Required. The resource name of the Location to create the NasJob 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 NasJob to create. + NasJob nas_job = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for +// [JobService.GetNasJob][google.cloud.aiplatform.v1.JobService.GetNasJob]. +message GetNasJobRequest { + // Required. The name of the NasJob resource. + // Format: + // `projects/{project}/locations/{location}/nasJobs/{nas_job}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/NasJob" + } + ]; +} + +// Request message for +// [JobService.ListNasJobs][google.cloud.aiplatform.v1.JobService.ListNasJobs]. +message ListNasJobsRequest { + // Required. The resource name of the Location to list the NasJobs + // from. Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // The standard list filter. + // + // Supported fields: + // + // * `display_name` supports `=`, `!=` comparisons, and `:` wildcard. + // * `state` supports `=`, `!=` comparisons. + // * `create_time` supports `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons. + // `create_time` must be in RFC 3339 format. + // * `labels` supports general map functions that is: + // `labels.key=value` - key:value equality + // `labels.key:* - key existence + // + // Some examples of using the filter are: + // + // * `state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*"` + // * `state!="JOB_STATE_FAILED" OR display_name="my_job"` + // * `NOT display_name="my_job"` + // * `create_time>"2021-05-18T00:00:00Z"` + // * `labels.keyA=valueA` + // * `labels.keyB:*` + string filter = 2; + + // The standard list page size. + int32 page_size = 3; + + // The standard list page token. + // Typically obtained via + // [ListNasJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListNasJobsResponse.next_page_token] + // of the previous + // [JobService.ListNasJobs][google.cloud.aiplatform.v1.JobService.ListNasJobs] + // call. + string page_token = 4; + + // Mask specifying which fields to read. + google.protobuf.FieldMask read_mask = 5; +} + +// Response message for +// [JobService.ListNasJobs][google.cloud.aiplatform.v1.JobService.ListNasJobs] +message ListNasJobsResponse { + // List of NasJobs in the requested page. + // [NasJob.nas_job_output][google.cloud.aiplatform.v1.NasJob.nas_job_output] + // of the jobs will not be returned. + repeated NasJob nas_jobs = 1; + + // A token to retrieve the next page of results. + // Pass to + // [ListNasJobsRequest.page_token][google.cloud.aiplatform.v1.ListNasJobsRequest.page_token] + // to obtain that page. + string next_page_token = 2; +} + +// Request message for +// [JobService.DeleteNasJob][google.cloud.aiplatform.v1.JobService.DeleteNasJob]. +message DeleteNasJobRequest { + // Required. The name of the NasJob resource to be deleted. + // Format: + // `projects/{project}/locations/{location}/nasJobs/{nas_job}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/NasJob" + } + ]; +} + +// Request message for +// [JobService.CancelNasJob][google.cloud.aiplatform.v1.JobService.CancelNasJob]. +message CancelNasJobRequest { + // Required. The name of the NasJob to cancel. + // Format: + // `projects/{project}/locations/{location}/nasJobs/{nas_job}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/NasJob" + } + ]; +} + +// Request message for +// [JobService.GetNasTrialDetail][google.cloud.aiplatform.v1.JobService.GetNasTrialDetail]. +message GetNasTrialDetailRequest { + // Required. The name of the NasTrialDetail resource. + // Format: + // `projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/NasTrialDetail" + } + ]; +} + +// Request message for +// [JobService.ListNasTrialDetails][google.cloud.aiplatform.v1.JobService.ListNasTrialDetails]. +message ListNasTrialDetailsRequest { + // Required. The name of the NasJob resource. + // Format: + // `projects/{project}/locations/{location}/nasJobs/{nas_job}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/NasJob" + } + ]; + + // The standard list page size. + int32 page_size = 2; + + // The standard list page token. + // Typically obtained via + // [ListNasTrialDetailsResponse.next_page_token][google.cloud.aiplatform.v1.ListNasTrialDetailsResponse.next_page_token] + // of the previous + // [JobService.ListNasTrialDetails][google.cloud.aiplatform.v1.JobService.ListNasTrialDetails] + // call. + string page_token = 3; +} + +// Response message for +// [JobService.ListNasTrialDetails][google.cloud.aiplatform.v1.JobService.ListNasTrialDetails] +message ListNasTrialDetailsResponse { + // List of top NasTrials in the requested page. + repeated NasTrialDetail nas_trial_details = 1; + + // A token to retrieve the next page of results. + // Pass to + // [ListNasTrialDetailsRequest.page_token][google.cloud.aiplatform.v1.ListNasTrialDetailsRequest.page_token] + // to obtain that page. + string next_page_token = 2; +} + // Request message for // [JobService.CreateBatchPredictionJob][google.cloud.aiplatform.v1.JobService.CreateBatchPredictionJob]. message CreateBatchPredictionJobRequest { diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/model.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/model.proto index 33f27c73f80e..8ca72f5260b7 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/model.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/model.proto @@ -90,6 +90,19 @@ message Model { [(google.api.field_behavior) = OUTPUT_ONLY]; } + // Contains information about the original Model if this Model is a copy. + message OriginalModelInfo { + // Output only. The resource name of the Model this Model is a copy of, + // including the revision. Format: + // `projects/{project}/locations/{location}/models/{model_id}@{version_id}` + string model = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Model" + } + ]; + } + // Identifies a type of Model's prediction resources. enum DeploymentResourcesType { // Should not be used. @@ -376,6 +389,11 @@ message Model { ModelSourceInfo model_source_info = 38 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. If this Model is a copy of another Model, this contains info + // about the original. + OriginalModelInfo original_model_info = 34 + [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. The resource name of the Artifact that was created in // MetadataStore when creating the Model. The Artifact resource name pattern // is diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/model_service.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/model_service.proto index b2132ed39d01..4afe6afcac51 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/model_service.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/model_service.proto @@ -20,6 +20,7 @@ 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/encryption_spec.proto"; import "google/cloud/aiplatform/v1/io.proto"; import "google/cloud/aiplatform/v1/model.proto"; import "google/cloud/aiplatform/v1/model_evaluation.proto"; @@ -151,6 +152,24 @@ service ModelService { }; } + // Copies an already existing Vertex AI Model into the specified Location. + // The source Model must exist in the same Project. + // When copying custom Models, the users themselves are responsible for + // [Model.metadata][google.cloud.aiplatform.v1.Model.metadata] content to be + // region-agnostic, as well as making sure that any resources (e.g. files) it + // depends on remain accessible. + rpc CopyModel(CopyModelRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/models:copy" + body: "*" + }; + option (google.api.method_signature) = "parent,source_model"; + option (google.longrunning.operation_info) = { + response_type: "CopyModelResponse" + metadata_type: "CopyModelOperationMetadata" + }; + } + // Imports an externally generated ModelEvaluation. rpc ImportModelEvaluation(ImportModelEvaluationRequest) returns (ModelEvaluation) { @@ -580,6 +599,75 @@ message ExportModelOperationMetadata { // operation. message ExportModelResponse {} +// Request message for +// [ModelService.CopyModel][google.cloud.aiplatform.v1.ModelService.CopyModel]. +message CopyModelRequest { + // If both fields are unset, a new Model will be created with a generated ID. + oneof destination_model { + // Optional. Copy source_model into a new Model with this ID. The ID will + // become the final component of the model resource name. + // + // This value may be up to 63 characters, and valid characters are + // `[a-z0-9_-]`. The first character cannot be a number or hyphen. + string model_id = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specify this field to copy source_model into this existing + // Model as a new version. Format: + // `projects/{project}/locations/{location}/models/{model}` + string parent_model = 5 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Model" + } + ]; + } + + // Required. The resource name of the Location into which to copy the Model. + // 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 Model to copy. That Model must be in the + // same Project. Format: + // `projects/{project}/locations/{location}/models/{model}` + string source_model = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Model" + } + ]; + + // Customer-managed encryption key options. If this is set, + // then the Model copy will be encrypted with the provided encryption key. + EncryptionSpec encryption_spec = 3; +} + +// Details of +// [ModelService.CopyModel][google.cloud.aiplatform.v1.ModelService.CopyModel] +// operation. +message CopyModelOperationMetadata { + // The common part of the operation metadata. + GenericOperationMetadata generic_metadata = 1; +} + +// Response message of +// [ModelService.CopyModel][google.cloud.aiplatform.v1.ModelService.CopyModel] +// operation. +message CopyModelResponse { + // The name of the copied Model resource. + // Format: `projects/{project}/locations/{location}/models/{model}` + string model = 1 [(google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Model" + }]; + + // Output only. The version ID of the model that is copied. + string model_version_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + // Request message for // [ModelService.ImportModelEvaluation][google.cloud.aiplatform.v1.ModelService.ImportModelEvaluation] message ImportModelEvaluationRequest { diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/nas_job.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/nas_job.proto new file mode 100644 index 000000000000..f763b655f9f4 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/nas_job.proto @@ -0,0 +1,306 @@ +// 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.aiplatform.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/aiplatform/v1/custom_job.proto"; +import "google/cloud/aiplatform/v1/encryption_spec.proto"; +import "google/cloud/aiplatform/v1/job_state.proto"; +import "google/cloud/aiplatform/v1/study.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 = "NasJobProto"; +option java_package = "com.google.cloud.aiplatform.v1"; +option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; +option ruby_package = "Google::Cloud::AIPlatform::V1"; + +// Represents a Neural Architecture Search (NAS) job. +message NasJob { + option (google.api.resource) = { + type: "aiplatform.googleapis.com/NasJob" + pattern: "projects/{project}/locations/{location}/nasJobs/{nas_job}" + }; + + // Output only. Resource name of the NasJob. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The display name of the NasJob. + // 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]; + + // Required. The specification of a NasJob. + NasJobSpec nas_job_spec = 4 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Output of the NasJob. + NasJobOutput nas_job_output = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The detailed state of the job. + JobState state = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the NasJob was created. + google.protobuf.Timestamp create_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the NasJob 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 NasJob entered any of the following states: + // `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`. + google.protobuf.Timestamp end_time = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the NasJob 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]; + + // The labels with user-defined metadata to organize NasJobs. + // + // 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; + + // Customer-managed encryption key options for a NasJob. + // If this is set, then all resources created by the NasJob + // will be encrypted with the provided encryption key. + EncryptionSpec encryption_spec = 13; + + // Optional. Enable a separation of Custom model training + // and restricted image training for tenant project. + bool enable_restricted_image_training = 14 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Represents a NasTrial details along with it's parameters. If there is a +// corresponding train NasTrial, the train NasTrial is also returned. +message NasTrialDetail { + option (google.api.resource) = { + type: "aiplatform.googleapis.com/NasTrialDetail" + pattern: "projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}" + }; + + // Output only. Resource name of the NasTrialDetail. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The parameters for the NasJob NasTrial. + string parameters = 2; + + // The requested search NasTrial. + NasTrial search_trial = 3; + + // The train NasTrial corresponding to + // [search_trial][google.cloud.aiplatform.v1.NasTrialDetail.search_trial]. + // Only populated if + // [search_trial][google.cloud.aiplatform.v1.NasTrialDetail.search_trial] is + // used for training. + NasTrial train_trial = 4; +} + +// Represents the spec of a NasJob. +message NasJobSpec { + // The spec of multi-trial Neural Architecture Search (NAS). + message MultiTrialAlgorithmSpec { + // Represents a metric to optimize. + message MetricSpec { + // The available types of optimization goals. + enum GoalType { + // Goal Type will default to maximize. + GOAL_TYPE_UNSPECIFIED = 0; + + // Maximize the goal metric. + MAXIMIZE = 1; + + // Minimize the goal metric. + MINIMIZE = 2; + } + + // Required. The ID of the metric. Must not contain whitespaces. + string metric_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The optimization goal of the metric. + GoalType goal = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // Represent spec for search trials. + message SearchTrialSpec { + // Required. The spec of a search trial job. The same spec applies to + // all search trials. + CustomJobSpec search_trial_job_spec = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The maximum number of Neural Architecture Search (NAS) trials + // to run. + int32 max_trial_count = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The maximum number of trials to run in parallel. + int32 max_parallel_trial_count = 3 + [(google.api.field_behavior) = REQUIRED]; + + // The number of failed trials that need to be seen before failing + // the NasJob. + // + // If set to 0, Vertex AI decides how many trials must fail + // before the whole job fails. + int32 max_failed_trial_count = 4; + } + + // Represent spec for train trials. + message TrainTrialSpec { + // Required. The spec of a train trial job. The same spec applies to + // all train trials. + CustomJobSpec train_trial_job_spec = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The maximum number of trials to run in parallel. + int32 max_parallel_trial_count = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Frequency of search trials to start train stage. Top N + // [TrainTrialSpec.max_parallel_trial_count] + // search trials will be trained for every M + // [TrainTrialSpec.frequency] trials searched. + int32 frequency = 3 [(google.api.field_behavior) = REQUIRED]; + } + + // The available types of multi-trial algorithms. + enum MultiTrialAlgorithm { + // Defaults to `REINFORCEMENT_LEARNING`. + MULTI_TRIAL_ALGORITHM_UNSPECIFIED = 0; + + // The Reinforcement Learning Algorithm for Multi-trial Neural + // Architecture Search (NAS). + REINFORCEMENT_LEARNING = 1; + + // The Grid Search Algorithm for Multi-trial Neural + // Architecture Search (NAS). + GRID_SEARCH = 2; + } + + // The multi-trial Neural Architecture Search (NAS) algorithm + // type. Defaults to `REINFORCEMENT_LEARNING`. + MultiTrialAlgorithm multi_trial_algorithm = 1; + + // Metric specs for the NAS job. + // Validation for this field is done at `multi_trial_algorithm_spec` field. + MetricSpec metric = 2; + + // Required. Spec for search trials. + SearchTrialSpec search_trial_spec = 3 + [(google.api.field_behavior) = REQUIRED]; + + // Spec for train trials. Top N [TrainTrialSpec.max_parallel_trial_count] + // search trials will be trained for every M + // [TrainTrialSpec.frequency] trials searched. + TrainTrialSpec train_trial_spec = 4; + } + + // The Neural Architecture Search (NAS) algorithm specification. + oneof nas_algorithm_spec { + // The spec of multi-trial algorithms. + MultiTrialAlgorithmSpec multi_trial_algorithm_spec = 2; + } + + // The ID of the existing NasJob in the same Project and Location + // which will be used to resume search. search_space_spec and + // nas_algorithm_spec are obtained from previous NasJob hence should not + // provide them again for this NasJob. + string resume_nas_job_id = 3; + + // It defines the search space for Neural Architecture Search (NAS). + string search_space_spec = 1; +} + +// Represents a uCAIP NasJob output. +message NasJobOutput { + // The output of a multi-trial Neural Architecture Search (NAS) jobs. + message MultiTrialJobOutput { + // Output only. List of NasTrials that were started as part of search stage. + repeated NasTrial search_trials = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. List of NasTrials that were started as part of train stage. + repeated NasTrial train_trials = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // The output of this Neural Architecture Search (NAS) job. + oneof output { + // Output only. The output of this multi-trial Neural Architecture Search + // (NAS) job. + MultiTrialJobOutput multi_trial_job_output = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } +} + +// Represents a uCAIP NasJob trial. +message NasTrial { + // Describes a NasTrial state. + enum State { + // The NasTrial state is unspecified. + STATE_UNSPECIFIED = 0; + + // Indicates that a specific NasTrial has been requested, but it has not yet + // been suggested by the service. + REQUESTED = 1; + + // Indicates that the NasTrial has been suggested. + ACTIVE = 2; + + // Indicates that the NasTrial should stop according to the service. + STOPPING = 3; + + // Indicates that the NasTrial is completed successfully. + SUCCEEDED = 4; + + // Indicates that the NasTrial should not be attempted again. + // The service will set a NasTrial to INFEASIBLE when it's done but missing + // the final_measurement. + INFEASIBLE = 5; + } + + // Output only. The identifier of the NasTrial assigned by the service. + string id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The detailed state of the NasTrial. + State state = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The final measurement containing the objective value. + Measurement final_measurement = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the NasTrial was started. + google.protobuf.Timestamp start_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the NasTrial's status changed to `SUCCEEDED` or + // `INFEASIBLE`. + google.protobuf.Timestamp end_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/pipeline_job.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/pipeline_job.proto index 1b951f3b7fac..f0f6d2bb6a02 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/pipeline_job.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/pipeline_job.proto @@ -381,8 +381,6 @@ message PipelineTaskExecutorDetail { // The detailed info for a custom job executor. message CustomJobDetail { - option deprecated = true; - // Output only. The name of the // [CustomJob][google.cloud.aiplatform.v1.CustomJob]. string job = 1 [ @@ -391,6 +389,11 @@ message PipelineTaskExecutorDetail { type: "aiplatform.googleapis.com/CustomJob" } ]; + + // Output only. The names of the previously failed + // [CustomJob][google.cloud.aiplatform.v1.CustomJob]. The list includes the + // all attempts in chronological order. + repeated string failed_jobs = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } oneof details { @@ -400,6 +403,6 @@ message PipelineTaskExecutorDetail { // Output only. The detailed info for a custom job executor. CustomJobDetail custom_job_detail = 2 - [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; + [(google.api.field_behavior) = OUTPUT_ONLY]; } } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/service_networking.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/service_networking.proto new file mode 100644 index 000000000000..e8ae11b7a823 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/service_networking.proto @@ -0,0 +1,38 @@ +// 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.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 = "ServiceNetworkingProto"; +option java_package = "com.google.cloud.aiplatform.v1"; +option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; +option ruby_package = "Google::Cloud::AIPlatform::V1"; + +// Represents configuration for private service connect. +message PrivateServiceConnectConfig { + // Required. If true, expose the IndexEndpoint via private service connect. + bool enable_private_service_connect = 1 + [(google.api.field_behavior) = REQUIRED]; + + // A list of Projects from which the forwarding rule will target the service + // attachment. + repeated string project_allowlist = 2; +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/study.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/study.proto index cbdacda2d12d..4ef70dbeb245 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/study.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/proto/google/cloud/aiplatform/v1/study.proto @@ -199,6 +199,21 @@ message Trial { message StudySpec { // Represents a metric to optimize. message MetricSpec { + // Used in safe optimization to specify threshold levels and risk tolerance. + message SafetyMetricConfig { + // Safety threshold (boundary value between safe and unsafe). NOTE that if + // you leave SafetyMetricConfig unset, a default value of 0 will be used. + double safety_threshold = 1; + + // Desired minimum fraction of safe trials (over total number of trials) + // that should be targeted by the algorithm at any time during the + // study (best effort). This should be between 0.0 and 1.0 and a value of + // 0.0 means that there is no minimum and an algorithm proceeds without + // targeting any specific fraction. A value of 1.0 means that the + // algorithm attempts to only Suggest safe Trials. + optional double desired_min_safe_trials_fraction = 2; + } + // The available types of optimization goals. enum GoalType { // Goal Type will default to maximize. @@ -217,6 +232,10 @@ message StudySpec { // Required. The optimization goal of the metric. GoalType goal = 2 [(google.api.field_behavior) = REQUIRED]; + + // Used for safe search. In the case, the metric will be a safety + // metric. You must provide a separate metric for objective metric. + optional SafetyMetricConfig safety_config = 3; } // Represents a single parameter to optimize. diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CancelNasJobRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CancelNasJobRequest.java new file mode 100644 index 000000000000..4ac5d7528f2b --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CancelNasJobRequest.java @@ -0,0 +1,660 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/job_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Request message for
+ * [JobService.CancelNasJob][google.cloud.aiplatform.v1beta1.JobService.CancelNasJob].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.CancelNasJobRequest} + */ +public final class CancelNasJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.CancelNasJobRequest) + CancelNasJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CancelNasJobRequest.newBuilder() to construct. + private CancelNasJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CancelNasJobRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CancelNasJobRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CancelNasJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CancelNasJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.CancelNasJobRequest.class, + com.google.cloud.aiplatform.v1beta1.CancelNasJobRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the NasJob to cancel.
+   * Format:
+   * `projects/{project}/locations/{location}/nasJobs/{nas_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 NasJob to cancel.
+   * Format:
+   * `projects/{project}/locations/{location}/nasJobs/{nas_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.v1beta1.CancelNasJobRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.CancelNasJobRequest other = + (com.google.cloud.aiplatform.v1beta1.CancelNasJobRequest) 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.CancelNasJobRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.CancelNasJobRequest 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.CancelNasJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.CancelNasJobRequest 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.CancelNasJobRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.CancelNasJobRequest 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.CancelNasJobRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.CancelNasJobRequest 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.CancelNasJobRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.CancelNasJobRequest 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.CancelNasJobRequest 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.CancelNasJobRequest 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.CancelNasJobRequest 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
+   * [JobService.CancelNasJob][google.cloud.aiplatform.v1beta1.JobService.CancelNasJob].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.CancelNasJobRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.CancelNasJobRequest) + com.google.cloud.aiplatform.v1beta1.CancelNasJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CancelNasJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CancelNasJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.CancelNasJobRequest.class, + com.google.cloud.aiplatform.v1beta1.CancelNasJobRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.CancelNasJobRequest.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.JobServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CancelNasJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.CancelNasJobRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.CancelNasJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.CancelNasJobRequest build() { + com.google.cloud.aiplatform.v1beta1.CancelNasJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.CancelNasJobRequest buildPartial() { + com.google.cloud.aiplatform.v1beta1.CancelNasJobRequest result = + new com.google.cloud.aiplatform.v1beta1.CancelNasJobRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.CancelNasJobRequest 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.CancelNasJobRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.CancelNasJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.CancelNasJobRequest other) { + if (other == com.google.cloud.aiplatform.v1beta1.CancelNasJobRequest.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 NasJob to cancel.
+     * Format:
+     * `projects/{project}/locations/{location}/nasJobs/{nas_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 NasJob to cancel.
+     * Format:
+     * `projects/{project}/locations/{location}/nasJobs/{nas_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 NasJob to cancel.
+     * Format:
+     * `projects/{project}/locations/{location}/nasJobs/{nas_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 NasJob to cancel.
+     * Format:
+     * `projects/{project}/locations/{location}/nasJobs/{nas_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 NasJob to cancel.
+     * Format:
+     * `projects/{project}/locations/{location}/nasJobs/{nas_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.v1beta1.CancelNasJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.CancelNasJobRequest) + private static final com.google.cloud.aiplatform.v1beta1.CancelNasJobRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.CancelNasJobRequest(); + } + + public static com.google.cloud.aiplatform.v1beta1.CancelNasJobRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CancelNasJobRequest 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.CancelNasJobRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CancelNasJobRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CancelNasJobRequestOrBuilder.java new file mode 100644 index 000000000000..8c9bf3fd4681 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CancelNasJobRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/job_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +public interface CancelNasJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.CancelNasJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the NasJob to cancel.
+   * Format:
+   * `projects/{project}/locations/{location}/nasJobs/{nas_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 NasJob to cancel.
+   * Format:
+   * `projects/{project}/locations/{location}/nasJobs/{nas_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-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CopyModelOperationMetadata.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CopyModelOperationMetadata.java new file mode 100644 index 000000000000..c0b1c63acd67 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CopyModelOperationMetadata.java @@ -0,0 +1,730 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/model_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Details of
+ * [ModelService.CopyModel][google.cloud.aiplatform.v1beta1.ModelService.CopyModel]
+ * operation.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.CopyModelOperationMetadata} + */ +public final class CopyModelOperationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.CopyModelOperationMetadata) + CopyModelOperationMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use CopyModelOperationMetadata.newBuilder() to construct. + private CopyModelOperationMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CopyModelOperationMetadata() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CopyModelOperationMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CopyModelOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CopyModelOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.CopyModelOperationMetadata.class, + com.google.cloud.aiplatform.v1beta1.CopyModelOperationMetadata.Builder.class); + } + + public static final int GENERIC_METADATA_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata genericMetadata_; + /** + * + * + *
+   * The common part of the operation metadata.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + @java.lang.Override + public boolean hasGenericMetadata() { + return genericMetadata_ != null; + } + /** + * + * + *
+   * The common part of the operation metadata.
+   * 
+ * + * .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 common part of the operation metadata.
+   * 
+ * + * .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 (genericMetadata_ != null) { + output.writeMessage(1, getGenericMetadata()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (genericMetadata_ != null) { + 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.CopyModelOperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.CopyModelOperationMetadata other = + (com.google.cloud.aiplatform.v1beta1.CopyModelOperationMetadata) 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.CopyModelOperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.CopyModelOperationMetadata 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.CopyModelOperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.CopyModelOperationMetadata 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.CopyModelOperationMetadata parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.CopyModelOperationMetadata 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.CopyModelOperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.CopyModelOperationMetadata 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.CopyModelOperationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.CopyModelOperationMetadata 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.CopyModelOperationMetadata 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.CopyModelOperationMetadata 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.CopyModelOperationMetadata 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
+   * [ModelService.CopyModel][google.cloud.aiplatform.v1beta1.ModelService.CopyModel]
+   * operation.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.CopyModelOperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.CopyModelOperationMetadata) + com.google.cloud.aiplatform.v1beta1.CopyModelOperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CopyModelOperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CopyModelOperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.CopyModelOperationMetadata.class, + com.google.cloud.aiplatform.v1beta1.CopyModelOperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.CopyModelOperationMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @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.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CopyModelOperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.CopyModelOperationMetadata + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.CopyModelOperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.CopyModelOperationMetadata build() { + com.google.cloud.aiplatform.v1beta1.CopyModelOperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.CopyModelOperationMetadata buildPartial() { + com.google.cloud.aiplatform.v1beta1.CopyModelOperationMetadata result = + new com.google.cloud.aiplatform.v1beta1.CopyModelOperationMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1beta1.CopyModelOperationMetadata result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.genericMetadata_ = + genericMetadataBuilder_ == null ? genericMetadata_ : genericMetadataBuilder_.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.CopyModelOperationMetadata) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.CopyModelOperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.CopyModelOperationMetadata other) { + if (other + == com.google.cloud.aiplatform.v1beta1.CopyModelOperationMetadata.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 common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + public boolean hasGenericMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .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 common part of the operation metadata.
+     * 
+ * + * .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 common part of the operation metadata.
+     * 
+ * + * .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 common part of the operation metadata.
+     * 
+ * + * .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); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .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 common part of the operation metadata.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + */ + public com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata.Builder + getGenericMetadataBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getGenericMetadataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The common part of the operation metadata.
+     * 
+ * + * .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 common part of the operation metadata.
+     * 
+ * + * .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.CopyModelOperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.CopyModelOperationMetadata) + private static final com.google.cloud.aiplatform.v1beta1.CopyModelOperationMetadata + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.CopyModelOperationMetadata(); + } + + public static com.google.cloud.aiplatform.v1beta1.CopyModelOperationMetadata + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CopyModelOperationMetadata 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.CopyModelOperationMetadata + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CopyModelOperationMetadataOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CopyModelOperationMetadataOrBuilder.java new file mode 100644 index 000000000000..a0b80e344fea --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CopyModelOperationMetadataOrBuilder.java @@ -0,0 +1,61 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/model_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +public interface CopyModelOperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.CopyModelOperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The common part of the operation metadata.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return Whether the genericMetadata field is set. + */ + boolean hasGenericMetadata(); + /** + * + * + *
+   * The common part of the operation metadata.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.GenericOperationMetadata generic_metadata = 1; + * + * @return The genericMetadata. + */ + com.google.cloud.aiplatform.v1beta1.GenericOperationMetadata getGenericMetadata(); + /** + * + * + *
+   * The common part of the operation metadata.
+   * 
+ * + * .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/CopyModelRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CopyModelRequest.java new file mode 100644 index 000000000000..731201fc1484 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CopyModelRequest.java @@ -0,0 +1,1751 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/model_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Request message for
+ * [ModelService.CopyModel][google.cloud.aiplatform.v1beta1.ModelService.CopyModel].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.CopyModelRequest} + */ +public final class CopyModelRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.CopyModelRequest) + CopyModelRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CopyModelRequest.newBuilder() to construct. + private CopyModelRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CopyModelRequest() { + parent_ = ""; + sourceModel_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CopyModelRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CopyModelRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CopyModelRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.CopyModelRequest.class, + com.google.cloud.aiplatform.v1beta1.CopyModelRequest.Builder.class); + } + + private int destinationModelCase_ = 0; + private java.lang.Object destinationModel_; + + public enum DestinationModelCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + MODEL_ID(4), + PARENT_MODEL(5), + DESTINATIONMODEL_NOT_SET(0); + private final int value; + + private DestinationModelCase(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 DestinationModelCase valueOf(int value) { + return forNumber(value); + } + + public static DestinationModelCase forNumber(int value) { + switch (value) { + case 4: + return MODEL_ID; + case 5: + return PARENT_MODEL; + case 0: + return DESTINATIONMODEL_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public DestinationModelCase getDestinationModelCase() { + return DestinationModelCase.forNumber(destinationModelCase_); + } + + public static final int MODEL_ID_FIELD_NUMBER = 4; + /** + * + * + *
+   * Optional. Copy source_model into a new Model with this ID. The ID will
+   * become the final component of the model resource name.
+   * This value may be up to 63 characters, and valid characters are
+   * `[a-z0-9_-]`. The first character cannot be a number or hyphen.
+   * 
+ * + * string model_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the modelId field is set. + */ + public boolean hasModelId() { + return destinationModelCase_ == 4; + } + /** + * + * + *
+   * Optional. Copy source_model into a new Model with this ID. The ID will
+   * become the final component of the model resource name.
+   * This value may be up to 63 characters, and valid characters are
+   * `[a-z0-9_-]`. The first character cannot be a number or hyphen.
+   * 
+ * + * string model_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The modelId. + */ + public java.lang.String getModelId() { + java.lang.Object ref = ""; + if (destinationModelCase_ == 4) { + ref = destinationModel_; + } + 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 (destinationModelCase_ == 4) { + destinationModel_ = s; + } + return s; + } + } + /** + * + * + *
+   * Optional. Copy source_model into a new Model with this ID. The ID will
+   * become the final component of the model resource name.
+   * This value may be up to 63 characters, and valid characters are
+   * `[a-z0-9_-]`. The first character cannot be a number or hyphen.
+   * 
+ * + * string model_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for modelId. + */ + public com.google.protobuf.ByteString getModelIdBytes() { + java.lang.Object ref = ""; + if (destinationModelCase_ == 4) { + ref = destinationModel_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (destinationModelCase_ == 4) { + destinationModel_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARENT_MODEL_FIELD_NUMBER = 5; + /** + * + * + *
+   * Optional. Specify this field to copy source_model into this existing
+   * Model as a new version. Format:
+   * `projects/{project}/locations/{location}/models/{model}`
+   * 
+ * + * + * string parent_model = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return Whether the parentModel field is set. + */ + public boolean hasParentModel() { + return destinationModelCase_ == 5; + } + /** + * + * + *
+   * Optional. Specify this field to copy source_model into this existing
+   * Model as a new version. Format:
+   * `projects/{project}/locations/{location}/models/{model}`
+   * 
+ * + * + * string parent_model = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The parentModel. + */ + public java.lang.String getParentModel() { + java.lang.Object ref = ""; + if (destinationModelCase_ == 5) { + ref = destinationModel_; + } + 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 (destinationModelCase_ == 5) { + destinationModel_ = s; + } + return s; + } + } + /** + * + * + *
+   * Optional. Specify this field to copy source_model into this existing
+   * Model as a new version. Format:
+   * `projects/{project}/locations/{location}/models/{model}`
+   * 
+ * + * + * string parent_model = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parentModel. + */ + public com.google.protobuf.ByteString getParentModelBytes() { + java.lang.Object ref = ""; + if (destinationModelCase_ == 5) { + ref = destinationModel_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (destinationModelCase_ == 5) { + destinationModel_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The resource name of the Location into which to copy the Model.
+   * 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 into which to copy the Model.
+   * 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 SOURCE_MODEL_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object sourceModel_ = ""; + /** + * + * + *
+   * Required. The resource name of the Model to copy. That Model must be in the
+   * same Project. Format:
+   * `projects/{project}/locations/{location}/models/{model}`
+   * 
+ * + * + * string source_model = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The sourceModel. + */ + @java.lang.Override + public java.lang.String getSourceModel() { + java.lang.Object 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(); + sourceModel_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the Model to copy. That Model must be in the
+   * same Project. Format:
+   * `projects/{project}/locations/{location}/models/{model}`
+   * 
+ * + * + * string source_model = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for sourceModel. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceModelBytes() { + java.lang.Object ref = sourceModel_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceModel_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENCRYPTION_SPEC_FIELD_NUMBER = 3; + private com.google.cloud.aiplatform.v1beta1.EncryptionSpec encryptionSpec_; + /** + * + * + *
+   * Customer-managed encryption key options. If this is set,
+   * then the Model copy will be encrypted with the provided encryption key.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.EncryptionSpec encryption_spec = 3; + * + * @return Whether the encryptionSpec field is set. + */ + @java.lang.Override + public boolean hasEncryptionSpec() { + return encryptionSpec_ != null; + } + /** + * + * + *
+   * Customer-managed encryption key options. If this is set,
+   * then the Model copy will be encrypted with the provided encryption key.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.EncryptionSpec encryption_spec = 3; + * + * @return The encryptionSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.EncryptionSpec getEncryptionSpec() { + return encryptionSpec_ == null + ? com.google.cloud.aiplatform.v1beta1.EncryptionSpec.getDefaultInstance() + : encryptionSpec_; + } + /** + * + * + *
+   * Customer-managed encryption key options. If this is set,
+   * then the Model copy will be encrypted with the provided encryption key.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.EncryptionSpec encryption_spec = 3; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.EncryptionSpecOrBuilder getEncryptionSpecOrBuilder() { + return encryptionSpec_ == null + ? com.google.cloud.aiplatform.v1beta1.EncryptionSpec.getDefaultInstance() + : encryptionSpec_; + } + + 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(sourceModel_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, sourceModel_); + } + if (encryptionSpec_ != null) { + output.writeMessage(3, getEncryptionSpec()); + } + if (destinationModelCase_ == 4) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, destinationModel_); + } + if (destinationModelCase_ == 5) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, destinationModel_); + } + 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(sourceModel_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, sourceModel_); + } + if (encryptionSpec_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getEncryptionSpec()); + } + if (destinationModelCase_ == 4) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, destinationModel_); + } + if (destinationModelCase_ == 5) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, destinationModel_); + } + 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.CopyModelRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.CopyModelRequest other = + (com.google.cloud.aiplatform.v1beta1.CopyModelRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getSourceModel().equals(other.getSourceModel())) return false; + if (hasEncryptionSpec() != other.hasEncryptionSpec()) return false; + if (hasEncryptionSpec()) { + if (!getEncryptionSpec().equals(other.getEncryptionSpec())) return false; + } + if (!getDestinationModelCase().equals(other.getDestinationModelCase())) return false; + switch (destinationModelCase_) { + case 4: + if (!getModelId().equals(other.getModelId())) return false; + break; + case 5: + if (!getParentModel().equals(other.getParentModel())) 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(); + hash = (37 * hash) + SOURCE_MODEL_FIELD_NUMBER; + hash = (53 * hash) + getSourceModel().hashCode(); + if (hasEncryptionSpec()) { + hash = (37 * hash) + ENCRYPTION_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getEncryptionSpec().hashCode(); + } + switch (destinationModelCase_) { + case 4: + hash = (37 * hash) + MODEL_ID_FIELD_NUMBER; + hash = (53 * hash) + getModelId().hashCode(); + break; + case 5: + hash = (37 * hash) + PARENT_MODEL_FIELD_NUMBER; + hash = (53 * hash) + getParentModel().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.CopyModelRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.CopyModelRequest 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.CopyModelRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.CopyModelRequest 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.CopyModelRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.CopyModelRequest 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.CopyModelRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.CopyModelRequest 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.CopyModelRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.CopyModelRequest 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.CopyModelRequest 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.CopyModelRequest 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.CopyModelRequest 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
+   * [ModelService.CopyModel][google.cloud.aiplatform.v1beta1.ModelService.CopyModel].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.CopyModelRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.CopyModelRequest) + com.google.cloud.aiplatform.v1beta1.CopyModelRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CopyModelRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CopyModelRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.CopyModelRequest.class, + com.google.cloud.aiplatform.v1beta1.CopyModelRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.CopyModelRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + sourceModel_ = ""; + encryptionSpec_ = null; + if (encryptionSpecBuilder_ != null) { + encryptionSpecBuilder_.dispose(); + encryptionSpecBuilder_ = null; + } + destinationModelCase_ = 0; + destinationModel_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CopyModelRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.CopyModelRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.CopyModelRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.CopyModelRequest build() { + com.google.cloud.aiplatform.v1beta1.CopyModelRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.CopyModelRequest buildPartial() { + com.google.cloud.aiplatform.v1beta1.CopyModelRequest result = + new com.google.cloud.aiplatform.v1beta1.CopyModelRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.CopyModelRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.sourceModel_ = sourceModel_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.encryptionSpec_ = + encryptionSpecBuilder_ == null ? encryptionSpec_ : encryptionSpecBuilder_.build(); + } + } + + private void buildPartialOneofs(com.google.cloud.aiplatform.v1beta1.CopyModelRequest result) { + result.destinationModelCase_ = destinationModelCase_; + result.destinationModel_ = this.destinationModel_; + } + + @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.CopyModelRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.CopyModelRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.CopyModelRequest other) { + if (other == com.google.cloud.aiplatform.v1beta1.CopyModelRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getSourceModel().isEmpty()) { + sourceModel_ = other.sourceModel_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.hasEncryptionSpec()) { + mergeEncryptionSpec(other.getEncryptionSpec()); + } + switch (other.getDestinationModelCase()) { + case MODEL_ID: + { + destinationModelCase_ = 4; + destinationModel_ = other.destinationModel_; + onChanged(); + break; + } + case PARENT_MODEL: + { + destinationModelCase_ = 5; + destinationModel_ = other.destinationModel_; + onChanged(); + break; + } + case DESTINATIONMODEL_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_ |= 0x00000004; + break; + } // case 10 + case 18: + { + sourceModel_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 18 + case 26: + { + input.readMessage(getEncryptionSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + destinationModelCase_ = 4; + destinationModel_ = s; + break; + } // case 34 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + destinationModelCase_ = 5; + destinationModel_ = s; + 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 destinationModelCase_ = 0; + private java.lang.Object destinationModel_; + + public DestinationModelCase getDestinationModelCase() { + return DestinationModelCase.forNumber(destinationModelCase_); + } + + public Builder clearDestinationModel() { + destinationModelCase_ = 0; + destinationModel_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * Optional. Copy source_model into a new Model with this ID. The ID will
+     * become the final component of the model resource name.
+     * This value may be up to 63 characters, and valid characters are
+     * `[a-z0-9_-]`. The first character cannot be a number or hyphen.
+     * 
+ * + * string model_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the modelId field is set. + */ + @java.lang.Override + public boolean hasModelId() { + return destinationModelCase_ == 4; + } + /** + * + * + *
+     * Optional. Copy source_model into a new Model with this ID. The ID will
+     * become the final component of the model resource name.
+     * This value may be up to 63 characters, and valid characters are
+     * `[a-z0-9_-]`. The first character cannot be a number or hyphen.
+     * 
+ * + * string model_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The modelId. + */ + @java.lang.Override + public java.lang.String getModelId() { + java.lang.Object ref = ""; + if (destinationModelCase_ == 4) { + ref = destinationModel_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (destinationModelCase_ == 4) { + destinationModel_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Copy source_model into a new Model with this ID. The ID will
+     * become the final component of the model resource name.
+     * This value may be up to 63 characters, and valid characters are
+     * `[a-z0-9_-]`. The first character cannot be a number or hyphen.
+     * 
+ * + * string model_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for modelId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getModelIdBytes() { + java.lang.Object ref = ""; + if (destinationModelCase_ == 4) { + ref = destinationModel_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (destinationModelCase_ == 4) { + destinationModel_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Copy source_model into a new Model with this ID. The ID will
+     * become the final component of the model resource name.
+     * This value may be up to 63 characters, and valid characters are
+     * `[a-z0-9_-]`. The first character cannot be a number or hyphen.
+     * 
+ * + * string model_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The modelId to set. + * @return This builder for chaining. + */ + public Builder setModelId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + destinationModelCase_ = 4; + destinationModel_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Copy source_model into a new Model with this ID. The ID will
+     * become the final component of the model resource name.
+     * This value may be up to 63 characters, and valid characters are
+     * `[a-z0-9_-]`. The first character cannot be a number or hyphen.
+     * 
+ * + * string model_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearModelId() { + if (destinationModelCase_ == 4) { + destinationModelCase_ = 0; + destinationModel_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. Copy source_model into a new Model with this ID. The ID will
+     * become the final component of the model resource name.
+     * This value may be up to 63 characters, and valid characters are
+     * `[a-z0-9_-]`. The first character cannot be a number or hyphen.
+     * 
+ * + * string model_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for modelId to set. + * @return This builder for chaining. + */ + public Builder setModelIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + destinationModelCase_ = 4; + destinationModel_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Specify this field to copy source_model into this existing
+     * Model as a new version. Format:
+     * `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * + * string parent_model = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return Whether the parentModel field is set. + */ + @java.lang.Override + public boolean hasParentModel() { + return destinationModelCase_ == 5; + } + /** + * + * + *
+     * Optional. Specify this field to copy source_model into this existing
+     * Model as a new version. Format:
+     * `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * + * string parent_model = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The parentModel. + */ + @java.lang.Override + public java.lang.String getParentModel() { + java.lang.Object ref = ""; + if (destinationModelCase_ == 5) { + ref = destinationModel_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (destinationModelCase_ == 5) { + destinationModel_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Specify this field to copy source_model into this existing
+     * Model as a new version. Format:
+     * `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * + * string parent_model = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parentModel. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentModelBytes() { + java.lang.Object ref = ""; + if (destinationModelCase_ == 5) { + ref = destinationModel_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (destinationModelCase_ == 5) { + destinationModel_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Specify this field to copy source_model into this existing
+     * Model as a new version. Format:
+     * `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * + * string parent_model = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The parentModel to set. + * @return This builder for chaining. + */ + public Builder setParentModel(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + destinationModelCase_ = 5; + destinationModel_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Specify this field to copy source_model into this existing
+     * Model as a new version. Format:
+     * `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * + * string parent_model = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParentModel() { + if (destinationModelCase_ == 5) { + destinationModelCase_ = 0; + destinationModel_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. Specify this field to copy source_model into this existing
+     * Model as a new version. Format:
+     * `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * + * string parent_model = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parentModel to set. + * @return This builder for chaining. + */ + public Builder setParentModelBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + destinationModelCase_ = 5; + destinationModel_ = value; + onChanged(); + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the Location into which to copy the Model.
+     * 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 into which to copy the Model.
+     * 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 into which to copy the Model.
+     * 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_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location into which to copy the Model.
+     * 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_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location into which to copy the Model.
+     * 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_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object sourceModel_ = ""; + /** + * + * + *
+     * Required. The resource name of the Model to copy. That Model must be in the
+     * same Project. Format:
+     * `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * + * string source_model = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The sourceModel. + */ + public java.lang.String getSourceModel() { + java.lang.Object ref = sourceModel_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceModel_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Model to copy. That Model must be in the
+     * same Project. Format:
+     * `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * + * string source_model = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for sourceModel. + */ + public com.google.protobuf.ByteString getSourceModelBytes() { + java.lang.Object ref = sourceModel_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceModel_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Model to copy. That Model must be in the
+     * same Project. Format:
+     * `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * + * string source_model = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The sourceModel to set. + * @return This builder for chaining. + */ + public Builder setSourceModel(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sourceModel_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Model to copy. That Model must be in the
+     * same Project. Format:
+     * `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * + * string source_model = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearSourceModel() { + sourceModel_ = getDefaultInstance().getSourceModel(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Model to copy. That Model must be in the
+     * same Project. Format:
+     * `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * + * string source_model = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for sourceModel to set. + * @return This builder for chaining. + */ + public Builder setSourceModelBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sourceModel_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1beta1.EncryptionSpec encryptionSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.EncryptionSpec, + com.google.cloud.aiplatform.v1beta1.EncryptionSpec.Builder, + com.google.cloud.aiplatform.v1beta1.EncryptionSpecOrBuilder> + encryptionSpecBuilder_; + /** + * + * + *
+     * Customer-managed encryption key options. If this is set,
+     * then the Model copy will be encrypted with the provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.EncryptionSpec encryption_spec = 3; + * + * @return Whether the encryptionSpec field is set. + */ + public boolean hasEncryptionSpec() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Customer-managed encryption key options. If this is set,
+     * then the Model copy will be encrypted with the provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.EncryptionSpec encryption_spec = 3; + * + * @return The encryptionSpec. + */ + public com.google.cloud.aiplatform.v1beta1.EncryptionSpec getEncryptionSpec() { + if (encryptionSpecBuilder_ == null) { + return encryptionSpec_ == null + ? com.google.cloud.aiplatform.v1beta1.EncryptionSpec.getDefaultInstance() + : encryptionSpec_; + } else { + return encryptionSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Customer-managed encryption key options. If this is set,
+     * then the Model copy will be encrypted with the provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.EncryptionSpec encryption_spec = 3; + */ + public Builder setEncryptionSpec(com.google.cloud.aiplatform.v1beta1.EncryptionSpec value) { + if (encryptionSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + encryptionSpec_ = value; + } else { + encryptionSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Customer-managed encryption key options. If this is set,
+     * then the Model copy will be encrypted with the provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.EncryptionSpec encryption_spec = 3; + */ + public Builder setEncryptionSpec( + com.google.cloud.aiplatform.v1beta1.EncryptionSpec.Builder builderForValue) { + if (encryptionSpecBuilder_ == null) { + encryptionSpec_ = builderForValue.build(); + } else { + encryptionSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Customer-managed encryption key options. If this is set,
+     * then the Model copy will be encrypted with the provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.EncryptionSpec encryption_spec = 3; + */ + public Builder mergeEncryptionSpec(com.google.cloud.aiplatform.v1beta1.EncryptionSpec value) { + if (encryptionSpecBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && encryptionSpec_ != null + && encryptionSpec_ + != com.google.cloud.aiplatform.v1beta1.EncryptionSpec.getDefaultInstance()) { + getEncryptionSpecBuilder().mergeFrom(value); + } else { + encryptionSpec_ = value; + } + } else { + encryptionSpecBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Customer-managed encryption key options. If this is set,
+     * then the Model copy will be encrypted with the provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.EncryptionSpec encryption_spec = 3; + */ + public Builder clearEncryptionSpec() { + bitField0_ = (bitField0_ & ~0x00000010); + encryptionSpec_ = null; + if (encryptionSpecBuilder_ != null) { + encryptionSpecBuilder_.dispose(); + encryptionSpecBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Customer-managed encryption key options. If this is set,
+     * then the Model copy will be encrypted with the provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.EncryptionSpec encryption_spec = 3; + */ + public com.google.cloud.aiplatform.v1beta1.EncryptionSpec.Builder getEncryptionSpecBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getEncryptionSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Customer-managed encryption key options. If this is set,
+     * then the Model copy will be encrypted with the provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.EncryptionSpec encryption_spec = 3; + */ + public com.google.cloud.aiplatform.v1beta1.EncryptionSpecOrBuilder + getEncryptionSpecOrBuilder() { + if (encryptionSpecBuilder_ != null) { + return encryptionSpecBuilder_.getMessageOrBuilder(); + } else { + return encryptionSpec_ == null + ? com.google.cloud.aiplatform.v1beta1.EncryptionSpec.getDefaultInstance() + : encryptionSpec_; + } + } + /** + * + * + *
+     * Customer-managed encryption key options. If this is set,
+     * then the Model copy will be encrypted with the provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.EncryptionSpec encryption_spec = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.EncryptionSpec, + com.google.cloud.aiplatform.v1beta1.EncryptionSpec.Builder, + com.google.cloud.aiplatform.v1beta1.EncryptionSpecOrBuilder> + getEncryptionSpecFieldBuilder() { + if (encryptionSpecBuilder_ == null) { + encryptionSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.EncryptionSpec, + com.google.cloud.aiplatform.v1beta1.EncryptionSpec.Builder, + com.google.cloud.aiplatform.v1beta1.EncryptionSpecOrBuilder>( + getEncryptionSpec(), getParentForChildren(), isClean()); + encryptionSpec_ = null; + } + return encryptionSpecBuilder_; + } + + @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.CopyModelRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.CopyModelRequest) + private static final com.google.cloud.aiplatform.v1beta1.CopyModelRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.CopyModelRequest(); + } + + public static com.google.cloud.aiplatform.v1beta1.CopyModelRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CopyModelRequest 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.CopyModelRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CopyModelRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CopyModelRequestOrBuilder.java new file mode 100644 index 000000000000..c3d435778342 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CopyModelRequestOrBuilder.java @@ -0,0 +1,225 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/model_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +public interface CopyModelRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.CopyModelRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Copy source_model into a new Model with this ID. The ID will
+   * become the final component of the model resource name.
+   * This value may be up to 63 characters, and valid characters are
+   * `[a-z0-9_-]`. The first character cannot be a number or hyphen.
+   * 
+ * + * string model_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the modelId field is set. + */ + boolean hasModelId(); + /** + * + * + *
+   * Optional. Copy source_model into a new Model with this ID. The ID will
+   * become the final component of the model resource name.
+   * This value may be up to 63 characters, and valid characters are
+   * `[a-z0-9_-]`. The first character cannot be a number or hyphen.
+   * 
+ * + * string model_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The modelId. + */ + java.lang.String getModelId(); + /** + * + * + *
+   * Optional. Copy source_model into a new Model with this ID. The ID will
+   * become the final component of the model resource name.
+   * This value may be up to 63 characters, and valid characters are
+   * `[a-z0-9_-]`. The first character cannot be a number or hyphen.
+   * 
+ * + * string model_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for modelId. + */ + com.google.protobuf.ByteString getModelIdBytes(); + + /** + * + * + *
+   * Optional. Specify this field to copy source_model into this existing
+   * Model as a new version. Format:
+   * `projects/{project}/locations/{location}/models/{model}`
+   * 
+ * + * + * string parent_model = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return Whether the parentModel field is set. + */ + boolean hasParentModel(); + /** + * + * + *
+   * Optional. Specify this field to copy source_model into this existing
+   * Model as a new version. Format:
+   * `projects/{project}/locations/{location}/models/{model}`
+   * 
+ * + * + * string parent_model = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The parentModel. + */ + java.lang.String getParentModel(); + /** + * + * + *
+   * Optional. Specify this field to copy source_model into this existing
+   * Model as a new version. Format:
+   * `projects/{project}/locations/{location}/models/{model}`
+   * 
+ * + * + * string parent_model = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parentModel. + */ + com.google.protobuf.ByteString getParentModelBytes(); + + /** + * + * + *
+   * Required. The resource name of the Location into which to copy the Model.
+   * 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 into which to copy the Model.
+   * 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 Model to copy. That Model must be in the
+   * same Project. Format:
+   * `projects/{project}/locations/{location}/models/{model}`
+   * 
+ * + * + * string source_model = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The sourceModel. + */ + java.lang.String getSourceModel(); + /** + * + * + *
+   * Required. The resource name of the Model to copy. That Model must be in the
+   * same Project. Format:
+   * `projects/{project}/locations/{location}/models/{model}`
+   * 
+ * + * + * string source_model = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for sourceModel. + */ + com.google.protobuf.ByteString getSourceModelBytes(); + + /** + * + * + *
+   * Customer-managed encryption key options. If this is set,
+   * then the Model copy will be encrypted with the provided encryption key.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.EncryptionSpec encryption_spec = 3; + * + * @return Whether the encryptionSpec field is set. + */ + boolean hasEncryptionSpec(); + /** + * + * + *
+   * Customer-managed encryption key options. If this is set,
+   * then the Model copy will be encrypted with the provided encryption key.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.EncryptionSpec encryption_spec = 3; + * + * @return The encryptionSpec. + */ + com.google.cloud.aiplatform.v1beta1.EncryptionSpec getEncryptionSpec(); + /** + * + * + *
+   * Customer-managed encryption key options. If this is set,
+   * then the Model copy will be encrypted with the provided encryption key.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.EncryptionSpec encryption_spec = 3; + */ + com.google.cloud.aiplatform.v1beta1.EncryptionSpecOrBuilder getEncryptionSpecOrBuilder(); + + public com.google.cloud.aiplatform.v1beta1.CopyModelRequest.DestinationModelCase + getDestinationModelCase(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CopyModelResponse.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CopyModelResponse.java new file mode 100644 index 000000000000..30e1ea2024ea --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CopyModelResponse.java @@ -0,0 +1,823 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/model_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Response message of
+ * [ModelService.CopyModel][google.cloud.aiplatform.v1beta1.ModelService.CopyModel]
+ * operation.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.CopyModelResponse} + */ +public final class CopyModelResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.CopyModelResponse) + CopyModelResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use CopyModelResponse.newBuilder() to construct. + private CopyModelResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CopyModelResponse() { + model_ = ""; + modelVersionId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CopyModelResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CopyModelResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CopyModelResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.CopyModelResponse.class, + com.google.cloud.aiplatform.v1beta1.CopyModelResponse.Builder.class); + } + + public static final int MODEL_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object model_ = ""; + /** + * + * + *
+   * The name of the copied Model resource.
+   * Format: `projects/{project}/locations/{location}/models/{model}`
+   * 
+ * + * string model = 1 [(.google.api.resource_reference) = { ... } + * + * @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 name of the copied Model resource.
+   * Format: `projects/{project}/locations/{location}/models/{model}`
+   * 
+ * + * string model = 1 [(.google.api.resource_reference) = { ... } + * + * @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 MODEL_VERSION_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object modelVersionId_ = ""; + /** + * + * + *
+   * Output only. The version ID of the model that is copied.
+   * 
+ * + * string model_version_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The modelVersionId. + */ + @java.lang.Override + public java.lang.String getModelVersionId() { + java.lang.Object ref = modelVersionId_; + 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(); + modelVersionId_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The version ID of the model that is copied.
+   * 
+ * + * string model_version_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for modelVersionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getModelVersionIdBytes() { + java.lang.Object ref = modelVersionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + modelVersionId_ = 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(model_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, model_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(modelVersionId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, modelVersionId_); + } + 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(model_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, model_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(modelVersionId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, modelVersionId_); + } + 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.CopyModelResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.CopyModelResponse other = + (com.google.cloud.aiplatform.v1beta1.CopyModelResponse) obj; + + if (!getModel().equals(other.getModel())) return false; + if (!getModelVersionId().equals(other.getModelVersionId())) 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) + MODEL_FIELD_NUMBER; + hash = (53 * hash) + getModel().hashCode(); + hash = (37 * hash) + MODEL_VERSION_ID_FIELD_NUMBER; + hash = (53 * hash) + getModelVersionId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.CopyModelResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.CopyModelResponse 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.CopyModelResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.CopyModelResponse 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.CopyModelResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.CopyModelResponse 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.CopyModelResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.CopyModelResponse 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.CopyModelResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.CopyModelResponse 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.CopyModelResponse 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.CopyModelResponse 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.CopyModelResponse 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 of
+   * [ModelService.CopyModel][google.cloud.aiplatform.v1beta1.ModelService.CopyModel]
+   * operation.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.CopyModelResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.CopyModelResponse) + com.google.cloud.aiplatform.v1beta1.CopyModelResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CopyModelResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CopyModelResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.CopyModelResponse.class, + com.google.cloud.aiplatform.v1beta1.CopyModelResponse.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.CopyModelResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + model_ = ""; + modelVersionId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.ModelServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CopyModelResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.CopyModelResponse getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.CopyModelResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.CopyModelResponse build() { + com.google.cloud.aiplatform.v1beta1.CopyModelResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.CopyModelResponse buildPartial() { + com.google.cloud.aiplatform.v1beta1.CopyModelResponse result = + new com.google.cloud.aiplatform.v1beta1.CopyModelResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.CopyModelResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.model_ = model_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.modelVersionId_ = modelVersionId_; + } + } + + @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.CopyModelResponse) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.CopyModelResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.CopyModelResponse other) { + if (other == com.google.cloud.aiplatform.v1beta1.CopyModelResponse.getDefaultInstance()) + return this; + if (!other.getModel().isEmpty()) { + model_ = other.model_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getModelVersionId().isEmpty()) { + modelVersionId_ = other.modelVersionId_; + 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: + { + model_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + modelVersionId_ = 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 model_ = ""; + /** + * + * + *
+     * The name of the copied Model resource.
+     * Format: `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * string model = 1 [(.google.api.resource_reference) = { ... } + * + * @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 name of the copied Model resource.
+     * Format: `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * string model = 1 [(.google.api.resource_reference) = { ... } + * + * @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 name of the copied Model resource.
+     * Format: `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * string model = 1 [(.google.api.resource_reference) = { ... } + * + * @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_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the copied Model resource.
+     * Format: `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * string model = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearModel() { + model_ = getDefaultInstance().getModel(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the copied Model resource.
+     * Format: `projects/{project}/locations/{location}/models/{model}`
+     * 
+ * + * string model = 1 [(.google.api.resource_reference) = { ... } + * + * @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_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object modelVersionId_ = ""; + /** + * + * + *
+     * Output only. The version ID of the model that is copied.
+     * 
+ * + * string model_version_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The modelVersionId. + */ + public java.lang.String getModelVersionId() { + java.lang.Object ref = modelVersionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + modelVersionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The version ID of the model that is copied.
+     * 
+ * + * string model_version_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for modelVersionId. + */ + public com.google.protobuf.ByteString getModelVersionIdBytes() { + java.lang.Object ref = modelVersionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + modelVersionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The version ID of the model that is copied.
+     * 
+ * + * string model_version_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The modelVersionId to set. + * @return This builder for chaining. + */ + public Builder setModelVersionId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + modelVersionId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The version ID of the model that is copied.
+     * 
+ * + * string model_version_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearModelVersionId() { + modelVersionId_ = getDefaultInstance().getModelVersionId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The version ID of the model that is copied.
+     * 
+ * + * string model_version_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for modelVersionId to set. + * @return This builder for chaining. + */ + public Builder setModelVersionIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + modelVersionId_ = 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.CopyModelResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.CopyModelResponse) + private static final com.google.cloud.aiplatform.v1beta1.CopyModelResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.CopyModelResponse(); + } + + public static com.google.cloud.aiplatform.v1beta1.CopyModelResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CopyModelResponse 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.CopyModelResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CopyModelResponseOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CopyModelResponseOrBuilder.java new file mode 100644 index 000000000000..99fa813f7e94 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CopyModelResponseOrBuilder.java @@ -0,0 +1,77 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/model_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +public interface CopyModelResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.CopyModelResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The name of the copied Model resource.
+   * Format: `projects/{project}/locations/{location}/models/{model}`
+   * 
+ * + * string model = 1 [(.google.api.resource_reference) = { ... } + * + * @return The model. + */ + java.lang.String getModel(); + /** + * + * + *
+   * The name of the copied Model resource.
+   * Format: `projects/{project}/locations/{location}/models/{model}`
+   * 
+ * + * string model = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for model. + */ + com.google.protobuf.ByteString getModelBytes(); + + /** + * + * + *
+   * Output only. The version ID of the model that is copied.
+   * 
+ * + * string model_version_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The modelVersionId. + */ + java.lang.String getModelVersionId(); + /** + * + * + *
+   * Output only. The version ID of the model that is copied.
+   * 
+ * + * string model_version_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for modelVersionId. + */ + com.google.protobuf.ByteString getModelVersionIdBytes(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateNasJobRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateNasJobRequest.java new file mode 100644 index 000000000000..528d1ecefb96 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateNasJobRequest.java @@ -0,0 +1,941 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/job_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Request message for
+ * [JobService.CreateNasJob][google.cloud.aiplatform.v1beta1.JobService.CreateNasJob].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.CreateNasJobRequest} + */ +public final class CreateNasJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.CreateNasJobRequest) + CreateNasJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateNasJobRequest.newBuilder() to construct. + private CreateNasJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateNasJobRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateNasJobRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CreateNasJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CreateNasJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.CreateNasJobRequest.class, + com.google.cloud.aiplatform.v1beta1.CreateNasJobRequest.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 create the NasJob 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 NasJob 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 NAS_JOB_FIELD_NUMBER = 2; + private com.google.cloud.aiplatform.v1beta1.NasJob nasJob_; + /** + * + * + *
+   * Required. The NasJob to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJob nas_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the nasJob field is set. + */ + @java.lang.Override + public boolean hasNasJob() { + return nasJob_ != null; + } + /** + * + * + *
+   * Required. The NasJob to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJob nas_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The nasJob. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasJob getNasJob() { + return nasJob_ == null + ? com.google.cloud.aiplatform.v1beta1.NasJob.getDefaultInstance() + : nasJob_; + } + /** + * + * + *
+   * Required. The NasJob to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJob nas_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasJobOrBuilder getNasJobOrBuilder() { + return nasJob_ == null + ? com.google.cloud.aiplatform.v1beta1.NasJob.getDefaultInstance() + : nasJob_; + } + + 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 (nasJob_ != null) { + output.writeMessage(2, getNasJob()); + } + 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 (nasJob_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getNasJob()); + } + 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.CreateNasJobRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.CreateNasJobRequest other = + (com.google.cloud.aiplatform.v1beta1.CreateNasJobRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasNasJob() != other.hasNasJob()) return false; + if (hasNasJob()) { + if (!getNasJob().equals(other.getNasJob())) 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 (hasNasJob()) { + hash = (37 * hash) + NAS_JOB_FIELD_NUMBER; + hash = (53 * hash) + getNasJob().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.CreateNasJobRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateNasJobRequest 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.CreateNasJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateNasJobRequest 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.CreateNasJobRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateNasJobRequest 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.CreateNasJobRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateNasJobRequest 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.CreateNasJobRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateNasJobRequest 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.CreateNasJobRequest 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.CreateNasJobRequest 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.CreateNasJobRequest 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
+   * [JobService.CreateNasJob][google.cloud.aiplatform.v1beta1.JobService.CreateNasJob].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.CreateNasJobRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.CreateNasJobRequest) + com.google.cloud.aiplatform.v1beta1.CreateNasJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CreateNasJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CreateNasJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.CreateNasJobRequest.class, + com.google.cloud.aiplatform.v1beta1.CreateNasJobRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.CreateNasJobRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + nasJob_ = null; + if (nasJobBuilder_ != null) { + nasJobBuilder_.dispose(); + nasJobBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_CreateNasJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.CreateNasJobRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.CreateNasJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.CreateNasJobRequest build() { + com.google.cloud.aiplatform.v1beta1.CreateNasJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.CreateNasJobRequest buildPartial() { + com.google.cloud.aiplatform.v1beta1.CreateNasJobRequest result = + new com.google.cloud.aiplatform.v1beta1.CreateNasJobRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.CreateNasJobRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nasJob_ = nasJobBuilder_ == null ? nasJob_ : nasJobBuilder_.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.CreateNasJobRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.CreateNasJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.CreateNasJobRequest other) { + if (other == com.google.cloud.aiplatform.v1beta1.CreateNasJobRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasNasJob()) { + mergeNasJob(other.getNasJob()); + } + 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(getNasJobFieldBuilder().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 NasJob 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 NasJob 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 NasJob 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 NasJob 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 NasJob 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.NasJob nasJob_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NasJob, + com.google.cloud.aiplatform.v1beta1.NasJob.Builder, + com.google.cloud.aiplatform.v1beta1.NasJobOrBuilder> + nasJobBuilder_; + /** + * + * + *
+     * Required. The NasJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJob nas_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the nasJob field is set. + */ + public boolean hasNasJob() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. The NasJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJob nas_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The nasJob. + */ + public com.google.cloud.aiplatform.v1beta1.NasJob getNasJob() { + if (nasJobBuilder_ == null) { + return nasJob_ == null + ? com.google.cloud.aiplatform.v1beta1.NasJob.getDefaultInstance() + : nasJob_; + } else { + return nasJobBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The NasJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJob nas_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setNasJob(com.google.cloud.aiplatform.v1beta1.NasJob value) { + if (nasJobBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + nasJob_ = value; + } else { + nasJobBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The NasJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJob nas_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setNasJob(com.google.cloud.aiplatform.v1beta1.NasJob.Builder builderForValue) { + if (nasJobBuilder_ == null) { + nasJob_ = builderForValue.build(); + } else { + nasJobBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The NasJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJob nas_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeNasJob(com.google.cloud.aiplatform.v1beta1.NasJob value) { + if (nasJobBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && nasJob_ != null + && nasJob_ != com.google.cloud.aiplatform.v1beta1.NasJob.getDefaultInstance()) { + getNasJobBuilder().mergeFrom(value); + } else { + nasJob_ = value; + } + } else { + nasJobBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The NasJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJob nas_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearNasJob() { + bitField0_ = (bitField0_ & ~0x00000002); + nasJob_ = null; + if (nasJobBuilder_ != null) { + nasJobBuilder_.dispose(); + nasJobBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The NasJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJob nas_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1beta1.NasJob.Builder getNasJobBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getNasJobFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The NasJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJob nas_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1beta1.NasJobOrBuilder getNasJobOrBuilder() { + if (nasJobBuilder_ != null) { + return nasJobBuilder_.getMessageOrBuilder(); + } else { + return nasJob_ == null + ? com.google.cloud.aiplatform.v1beta1.NasJob.getDefaultInstance() + : nasJob_; + } + } + /** + * + * + *
+     * Required. The NasJob to create.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJob nas_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NasJob, + com.google.cloud.aiplatform.v1beta1.NasJob.Builder, + com.google.cloud.aiplatform.v1beta1.NasJobOrBuilder> + getNasJobFieldBuilder() { + if (nasJobBuilder_ == null) { + nasJobBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NasJob, + com.google.cloud.aiplatform.v1beta1.NasJob.Builder, + com.google.cloud.aiplatform.v1beta1.NasJobOrBuilder>( + getNasJob(), getParentForChildren(), isClean()); + nasJob_ = null; + } + return nasJobBuilder_; + } + + @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.CreateNasJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.CreateNasJobRequest) + private static final com.google.cloud.aiplatform.v1beta1.CreateNasJobRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.CreateNasJobRequest(); + } + + public static com.google.cloud.aiplatform.v1beta1.CreateNasJobRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateNasJobRequest 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.CreateNasJobRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateNasJobRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateNasJobRequestOrBuilder.java new file mode 100644 index 000000000000..77d8657e05b8 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/CreateNasJobRequestOrBuilder.java @@ -0,0 +1,97 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/job_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +public interface CreateNasJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.CreateNasJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the Location to create the NasJob 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 NasJob 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 NasJob to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJob nas_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the nasJob field is set. + */ + boolean hasNasJob(); + /** + * + * + *
+   * Required. The NasJob to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJob nas_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The nasJob. + */ + com.google.cloud.aiplatform.v1beta1.NasJob getNasJob(); + /** + * + * + *
+   * Required. The NasJob to create.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJob nas_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1beta1.NasJobOrBuilder getNasJobOrBuilder(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeleteNasJobRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeleteNasJobRequest.java new file mode 100644 index 000000000000..5772969bd894 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeleteNasJobRequest.java @@ -0,0 +1,660 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/job_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Request message for
+ * [JobService.DeleteNasJob][google.cloud.aiplatform.v1beta1.JobService.DeleteNasJob].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.DeleteNasJobRequest} + */ +public final class DeleteNasJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.DeleteNasJobRequest) + DeleteNasJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteNasJobRequest.newBuilder() to construct. + private DeleteNasJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteNasJobRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteNasJobRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_DeleteNasJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_DeleteNasJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.DeleteNasJobRequest.class, + com.google.cloud.aiplatform.v1beta1.DeleteNasJobRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the NasJob resource to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/nasJobs/{nas_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 NasJob resource to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/nasJobs/{nas_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.v1beta1.DeleteNasJobRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.DeleteNasJobRequest other = + (com.google.cloud.aiplatform.v1beta1.DeleteNasJobRequest) 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.DeleteNasJobRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteNasJobRequest 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.DeleteNasJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteNasJobRequest 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.DeleteNasJobRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteNasJobRequest 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.DeleteNasJobRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteNasJobRequest 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.DeleteNasJobRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteNasJobRequest 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.DeleteNasJobRequest 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.DeleteNasJobRequest 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.DeleteNasJobRequest 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
+   * [JobService.DeleteNasJob][google.cloud.aiplatform.v1beta1.JobService.DeleteNasJob].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.DeleteNasJobRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.DeleteNasJobRequest) + com.google.cloud.aiplatform.v1beta1.DeleteNasJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_DeleteNasJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_DeleteNasJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.DeleteNasJobRequest.class, + com.google.cloud.aiplatform.v1beta1.DeleteNasJobRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.DeleteNasJobRequest.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.JobServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_DeleteNasJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.DeleteNasJobRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.DeleteNasJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.DeleteNasJobRequest build() { + com.google.cloud.aiplatform.v1beta1.DeleteNasJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.DeleteNasJobRequest buildPartial() { + com.google.cloud.aiplatform.v1beta1.DeleteNasJobRequest result = + new com.google.cloud.aiplatform.v1beta1.DeleteNasJobRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.DeleteNasJobRequest 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.DeleteNasJobRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.DeleteNasJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.DeleteNasJobRequest other) { + if (other == com.google.cloud.aiplatform.v1beta1.DeleteNasJobRequest.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 NasJob resource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/nasJobs/{nas_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 NasJob resource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/nasJobs/{nas_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 NasJob resource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/nasJobs/{nas_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 NasJob resource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/nasJobs/{nas_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 NasJob resource to be deleted.
+     * Format:
+     * `projects/{project}/locations/{location}/nasJobs/{nas_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.v1beta1.DeleteNasJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.DeleteNasJobRequest) + private static final com.google.cloud.aiplatform.v1beta1.DeleteNasJobRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.DeleteNasJobRequest(); + } + + public static com.google.cloud.aiplatform.v1beta1.DeleteNasJobRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteNasJobRequest 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.DeleteNasJobRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeleteNasJobRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeleteNasJobRequestOrBuilder.java new file mode 100644 index 000000000000..db11d81b05d8 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeleteNasJobRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/job_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +public interface DeleteNasJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.DeleteNasJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the NasJob resource to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/nasJobs/{nas_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 NasJob resource to be deleted.
+   * Format:
+   * `projects/{project}/locations/{location}/nasJobs/{nas_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-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeployedIndex.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeployedIndex.java index 40d88188df2d..f8e5357281ac 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeployedIndex.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeployedIndex.java @@ -545,9 +545,9 @@ public com.google.cloud.aiplatform.v1beta1.AutomaticResources getAutomaticResour * Available machine types for MEDIUM shard: * e2-standard-16 and all machine types available for LARGE shard. * Available machine types for LARGE shard: - * e2-standard-32, e2-highmem-16, n2d-standard-32. + * e2-highmem-16, n2d-standard-32. * n1-standard-16 and n1-standard-32 are still available, but we recommend - * e2-standard-16 and e2-standard-32 for cost efficiency. + * e2-standard-16 and e2-highmem-16 for cost efficiency. * * * @@ -574,9 +574,9 @@ public boolean hasDedicatedResources() { * Available machine types for MEDIUM shard: * e2-standard-16 and all machine types available for LARGE shard. * Available machine types for LARGE shard: - * e2-standard-32, e2-highmem-16, n2d-standard-32. + * e2-highmem-16, n2d-standard-32. * n1-standard-16 and n1-standard-32 are still available, but we recommend - * e2-standard-16 and e2-standard-32 for cost efficiency. + * e2-standard-16 and e2-highmem-16 for cost efficiency. * * * @@ -605,9 +605,9 @@ public com.google.cloud.aiplatform.v1beta1.DedicatedResources getDedicatedResour * Available machine types for MEDIUM shard: * e2-standard-16 and all machine types available for LARGE shard. * Available machine types for LARGE shard: - * e2-standard-32, e2-highmem-16, n2d-standard-32. + * e2-highmem-16, n2d-standard-32. * n1-standard-16 and n1-standard-32 are still available, but we recommend - * e2-standard-16 and e2-standard-32 for cost efficiency. + * e2-standard-16 and e2-highmem-16 for cost efficiency. * * * @@ -2951,9 +2951,9 @@ public Builder clearAutomaticResources() { * Available machine types for MEDIUM shard: * e2-standard-16 and all machine types available for LARGE shard. * Available machine types for LARGE shard: - * e2-standard-32, e2-highmem-16, n2d-standard-32. + * e2-highmem-16, n2d-standard-32. * n1-standard-16 and n1-standard-32 are still available, but we recommend - * e2-standard-16 and e2-standard-32 for cost efficiency. + * e2-standard-16 and e2-highmem-16 for cost efficiency. * * * @@ -2979,9 +2979,9 @@ public boolean hasDedicatedResources() { * Available machine types for MEDIUM shard: * e2-standard-16 and all machine types available for LARGE shard. * Available machine types for LARGE shard: - * e2-standard-32, e2-highmem-16, n2d-standard-32. + * e2-highmem-16, n2d-standard-32. * n1-standard-16 and n1-standard-32 are still available, but we recommend - * e2-standard-16 and e2-standard-32 for cost efficiency. + * e2-standard-16 and e2-highmem-16 for cost efficiency. * * * @@ -3013,9 +3013,9 @@ public com.google.cloud.aiplatform.v1beta1.DedicatedResources getDedicatedResour * Available machine types for MEDIUM shard: * e2-standard-16 and all machine types available for LARGE shard. * Available machine types for LARGE shard: - * e2-standard-32, e2-highmem-16, n2d-standard-32. + * e2-highmem-16, n2d-standard-32. * n1-standard-16 and n1-standard-32 are still available, but we recommend - * e2-standard-16 and e2-standard-32 for cost efficiency. + * e2-standard-16 and e2-highmem-16 for cost efficiency. * * * @@ -3050,9 +3050,9 @@ public Builder setDedicatedResources( * Available machine types for MEDIUM shard: * e2-standard-16 and all machine types available for LARGE shard. * Available machine types for LARGE shard: - * e2-standard-32, e2-highmem-16, n2d-standard-32. + * e2-highmem-16, n2d-standard-32. * n1-standard-16 and n1-standard-32 are still available, but we recommend - * e2-standard-16 and e2-standard-32 for cost efficiency. + * e2-standard-16 and e2-highmem-16 for cost efficiency. * * * @@ -3084,9 +3084,9 @@ public Builder setDedicatedResources( * Available machine types for MEDIUM shard: * e2-standard-16 and all machine types available for LARGE shard. * Available machine types for LARGE shard: - * e2-standard-32, e2-highmem-16, n2d-standard-32. + * e2-highmem-16, n2d-standard-32. * n1-standard-16 and n1-standard-32 are still available, but we recommend - * e2-standard-16 and e2-standard-32 for cost efficiency. + * e2-standard-16 and e2-highmem-16 for cost efficiency. * * * @@ -3125,9 +3125,9 @@ public Builder mergeDedicatedResources( * Available machine types for MEDIUM shard: * e2-standard-16 and all machine types available for LARGE shard. * Available machine types for LARGE shard: - * e2-standard-32, e2-highmem-16, n2d-standard-32. + * e2-highmem-16, n2d-standard-32. * n1-standard-16 and n1-standard-32 are still available, but we recommend - * e2-standard-16 and e2-standard-32 for cost efficiency. + * e2-standard-16 and e2-highmem-16 for cost efficiency. * * * @@ -3158,9 +3158,9 @@ public Builder clearDedicatedResources() { * Available machine types for MEDIUM shard: * e2-standard-16 and all machine types available for LARGE shard. * Available machine types for LARGE shard: - * e2-standard-32, e2-highmem-16, n2d-standard-32. + * e2-highmem-16, n2d-standard-32. * n1-standard-16 and n1-standard-32 are still available, but we recommend - * e2-standard-16 and e2-standard-32 for cost efficiency. + * e2-standard-16 and e2-highmem-16 for cost efficiency. * * * @@ -3187,9 +3187,9 @@ public Builder clearDedicatedResources() { * Available machine types for MEDIUM shard: * e2-standard-16 and all machine types available for LARGE shard. * Available machine types for LARGE shard: - * e2-standard-32, e2-highmem-16, n2d-standard-32. + * e2-highmem-16, n2d-standard-32. * n1-standard-16 and n1-standard-32 are still available, but we recommend - * e2-standard-16 and e2-standard-32 for cost efficiency. + * e2-standard-16 and e2-highmem-16 for cost efficiency. * * * @@ -3220,9 +3220,9 @@ public Builder clearDedicatedResources() { * Available machine types for MEDIUM shard: * e2-standard-16 and all machine types available for LARGE shard. * Available machine types for LARGE shard: - * e2-standard-32, e2-highmem-16, n2d-standard-32. + * e2-highmem-16, n2d-standard-32. * n1-standard-16 and n1-standard-32 are still available, but we recommend - * e2-standard-16 and e2-standard-32 for cost efficiency. + * e2-standard-16 and e2-highmem-16 for cost efficiency. * * * diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeployedIndexOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeployedIndexOrBuilder.java index 293c0cd0b7e5..e6f13c8e00e2 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeployedIndexOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeployedIndexOrBuilder.java @@ -359,9 +359,9 @@ public interface DeployedIndexOrBuilder * Available machine types for MEDIUM shard: * e2-standard-16 and all machine types available for LARGE shard. * Available machine types for LARGE shard: - * e2-standard-32, e2-highmem-16, n2d-standard-32. + * e2-highmem-16, n2d-standard-32. * n1-standard-16 and n1-standard-32 are still available, but we recommend - * e2-standard-16 and e2-standard-32 for cost efficiency. + * e2-standard-16 and e2-highmem-16 for cost efficiency. * * * @@ -385,9 +385,9 @@ public interface DeployedIndexOrBuilder * Available machine types for MEDIUM shard: * e2-standard-16 and all machine types available for LARGE shard. * Available machine types for LARGE shard: - * e2-standard-32, e2-highmem-16, n2d-standard-32. + * e2-highmem-16, n2d-standard-32. * n1-standard-16 and n1-standard-32 are still available, but we recommend - * e2-standard-16 and e2-standard-32 for cost efficiency. + * e2-standard-16 and e2-highmem-16 for cost efficiency. * * * @@ -411,9 +411,9 @@ public interface DeployedIndexOrBuilder * Available machine types for MEDIUM shard: * e2-standard-16 and all machine types available for LARGE shard. * Available machine types for LARGE shard: - * e2-standard-32, e2-highmem-16, n2d-standard-32. + * e2-highmem-16, n2d-standard-32. * n1-standard-16 and n1-standard-32 are still available, but we recommend - * e2-standard-16 and e2-standard-32 for cost efficiency. + * e2-standard-16 and e2-highmem-16 for cost efficiency. * * * diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeployedModel.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeployedModel.java index 3ce17fed5716..0041996ebf10 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeployedModel.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeployedModel.java @@ -674,6 +674,28 @@ public com.google.cloud.aiplatform.v1beta1.ExplanationSpec getExplanationSpec() : 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.v1beta1.Model.explanation_spec]
+   * or
+   * [explanation_spec][google.cloud.aiplatform.v1beta1.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") @@ -761,6 +783,8 @@ public boolean getEnableContainerLogging() { * * *
+   * If true, online prediction access logs are sent to StackDriver
+   * Logging.
    * These logs are like standard server access logs, containing
    * information like timestamp and latency for each prediction request.
    * Note that Stackdriver logs may incur a cost, especially if your project
@@ -898,6 +922,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);
   }
 
@@ -950,6 +977,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;
@@ -978,6 +1008,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 (getEnableContainerLogging() != other.getEnableContainerLogging()) return false;
     if (getEnableAccessLogging() != other.getEnableAccessLogging()) return false;
@@ -1026,6 +1057,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) + ENABLE_CONTAINER_LOGGING_FIELD_NUMBER;
@@ -1211,6 +1244,7 @@ public Builder clear() {
         explanationSpecBuilder_.dispose();
         explanationSpecBuilder_ = null;
       }
+      disableExplanations_ = false;
       serviceAccount_ = "";
       enableContainerLogging_ = false;
       enableAccessLogging_ = false;
@@ -1278,15 +1312,18 @@ private void buildPartial0(com.google.cloud.aiplatform.v1beta1.DeployedModel res
             explanationSpecBuilder_ == null ? explanationSpec_ : explanationSpecBuilder_.build();
       }
       if (((from_bitField0_ & 0x00000200) != 0)) {
-        result.serviceAccount_ = serviceAccount_;
+        result.disableExplanations_ = disableExplanations_;
       }
       if (((from_bitField0_ & 0x00000400) != 0)) {
-        result.enableContainerLogging_ = enableContainerLogging_;
+        result.serviceAccount_ = serviceAccount_;
       }
       if (((from_bitField0_ & 0x00000800) != 0)) {
-        result.enableAccessLogging_ = enableAccessLogging_;
+        result.enableContainerLogging_ = enableContainerLogging_;
       }
       if (((from_bitField0_ & 0x00001000) != 0)) {
+        result.enableAccessLogging_ = enableAccessLogging_;
+      }
+      if (((from_bitField0_ & 0x00002000) != 0)) {
         result.privateEndpoints_ =
             privateEndpointsBuilder_ == null ? privateEndpoints_ : privateEndpointsBuilder_.build();
       }
@@ -1375,9 +1412,12 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.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.getEnableContainerLogging() != false) {
@@ -1485,26 +1525,26 @@ public Builder mergeFrom(
             case 90:
               {
                 serviceAccount_ = input.readStringRequireUtf8();
-                bitField0_ |= 0x00000200;
+                bitField0_ |= 0x00000400;
                 break;
               } // case 90
             case 96:
               {
                 enableContainerLogging_ = input.readBool();
-                bitField0_ |= 0x00000400;
+                bitField0_ |= 0x00000800;
                 break;
               } // case 96
             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 138:
@@ -1520,6 +1560,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)) {
@@ -3138,6 +3184,71 @@ public com.google.cloud.aiplatform.v1beta1.ExplanationSpec.Builder getExplanatio
       return explanationSpecBuilder_;
     }
 
+    private boolean disableExplanations_;
+    /**
+     *
+     *
+     * 
+     * If true, deploy the model without explainable feature, regardless the
+     * existence of
+     * [Model.explanation_spec][google.cloud.aiplatform.v1beta1.Model.explanation_spec]
+     * or
+     * [explanation_spec][google.cloud.aiplatform.v1beta1.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.v1beta1.Model.explanation_spec]
+     * or
+     * [explanation_spec][google.cloud.aiplatform.v1beta1.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.v1beta1.Model.explanation_spec]
+     * or
+     * [explanation_spec][google.cloud.aiplatform.v1beta1.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_ = ""; /** * @@ -3215,7 +3326,7 @@ public Builder setServiceAccount(java.lang.String value) { throw new NullPointerException(); } serviceAccount_ = value; - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -3237,7 +3348,7 @@ public Builder setServiceAccount(java.lang.String value) { */ public Builder clearServiceAccount() { serviceAccount_ = getDefaultInstance().getServiceAccount(); - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000400); onChanged(); return this; } @@ -3264,7 +3375,7 @@ public Builder setServiceAccountBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); serviceAccount_ = value; - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -3304,7 +3415,7 @@ public boolean getEnableContainerLogging() { public Builder setEnableContainerLogging(boolean value) { enableContainerLogging_ = value; - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000800; onChanged(); return this; } @@ -3322,7 +3433,7 @@ public Builder setEnableContainerLogging(boolean value) { * @return This builder for chaining. */ public Builder clearEnableContainerLogging() { - bitField0_ = (bitField0_ & ~0x00000400); + bitField0_ = (bitField0_ & ~0x00000800); enableContainerLogging_ = false; onChanged(); return this; @@ -3333,6 +3444,8 @@ public Builder clearEnableContainerLogging() { * * *
+     * If true, online prediction access logs are sent to StackDriver
+     * Logging.
      * These logs are like standard server access logs, containing
      * information like timestamp and latency for each prediction request.
      * Note that Stackdriver logs may incur a cost, especially if your project
@@ -3352,6 +3465,8 @@ public boolean getEnableAccessLogging() {
      *
      *
      * 
+     * If true, online prediction access logs are sent to StackDriver
+     * Logging.
      * These logs are like standard server access logs, containing
      * information like timestamp and latency for each prediction request.
      * Note that Stackdriver logs may incur a cost, especially if your project
@@ -3367,7 +3482,7 @@ public boolean getEnableAccessLogging() {
     public Builder setEnableAccessLogging(boolean value) {
 
       enableAccessLogging_ = value;
-      bitField0_ |= 0x00000800;
+      bitField0_ |= 0x00001000;
       onChanged();
       return this;
     }
@@ -3375,6 +3490,8 @@ public Builder setEnableAccessLogging(boolean value) {
      *
      *
      * 
+     * If true, online prediction access logs are sent to StackDriver
+     * Logging.
      * These logs are like standard server access logs, containing
      * information like timestamp and latency for each prediction request.
      * Note that Stackdriver logs may incur a cost, especially if your project
@@ -3387,7 +3504,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;
@@ -3416,7 +3533,7 @@ public Builder clearEnableAccessLogging() {
      * @return Whether the privateEndpoints field is set.
      */
     public boolean hasPrivateEndpoints() {
-      return ((bitField0_ & 0x00001000) != 0);
+      return ((bitField0_ & 0x00002000) != 0);
     }
     /**
      *
@@ -3466,7 +3583,7 @@ public Builder setPrivateEndpoints(com.google.cloud.aiplatform.v1beta1.PrivateEn
       } else {
         privateEndpointsBuilder_.setMessage(value);
       }
-      bitField0_ |= 0x00001000;
+      bitField0_ |= 0x00002000;
       onChanged();
       return this;
     }
@@ -3491,7 +3608,7 @@ public Builder setPrivateEndpoints(
       } else {
         privateEndpointsBuilder_.setMessage(builderForValue.build());
       }
-      bitField0_ |= 0x00001000;
+      bitField0_ |= 0x00002000;
       onChanged();
       return this;
     }
@@ -3512,7 +3629,7 @@ public Builder setPrivateEndpoints(
     public Builder mergePrivateEndpoints(
         com.google.cloud.aiplatform.v1beta1.PrivateEndpoints value) {
       if (privateEndpointsBuilder_ == null) {
-        if (((bitField0_ & 0x00001000) != 0)
+        if (((bitField0_ & 0x00002000) != 0)
             && privateEndpoints_ != null
             && privateEndpoints_
                 != com.google.cloud.aiplatform.v1beta1.PrivateEndpoints.getDefaultInstance()) {
@@ -3523,7 +3640,7 @@ public Builder mergePrivateEndpoints(
       } else {
         privateEndpointsBuilder_.mergeFrom(value);
       }
-      bitField0_ |= 0x00001000;
+      bitField0_ |= 0x00002000;
       onChanged();
       return this;
     }
@@ -3542,7 +3659,7 @@ public Builder mergePrivateEndpoints(
      * 
      */
     public Builder clearPrivateEndpoints() {
-      bitField0_ = (bitField0_ & ~0x00001000);
+      bitField0_ = (bitField0_ & ~0x00002000);
       privateEndpoints_ = null;
       if (privateEndpointsBuilder_ != null) {
         privateEndpointsBuilder_.dispose();
@@ -3567,7 +3684,7 @@ public Builder clearPrivateEndpoints() {
      */
     public com.google.cloud.aiplatform.v1beta1.PrivateEndpoints.Builder
         getPrivateEndpointsBuilder() {
-      bitField0_ |= 0x00001000;
+      bitField0_ |= 0x00002000;
       onChanged();
       return getPrivateEndpointsFieldBuilder().getBuilder();
     }
diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeployedModelOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeployedModelOrBuilder.java
index f54385ce79a5..acdadce8a6b9 100644
--- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeployedModelOrBuilder.java
+++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/DeployedModelOrBuilder.java
@@ -378,6 +378,23 @@ public interface DeployedModelOrBuilder
    */
   com.google.cloud.aiplatform.v1beta1.ExplanationSpecOrBuilder getExplanationSpecOrBuilder();
 
+  /**
+   *
+   *
+   * 
+   * If true, deploy the model without explainable feature, regardless the
+   * existence of
+   * [Model.explanation_spec][google.cloud.aiplatform.v1beta1.Model.explanation_spec]
+   * or
+   * [explanation_spec][google.cloud.aiplatform.v1beta1.DeployedModel.explanation_spec].
+   * 
+ * + * bool disable_explanations = 19; + * + * @return The disableExplanations. + */ + boolean getDisableExplanations(); + /** * * @@ -432,6 +449,8 @@ public interface DeployedModelOrBuilder * * *
+   * If true, online prediction access logs are sent to StackDriver
+   * Logging.
    * These logs are like standard server access logs, containing
    * information like timestamp and latency for each prediction request.
    * Note that Stackdriver logs may incur a cost, especially if your project
diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Endpoint.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Endpoint.java
index 73dca0895bf8..64bac7387d9c 100644
--- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Endpoint.java
+++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Endpoint.java
@@ -805,7 +805,7 @@ public com.google.cloud.aiplatform.v1beta1.EncryptionSpecOrBuilder getEncryption
    *
    *
    * 
-   * The full name of the Google Compute Engine
+   * Optional. The full name of the Google Compute Engine
    * [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks)
    * to which the Endpoint should be peered.
    * Private services access must already be configured for the network. If left
@@ -820,7 +820,9 @@ public com.google.cloud.aiplatform.v1beta1.EncryptionSpecOrBuilder getEncryption
    * network name.
    * 
* - * string network = 13 [(.google.api.resource_reference) = { ... } + * + * string network = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The network. */ @@ -840,7 +842,7 @@ public java.lang.String getNetwork() { * * *
-   * The full name of the Google Compute Engine
+   * Optional. The full name of the Google Compute Engine
    * [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks)
    * to which the Endpoint should be peered.
    * Private services access must already be configured for the network. If left
@@ -855,7 +857,9 @@ public java.lang.String getNetwork() {
    * network name.
    * 
* - * string network = 13 [(.google.api.resource_reference) = { ... } + * + * string network = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The bytes for network. */ @@ -888,7 +892,7 @@ public com.google.protobuf.ByteString getNetworkBytes() { * bool enable_private_service_connect = 17 [deprecated = true]; * * @deprecated google.cloud.aiplatform.v1beta1.Endpoint.enable_private_service_connect is - * deprecated. See google/cloud/aiplatform/v1beta1/endpoint.proto;l=124 + * deprecated. See google/cloud/aiplatform/v1beta1/endpoint.proto;l=125 * @return The enablePrivateServiceConnect. */ @java.lang.Override @@ -3734,7 +3738,7 @@ public com.google.cloud.aiplatform.v1beta1.EncryptionSpec.Builder getEncryptionS * * *
-     * The full name of the Google Compute Engine
+     * Optional. The full name of the Google Compute Engine
      * [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks)
      * to which the Endpoint should be peered.
      * Private services access must already be configured for the network. If left
@@ -3749,7 +3753,9 @@ public com.google.cloud.aiplatform.v1beta1.EncryptionSpec.Builder getEncryptionS
      * network name.
      * 
* - * string network = 13 [(.google.api.resource_reference) = { ... } + * + * string network = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The network. */ @@ -3768,7 +3774,7 @@ public java.lang.String getNetwork() { * * *
-     * The full name of the Google Compute Engine
+     * Optional. The full name of the Google Compute Engine
      * [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks)
      * to which the Endpoint should be peered.
      * Private services access must already be configured for the network. If left
@@ -3783,7 +3789,9 @@ public java.lang.String getNetwork() {
      * network name.
      * 
* - * string network = 13 [(.google.api.resource_reference) = { ... } + * + * string network = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The bytes for network. */ @@ -3802,7 +3810,7 @@ public com.google.protobuf.ByteString getNetworkBytes() { * * *
-     * The full name of the Google Compute Engine
+     * Optional. The full name of the Google Compute Engine
      * [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks)
      * to which the Endpoint should be peered.
      * Private services access must already be configured for the network. If left
@@ -3817,7 +3825,9 @@ public com.google.protobuf.ByteString getNetworkBytes() {
      * network name.
      * 
* - * string network = 13 [(.google.api.resource_reference) = { ... } + * + * string network = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @param value The network to set. * @return This builder for chaining. @@ -3835,7 +3845,7 @@ public Builder setNetwork(java.lang.String value) { * * *
-     * The full name of the Google Compute Engine
+     * Optional. The full name of the Google Compute Engine
      * [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks)
      * to which the Endpoint should be peered.
      * Private services access must already be configured for the network. If left
@@ -3850,7 +3860,9 @@ public Builder setNetwork(java.lang.String value) {
      * network name.
      * 
* - * string network = 13 [(.google.api.resource_reference) = { ... } + * + * string network = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -3864,7 +3876,7 @@ public Builder clearNetwork() { * * *
-     * The full name of the Google Compute Engine
+     * Optional. The full name of the Google Compute Engine
      * [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks)
      * to which the Endpoint should be peered.
      * Private services access must already be configured for the network. If left
@@ -3879,7 +3891,9 @@ public Builder clearNetwork() {
      * network name.
      * 
* - * string network = 13 [(.google.api.resource_reference) = { ... } + * + * string network = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for network to set. * @return This builder for chaining. @@ -3910,7 +3924,7 @@ public Builder setNetworkBytes(com.google.protobuf.ByteString value) { * bool enable_private_service_connect = 17 [deprecated = true]; * * @deprecated google.cloud.aiplatform.v1beta1.Endpoint.enable_private_service_connect is - * deprecated. See google/cloud/aiplatform/v1beta1/endpoint.proto;l=124 + * deprecated. See google/cloud/aiplatform/v1beta1/endpoint.proto;l=125 * @return The enablePrivateServiceConnect. */ @java.lang.Override @@ -3932,7 +3946,7 @@ public boolean getEnablePrivateServiceConnect() { * bool enable_private_service_connect = 17 [deprecated = true]; * * @deprecated google.cloud.aiplatform.v1beta1.Endpoint.enable_private_service_connect is - * deprecated. See google/cloud/aiplatform/v1beta1/endpoint.proto;l=124 + * deprecated. See google/cloud/aiplatform/v1beta1/endpoint.proto;l=125 * @param value The enablePrivateServiceConnect to set. * @return This builder for chaining. */ @@ -3958,7 +3972,7 @@ public Builder setEnablePrivateServiceConnect(boolean value) { * bool enable_private_service_connect = 17 [deprecated = true]; * * @deprecated google.cloud.aiplatform.v1beta1.Endpoint.enable_private_service_connect is - * deprecated. See google/cloud/aiplatform/v1beta1/endpoint.proto;l=124 + * deprecated. See google/cloud/aiplatform/v1beta1/endpoint.proto;l=125 * @return This builder for chaining. */ @java.lang.Deprecated diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EndpointOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EndpointOrBuilder.java index bb58f7eecc20..df88d991b949 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EndpointOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EndpointOrBuilder.java @@ -494,7 +494,7 @@ java.lang.String getLabelsOrDefault( * * *
-   * The full name of the Google Compute Engine
+   * Optional. The full name of the Google Compute Engine
    * [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks)
    * to which the Endpoint should be peered.
    * Private services access must already be configured for the network. If left
@@ -509,7 +509,9 @@ java.lang.String getLabelsOrDefault(
    * network name.
    * 
* - * string network = 13 [(.google.api.resource_reference) = { ... } + * + * string network = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The network. */ @@ -518,7 +520,7 @@ java.lang.String getLabelsOrDefault( * * *
-   * The full name of the Google Compute Engine
+   * Optional. The full name of the Google Compute Engine
    * [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks)
    * to which the Endpoint should be peered.
    * Private services access must already be configured for the network. If left
@@ -533,7 +535,9 @@ java.lang.String getLabelsOrDefault(
    * network name.
    * 
* - * string network = 13 [(.google.api.resource_reference) = { ... } + * + * string network = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The bytes for network. */ @@ -553,7 +557,7 @@ java.lang.String getLabelsOrDefault( * bool enable_private_service_connect = 17 [deprecated = true]; * * @deprecated google.cloud.aiplatform.v1beta1.Endpoint.enable_private_service_connect is - * deprecated. See google/cloud/aiplatform/v1beta1/endpoint.proto;l=124 + * deprecated. See google/cloud/aiplatform/v1beta1/endpoint.proto;l=125 * @return The enablePrivateServiceConnect. */ @java.lang.Deprecated diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EndpointProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EndpointProto.java index 314c38fb80fb..ca5a17b588a2 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EndpointProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/EndpointProto.java @@ -69,7 +69,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "n.proto\032(google/cloud/aiplatform/v1beta1" + "/io.proto\0327google/cloud/aiplatform/v1bet" + "a1/machine_resources.proto\032\037google/proto" - + "buf/timestamp.proto\"\207\010\n\010Endpoint\022\021\n\004name" + + "buf/timestamp.proto\"\212\010\n\010Endpoint\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\022L\n\017deployed_models\030\004" + " \003(\0132..google.cloud.aiplatform.v1beta1.D" @@ -82,52 +82,52 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\0224\n\013update_time\030\t \001(\0132\032.google.protobuf." + "TimestampB\003\340A\003\022H\n\017encryption_spec\030\n \001(\0132" + "/.google.cloud.aiplatform.v1beta1.Encryp" - + "tionSpec\0224\n\007network\030\r \001(\tB#\372A \n\036compute." - + "googleapis.com/Network\022*\n\036enable_private" - + "_service_connect\030\021 \001(\010B\002\030\001\022g\n\037model_depl" - + "oyment_monitoring_job\030\016 \001(\tB>\340A\003\372A8\n6aip" - + "latform.googleapis.com/ModelDeploymentMo" - + "nitoringJob\022u\n\'predict_request_response_" - + "logging_config\030\022 \001(\0132D.google.cloud.aipl" - + "atform.v1beta1.PredictRequestResponseLog" - + "gingConfig\0323\n\021TrafficSplitEntry\022\013\n\003key\030\001" - + " \001(\t\022\r\n\005value\030\002 \001(\005:\0028\001\032-\n\013LabelsEntry\022\013" - + "\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:e\352Ab\n\"aip" - + "latform.googleapis.com/Endpoint\022\340A\003\372A8\n6" + + "aiplatform.googleapis.com/ModelDeploymen" + + "tMonitoringJob\022u\n\'predict_request_respon" + + "se_logging_config\030\022 \001(\0132D.google.cloud.a" + + "iplatform.v1beta1.PredictRequestResponse" + + "LoggingConfig\0323\n\021TrafficSplitEntry\022\013\n\003ke" + + "y\030\001 \001(\t\022\r\n\005value\030\002 \001(\005:\0028\001\032-\n\013LabelsEntr" + + "y\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:e\352Ab\n\"" + + "aiplatform.googleapis.com/Endpoint\022 + * Request message for + * [JobService.GetNasJob][google.cloud.aiplatform.v1beta1.JobService.GetNasJob]. + *
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.GetNasJobRequest} + */ +public final class GetNasJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.GetNasJobRequest) + GetNasJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetNasJobRequest.newBuilder() to construct. + private GetNasJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetNasJobRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetNasJobRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_GetNasJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_GetNasJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.GetNasJobRequest.class, + com.google.cloud.aiplatform.v1beta1.GetNasJobRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the NasJob resource.
+   * Format:
+   * `projects/{project}/locations/{location}/nasJobs/{nas_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 NasJob resource.
+   * Format:
+   * `projects/{project}/locations/{location}/nasJobs/{nas_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.v1beta1.GetNasJobRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.GetNasJobRequest other = + (com.google.cloud.aiplatform.v1beta1.GetNasJobRequest) 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.GetNasJobRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.GetNasJobRequest 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.GetNasJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.GetNasJobRequest 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.GetNasJobRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.GetNasJobRequest 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.GetNasJobRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.GetNasJobRequest 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.GetNasJobRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.GetNasJobRequest 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.GetNasJobRequest 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.GetNasJobRequest 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.GetNasJobRequest 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
+   * [JobService.GetNasJob][google.cloud.aiplatform.v1beta1.JobService.GetNasJob].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.GetNasJobRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.GetNasJobRequest) + com.google.cloud.aiplatform.v1beta1.GetNasJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_GetNasJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_GetNasJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.GetNasJobRequest.class, + com.google.cloud.aiplatform.v1beta1.GetNasJobRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.GetNasJobRequest.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.JobServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_GetNasJobRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GetNasJobRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.GetNasJobRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GetNasJobRequest build() { + com.google.cloud.aiplatform.v1beta1.GetNasJobRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GetNasJobRequest buildPartial() { + com.google.cloud.aiplatform.v1beta1.GetNasJobRequest result = + new com.google.cloud.aiplatform.v1beta1.GetNasJobRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.GetNasJobRequest 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.GetNasJobRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.GetNasJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.GetNasJobRequest other) { + if (other == com.google.cloud.aiplatform.v1beta1.GetNasJobRequest.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 NasJob resource.
+     * Format:
+     * `projects/{project}/locations/{location}/nasJobs/{nas_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 NasJob resource.
+     * Format:
+     * `projects/{project}/locations/{location}/nasJobs/{nas_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 NasJob resource.
+     * Format:
+     * `projects/{project}/locations/{location}/nasJobs/{nas_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 NasJob resource.
+     * Format:
+     * `projects/{project}/locations/{location}/nasJobs/{nas_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 NasJob resource.
+     * Format:
+     * `projects/{project}/locations/{location}/nasJobs/{nas_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.v1beta1.GetNasJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.GetNasJobRequest) + private static final com.google.cloud.aiplatform.v1beta1.GetNasJobRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.GetNasJobRequest(); + } + + public static com.google.cloud.aiplatform.v1beta1.GetNasJobRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetNasJobRequest 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.GetNasJobRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GetNasJobRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GetNasJobRequestOrBuilder.java new file mode 100644 index 000000000000..228b62e55d79 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GetNasJobRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/job_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +public interface GetNasJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.GetNasJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the NasJob resource.
+   * Format:
+   * `projects/{project}/locations/{location}/nasJobs/{nas_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 NasJob resource.
+   * Format:
+   * `projects/{project}/locations/{location}/nasJobs/{nas_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-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GetNasTrialDetailRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GetNasTrialDetailRequest.java new file mode 100644 index 000000000000..c72aab3e8bb2 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GetNasTrialDetailRequest.java @@ -0,0 +1,664 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/job_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Request message for
+ * [JobService.GetNasTrialDetail][google.cloud.aiplatform.v1beta1.JobService.GetNasTrialDetail].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.GetNasTrialDetailRequest} + */ +public final class GetNasTrialDetailRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.GetNasTrialDetailRequest) + GetNasTrialDetailRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetNasTrialDetailRequest.newBuilder() to construct. + private GetNasTrialDetailRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetNasTrialDetailRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetNasTrialDetailRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_GetNasTrialDetailRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_GetNasTrialDetailRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.GetNasTrialDetailRequest.class, + com.google.cloud.aiplatform.v1beta1.GetNasTrialDetailRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The name of the NasTrialDetail resource.
+   * Format:
+   * `projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}`
+   * 
+ * + * + * 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 NasTrialDetail resource.
+   * Format:
+   * `projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}`
+   * 
+ * + * + * 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.GetNasTrialDetailRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.GetNasTrialDetailRequest other = + (com.google.cloud.aiplatform.v1beta1.GetNasTrialDetailRequest) 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.GetNasTrialDetailRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.GetNasTrialDetailRequest 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.GetNasTrialDetailRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.GetNasTrialDetailRequest 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.GetNasTrialDetailRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.GetNasTrialDetailRequest 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.GetNasTrialDetailRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.GetNasTrialDetailRequest 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.GetNasTrialDetailRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.GetNasTrialDetailRequest 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.GetNasTrialDetailRequest 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.GetNasTrialDetailRequest 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.GetNasTrialDetailRequest 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
+   * [JobService.GetNasTrialDetail][google.cloud.aiplatform.v1beta1.JobService.GetNasTrialDetail].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.GetNasTrialDetailRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.GetNasTrialDetailRequest) + com.google.cloud.aiplatform.v1beta1.GetNasTrialDetailRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_GetNasTrialDetailRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_GetNasTrialDetailRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.GetNasTrialDetailRequest.class, + com.google.cloud.aiplatform.v1beta1.GetNasTrialDetailRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.GetNasTrialDetailRequest.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.JobServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_GetNasTrialDetailRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GetNasTrialDetailRequest + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.GetNasTrialDetailRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GetNasTrialDetailRequest build() { + com.google.cloud.aiplatform.v1beta1.GetNasTrialDetailRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.GetNasTrialDetailRequest buildPartial() { + com.google.cloud.aiplatform.v1beta1.GetNasTrialDetailRequest result = + new com.google.cloud.aiplatform.v1beta1.GetNasTrialDetailRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1beta1.GetNasTrialDetailRequest 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.GetNasTrialDetailRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.GetNasTrialDetailRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.GetNasTrialDetailRequest other) { + if (other + == com.google.cloud.aiplatform.v1beta1.GetNasTrialDetailRequest.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 NasTrialDetail resource.
+     * Format:
+     * `projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}`
+     * 
+ * + * + * 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 NasTrialDetail resource.
+     * Format:
+     * `projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}`
+     * 
+ * + * + * 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 NasTrialDetail resource.
+     * Format:
+     * `projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}`
+     * 
+ * + * + * 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 NasTrialDetail resource.
+     * Format:
+     * `projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}`
+     * 
+ * + * + * 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 NasTrialDetail resource.
+     * Format:
+     * `projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}`
+     * 
+ * + * + * 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.GetNasTrialDetailRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.GetNasTrialDetailRequest) + private static final com.google.cloud.aiplatform.v1beta1.GetNasTrialDetailRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.GetNasTrialDetailRequest(); + } + + public static com.google.cloud.aiplatform.v1beta1.GetNasTrialDetailRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetNasTrialDetailRequest 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.GetNasTrialDetailRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GetNasTrialDetailRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GetNasTrialDetailRequestOrBuilder.java new file mode 100644 index 000000000000..d7e81dbccb6c --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/GetNasTrialDetailRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/job_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +public interface GetNasTrialDetailRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.GetNasTrialDetailRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the NasTrialDetail resource.
+   * Format:
+   * `projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the NasTrialDetail resource.
+   * Format:
+   * `projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}`
+   * 
+ * + * + * 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/IndexEndpoint.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexEndpoint.java index 269d255d5419..d42bfb1a56dd 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexEndpoint.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexEndpoint.java @@ -694,7 +694,7 @@ public com.google.protobuf.ByteString getNetworkBytes() { *
* * @deprecated google.cloud.aiplatform.v1beta1.IndexEndpoint.enable_private_service_connect is - * deprecated. See google/cloud/aiplatform/v1beta1/index_endpoint.proto;l=102 + * deprecated. See google/cloud/aiplatform/v1beta1/index_endpoint.proto;l=103 * @return The enablePrivateServiceConnect. */ @java.lang.Override @@ -703,6 +703,74 @@ public boolean getEnablePrivateServiceConnect() { return enablePrivateServiceConnect_; } + public static final int PRIVATE_SERVICE_CONNECT_CONFIG_FIELD_NUMBER = 12; + private com.google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig + privateServiceConnectConfig_; + /** + * + * + *
+   * Optional. Configuration for private service connect.
+   * [network][google.cloud.aiplatform.v1beta1.IndexEndpoint.network] and
+   * [private_service_connect_config][google.cloud.aiplatform.v1beta1.IndexEndpoint.private_service_connect_config]
+   * are mutually exclusive.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig private_service_connect_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the privateServiceConnectConfig field is set. + */ + @java.lang.Override + public boolean hasPrivateServiceConnectConfig() { + return privateServiceConnectConfig_ != null; + } + /** + * + * + *
+   * Optional. Configuration for private service connect.
+   * [network][google.cloud.aiplatform.v1beta1.IndexEndpoint.network] and
+   * [private_service_connect_config][google.cloud.aiplatform.v1beta1.IndexEndpoint.private_service_connect_config]
+   * are mutually exclusive.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig private_service_connect_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The privateServiceConnectConfig. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig + getPrivateServiceConnectConfig() { + return privateServiceConnectConfig_ == null + ? com.google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig.getDefaultInstance() + : privateServiceConnectConfig_; + } + /** + * + * + *
+   * Optional. Configuration for private service connect.
+   * [network][google.cloud.aiplatform.v1beta1.IndexEndpoint.network] and
+   * [private_service_connect_config][google.cloud.aiplatform.v1beta1.IndexEndpoint.private_service_connect_config]
+   * are mutually exclusive.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig private_service_connect_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfigOrBuilder + getPrivateServiceConnectConfigOrBuilder() { + return privateServiceConnectConfig_ == null + ? com.google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig.getDefaultInstance() + : privateServiceConnectConfig_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -746,6 +814,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (enablePrivateServiceConnect_ != false) { output.writeBool(10, enablePrivateServiceConnect_); } + if (privateServiceConnectConfig_ != null) { + output.writeMessage(12, getPrivateServiceConnectConfig()); + } getUnknownFields().writeTo(output); } @@ -793,6 +864,11 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(10, enablePrivateServiceConnect_); } + if (privateServiceConnectConfig_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 12, getPrivateServiceConnectConfig()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -825,6 +901,11 @@ public boolean equals(final java.lang.Object obj) { } if (!getNetwork().equals(other.getNetwork())) return false; if (getEnablePrivateServiceConnect() != other.getEnablePrivateServiceConnect()) return false; + if (hasPrivateServiceConnectConfig() != other.hasPrivateServiceConnectConfig()) return false; + if (hasPrivateServiceConnectConfig()) { + if (!getPrivateServiceConnectConfig().equals(other.getPrivateServiceConnectConfig())) + return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -864,6 +945,10 @@ public int hashCode() { hash = (53 * hash) + getNetwork().hashCode(); hash = (37 * hash) + ENABLE_PRIVATE_SERVICE_CONNECT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnablePrivateServiceConnect()); + if (hasPrivateServiceConnectConfig()) { + hash = (37 * hash) + PRIVATE_SERVICE_CONNECT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getPrivateServiceConnectConfig().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -1048,6 +1133,11 @@ public Builder clear() { } network_ = ""; enablePrivateServiceConnect_ = false; + privateServiceConnectConfig_ = null; + if (privateServiceConnectConfigBuilder_ != null) { + privateServiceConnectConfigBuilder_.dispose(); + privateServiceConnectConfigBuilder_ = null; + } return this; } @@ -1126,6 +1216,12 @@ private void buildPartial0(com.google.cloud.aiplatform.v1beta1.IndexEndpoint res if (((from_bitField0_ & 0x00000200) != 0)) { result.enablePrivateServiceConnect_ = enablePrivateServiceConnect_; } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.privateServiceConnectConfig_ = + privateServiceConnectConfigBuilder_ == null + ? privateServiceConnectConfig_ + : privateServiceConnectConfigBuilder_.build(); + } } @java.lang.Override @@ -1237,6 +1333,9 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.IndexEndpoint other if (other.getEnablePrivateServiceConnect() != false) { setEnablePrivateServiceConnect(other.getEnablePrivateServiceConnect()); } + if (other.hasPrivateServiceConnectConfig()) { + mergePrivateServiceConnectConfig(other.getPrivateServiceConnectConfig()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1337,6 +1436,13 @@ public Builder mergeFrom( bitField0_ |= 0x00000200; break; } // case 80 + case 98: + { + input.readMessage( + getPrivateServiceConnectConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000400; + break; + } // case 98 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -2992,7 +3098,7 @@ public Builder setNetworkBytes(com.google.protobuf.ByteString value) { * * * @deprecated google.cloud.aiplatform.v1beta1.IndexEndpoint.enable_private_service_connect is - * deprecated. See google/cloud/aiplatform/v1beta1/index_endpoint.proto;l=102 + * deprecated. See google/cloud/aiplatform/v1beta1/index_endpoint.proto;l=103 * @return The enablePrivateServiceConnect. */ @java.lang.Override @@ -3017,7 +3123,7 @@ public boolean getEnablePrivateServiceConnect() { * * * @deprecated google.cloud.aiplatform.v1beta1.IndexEndpoint.enable_private_service_connect is - * deprecated. See google/cloud/aiplatform/v1beta1/index_endpoint.proto;l=102 + * deprecated. See google/cloud/aiplatform/v1beta1/index_endpoint.proto;l=103 * @param value The enablePrivateServiceConnect to set. * @return This builder for chaining. */ @@ -3046,7 +3152,7 @@ public Builder setEnablePrivateServiceConnect(boolean value) { * * * @deprecated google.cloud.aiplatform.v1beta1.IndexEndpoint.enable_private_service_connect is - * deprecated. See google/cloud/aiplatform/v1beta1/index_endpoint.proto;l=102 + * deprecated. See google/cloud/aiplatform/v1beta1/index_endpoint.proto;l=103 * @return This builder for chaining. */ @java.lang.Deprecated @@ -3057,6 +3163,243 @@ public Builder clearEnablePrivateServiceConnect() { return this; } + private com.google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig + privateServiceConnectConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig, + com.google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig.Builder, + com.google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfigOrBuilder> + privateServiceConnectConfigBuilder_; + /** + * + * + *
+     * Optional. Configuration for private service connect.
+     * [network][google.cloud.aiplatform.v1beta1.IndexEndpoint.network] and
+     * [private_service_connect_config][google.cloud.aiplatform.v1beta1.IndexEndpoint.private_service_connect_config]
+     * are mutually exclusive.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig private_service_connect_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the privateServiceConnectConfig field is set. + */ + public boolean hasPrivateServiceConnectConfig() { + return ((bitField0_ & 0x00000400) != 0); + } + /** + * + * + *
+     * Optional. Configuration for private service connect.
+     * [network][google.cloud.aiplatform.v1beta1.IndexEndpoint.network] and
+     * [private_service_connect_config][google.cloud.aiplatform.v1beta1.IndexEndpoint.private_service_connect_config]
+     * are mutually exclusive.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig private_service_connect_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The privateServiceConnectConfig. + */ + public com.google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig + getPrivateServiceConnectConfig() { + if (privateServiceConnectConfigBuilder_ == null) { + return privateServiceConnectConfig_ == null + ? com.google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig.getDefaultInstance() + : privateServiceConnectConfig_; + } else { + return privateServiceConnectConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Configuration for private service connect.
+     * [network][google.cloud.aiplatform.v1beta1.IndexEndpoint.network] and
+     * [private_service_connect_config][google.cloud.aiplatform.v1beta1.IndexEndpoint.private_service_connect_config]
+     * are mutually exclusive.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig private_service_connect_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPrivateServiceConnectConfig( + com.google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig value) { + if (privateServiceConnectConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + privateServiceConnectConfig_ = value; + } else { + privateServiceConnectConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Configuration for private service connect.
+     * [network][google.cloud.aiplatform.v1beta1.IndexEndpoint.network] and
+     * [private_service_connect_config][google.cloud.aiplatform.v1beta1.IndexEndpoint.private_service_connect_config]
+     * are mutually exclusive.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig private_service_connect_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPrivateServiceConnectConfig( + com.google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig.Builder builderForValue) { + if (privateServiceConnectConfigBuilder_ == null) { + privateServiceConnectConfig_ = builderForValue.build(); + } else { + privateServiceConnectConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Configuration for private service connect.
+     * [network][google.cloud.aiplatform.v1beta1.IndexEndpoint.network] and
+     * [private_service_connect_config][google.cloud.aiplatform.v1beta1.IndexEndpoint.private_service_connect_config]
+     * are mutually exclusive.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig private_service_connect_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergePrivateServiceConnectConfig( + com.google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig value) { + if (privateServiceConnectConfigBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0) + && privateServiceConnectConfig_ != null + && privateServiceConnectConfig_ + != com.google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig + .getDefaultInstance()) { + getPrivateServiceConnectConfigBuilder().mergeFrom(value); + } else { + privateServiceConnectConfig_ = value; + } + } else { + privateServiceConnectConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Configuration for private service connect.
+     * [network][google.cloud.aiplatform.v1beta1.IndexEndpoint.network] and
+     * [private_service_connect_config][google.cloud.aiplatform.v1beta1.IndexEndpoint.private_service_connect_config]
+     * are mutually exclusive.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig private_service_connect_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearPrivateServiceConnectConfig() { + bitField0_ = (bitField0_ & ~0x00000400); + privateServiceConnectConfig_ = null; + if (privateServiceConnectConfigBuilder_ != null) { + privateServiceConnectConfigBuilder_.dispose(); + privateServiceConnectConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Configuration for private service connect.
+     * [network][google.cloud.aiplatform.v1beta1.IndexEndpoint.network] and
+     * [private_service_connect_config][google.cloud.aiplatform.v1beta1.IndexEndpoint.private_service_connect_config]
+     * are mutually exclusive.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig private_service_connect_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig.Builder + getPrivateServiceConnectConfigBuilder() { + bitField0_ |= 0x00000400; + onChanged(); + return getPrivateServiceConnectConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Configuration for private service connect.
+     * [network][google.cloud.aiplatform.v1beta1.IndexEndpoint.network] and
+     * [private_service_connect_config][google.cloud.aiplatform.v1beta1.IndexEndpoint.private_service_connect_config]
+     * are mutually exclusive.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig private_service_connect_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfigOrBuilder + getPrivateServiceConnectConfigOrBuilder() { + if (privateServiceConnectConfigBuilder_ != null) { + return privateServiceConnectConfigBuilder_.getMessageOrBuilder(); + } else { + return privateServiceConnectConfig_ == null + ? com.google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig.getDefaultInstance() + : privateServiceConnectConfig_; + } + } + /** + * + * + *
+     * Optional. Configuration for private service connect.
+     * [network][google.cloud.aiplatform.v1beta1.IndexEndpoint.network] and
+     * [private_service_connect_config][google.cloud.aiplatform.v1beta1.IndexEndpoint.private_service_connect_config]
+     * are mutually exclusive.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig private_service_connect_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig, + com.google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig.Builder, + com.google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfigOrBuilder> + getPrivateServiceConnectConfigFieldBuilder() { + if (privateServiceConnectConfigBuilder_ == null) { + privateServiceConnectConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig, + com.google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig.Builder, + com.google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfigOrBuilder>( + getPrivateServiceConnectConfig(), getParentForChildren(), isClean()); + privateServiceConnectConfig_ = null; + } + return privateServiceConnectConfigBuilder_; + } + @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/IndexEndpointOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexEndpointOrBuilder.java index e008721274e9..42cdcea29763 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexEndpointOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexEndpointOrBuilder.java @@ -418,9 +418,60 @@ java.lang.String getLabelsOrDefault( * * * @deprecated google.cloud.aiplatform.v1beta1.IndexEndpoint.enable_private_service_connect is - * deprecated. See google/cloud/aiplatform/v1beta1/index_endpoint.proto;l=102 + * deprecated. See google/cloud/aiplatform/v1beta1/index_endpoint.proto;l=103 * @return The enablePrivateServiceConnect. */ @java.lang.Deprecated boolean getEnablePrivateServiceConnect(); + + /** + * + * + *
+   * Optional. Configuration for private service connect.
+   * [network][google.cloud.aiplatform.v1beta1.IndexEndpoint.network] and
+   * [private_service_connect_config][google.cloud.aiplatform.v1beta1.IndexEndpoint.private_service_connect_config]
+   * are mutually exclusive.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig private_service_connect_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the privateServiceConnectConfig field is set. + */ + boolean hasPrivateServiceConnectConfig(); + /** + * + * + *
+   * Optional. Configuration for private service connect.
+   * [network][google.cloud.aiplatform.v1beta1.IndexEndpoint.network] and
+   * [private_service_connect_config][google.cloud.aiplatform.v1beta1.IndexEndpoint.private_service_connect_config]
+   * are mutually exclusive.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig private_service_connect_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The privateServiceConnectConfig. + */ + com.google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig getPrivateServiceConnectConfig(); + /** + * + * + *
+   * Optional. Configuration for private service connect.
+   * [network][google.cloud.aiplatform.v1beta1.IndexEndpoint.network] and
+   * [private_service_connect_config][google.cloud.aiplatform.v1beta1.IndexEndpoint.private_service_connect_config]
+   * are mutually exclusive.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig private_service_connect_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfigOrBuilder + getPrivateServiceConnectConfigOrBuilder(); } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexEndpointProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexEndpointProto.java index 693209459533..f9176afef5b8 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexEndpointProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/IndexEndpointProto.java @@ -65,52 +65,57 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "v1beta1\032\037google/api/field_behavior.proto" + "\032\031google/api/resource.proto\0327google/clou" + "d/aiplatform/v1beta1/machine_resources.p" - + "roto\032\037google/protobuf/timestamp.proto\"\322\004" - + "\n\rIndexEndpoint\022\021\n\004name\030\001 \001(\tB\003\340A\003\022\031\n\014di" - + "splay_name\030\002 \001(\tB\003\340A\002\022\023\n\013description\030\003 \001" - + "(\t\022M\n\020deployed_indexes\030\004 \003(\0132..google.cl" - + "oud.aiplatform.v1beta1.DeployedIndexB\003\340A" - + "\003\022\014\n\004etag\030\005 \001(\t\022J\n\006labels\030\006 \003(\0132:.google" - + ".cloud.aiplatform.v1beta1.IndexEndpoint." - + "LabelsEntry\0224\n\013create_time\030\007 \001(\0132\032.googl" - + "e.protobuf.TimestampB\003\340A\003\0224\n\013update_time" - + "\030\010 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022" - + "\024\n\007network\030\t \001(\tB\003\340A\001\022-\n\036enable_private_" - + "service_connect\030\n \001(\010B\005\030\001\340A\001\032-\n\013LabelsEn" - + "try\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:u\352Ar" - + "\n\'aiplatform.googleapis.com/IndexEndpoin" - + "t\022Gprojects/{project}/locations/{locatio" - + "n}/indexEndpoints/{index_endpoint}\"\253\005\n\rD" - + "eployedIndex\022\017\n\002id\030\001 \001(\tB\003\340A\002\0226\n\005index\030\002" - + " \001(\tB\'\340A\002\372A!\n\037aiplatform.googleapis.com/" - + "Index\022\024\n\014display_name\030\003 \001(\t\0224\n\013create_ti" - + "me\030\004 \001(\0132\032.google.protobuf.TimestampB\003\340A" - + "\003\022V\n\021private_endpoints\030\005 \001(\01326.google.cl" - + "oud.aiplatform.v1beta1.IndexPrivateEndpo" - + "intsB\003\340A\003\0228\n\017index_sync_time\030\006 \001(\0132\032.goo" - + "gle.protobuf.TimestampB\003\340A\003\022U\n\023automatic" - + "_resources\030\007 \001(\01323.google.cloud.aiplatfo" - + "rm.v1beta1.AutomaticResourcesB\003\340A\001\022U\n\023de" - + "dicated_resources\030\020 \001(\01323.google.cloud.a" - + "iplatform.v1beta1.DedicatedResourcesB\003\340A" - + "\001\022\"\n\025enable_access_logging\030\010 \001(\010B\003\340A\001\022a\n" - + "\032deployed_index_auth_config\030\t \001(\01328.goog" - + "le.cloud.aiplatform.v1beta1.DeployedInde" - + "xAuthConfigB\003\340A\001\022\037\n\022reserved_ip_ranges\030\n" - + " \003(\tB\003\340A\001\022\035\n\020deployment_group\030\013 \001(\tB\003\340A\001" - + "\"\263\001\n\027DeployedIndexAuthConfig\022\\\n\rauth_pro" - + "vider\030\001 \001(\0132E.google.cloud.aiplatform.v1" - + "beta1.DeployedIndexAuthConfig.AuthProvid" - + "er\032:\n\014AuthProvider\022\021\n\taudiences\030\001 \003(\t\022\027\n" - + "\017allowed_issuers\030\002 \003(\t\"Y\n\025IndexPrivateEn" - + "dpoints\022\037\n\022match_grpc_address\030\001 \001(\tB\003\340A\003" - + "\022\037\n\022service_attachment\030\002 \001(\tB\003\340A\003B\351\001\n#co" - + "m.google.cloud.aiplatform.v1beta1B\022Index" - + "EndpointProtoP\001ZCcloud.google.com/go/aip" - + "latform/apiv1beta1/aiplatformpb;aiplatfo" - + "rmpb\252\002\037Google.Cloud.AIPlatform.V1Beta1\312\002" - + "\037Google\\Cloud\\AIPlatform\\V1beta1\352\002\"Googl" - + "e::Cloud::AIPlatform::V1beta1b\006proto3" + + "roto\0328google/cloud/aiplatform/v1beta1/se" + + "rvice_networking.proto\032\037google/protobuf/" + + "timestamp.proto\"\275\005\n\rIndexEndpoint\022\021\n\004nam" + + "e\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\022M\n\020deployed_indexes" + + "\030\004 \003(\0132..google.cloud.aiplatform.v1beta1" + + ".DeployedIndexB\003\340A\003\022\014\n\004etag\030\005 \001(\t\022J\n\006lab" + + "els\030\006 \003(\0132:.google.cloud.aiplatform.v1be" + + "ta1.IndexEndpoint.LabelsEntry\0224\n\013create_" + + "time\030\007 \001(\0132\032.google.protobuf.TimestampB\003" + + "\340A\003\0224\n\013update_time\030\010 \001(\0132\032.google.protob" + + "uf.TimestampB\003\340A\003\022\024\n\007network\030\t \001(\tB\003\340A\001\022" + + "-\n\036enable_private_service_connect\030\n \001(\010B" + + "\005\030\001\340A\001\022i\n\036private_service_connect_config" + + "\030\014 \001(\0132<.google.cloud.aiplatform.v1beta1" + + ".PrivateServiceConnectConfigB\003\340A\001\032-\n\013Lab" + + "elsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001" + + ":u\352Ar\n\'aiplatform.googleapis.com/IndexEn" + + "dpoint\022Gprojects/{project}/locations/{lo" + + "cation}/indexEndpoints/{index_endpoint}\"" + + "\253\005\n\rDeployedIndex\022\017\n\002id\030\001 \001(\tB\003\340A\002\0226\n\005in" + + "dex\030\002 \001(\tB\'\340A\002\372A!\n\037aiplatform.googleapis" + + ".com/Index\022\024\n\014display_name\030\003 \001(\t\0224\n\013crea" + + "te_time\030\004 \001(\0132\032.google.protobuf.Timestam" + + "pB\003\340A\003\022V\n\021private_endpoints\030\005 \001(\01326.goog" + + "le.cloud.aiplatform.v1beta1.IndexPrivate" + + "EndpointsB\003\340A\003\0228\n\017index_sync_time\030\006 \001(\0132" + + "\032.google.protobuf.TimestampB\003\340A\003\022U\n\023auto" + + "matic_resources\030\007 \001(\01323.google.cloud.aip" + + "latform.v1beta1.AutomaticResourcesB\003\340A\001\022" + + "U\n\023dedicated_resources\030\020 \001(\01323.google.cl" + + "oud.aiplatform.v1beta1.DedicatedResource" + + "sB\003\340A\001\022\"\n\025enable_access_logging\030\010 \001(\010B\003\340" + + "A\001\022a\n\032deployed_index_auth_config\030\t \001(\01328" + + ".google.cloud.aiplatform.v1beta1.Deploye" + + "dIndexAuthConfigB\003\340A\001\022\037\n\022reserved_ip_ran" + + "ges\030\n \003(\tB\003\340A\001\022\035\n\020deployment_group\030\013 \001(\t" + + "B\003\340A\001\"\263\001\n\027DeployedIndexAuthConfig\022\\\n\raut" + + "h_provider\030\001 \001(\0132E.google.cloud.aiplatfo" + + "rm.v1beta1.DeployedIndexAuthConfig.AuthP" + + "rovider\032:\n\014AuthProvider\022\021\n\taudiences\030\001 \003" + + "(\t\022\027\n\017allowed_issuers\030\002 \003(\t\"Y\n\025IndexPriv" + + "ateEndpoints\022\037\n\022match_grpc_address\030\001 \001(\t" + + "B\003\340A\003\022\037\n\022service_attachment\030\002 \001(\tB\003\340A\003B\351" + + "\001\n#com.google.cloud.aiplatform.v1beta1B\022" + + "IndexEndpointProtoP\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( @@ -119,6 +124,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), com.google.cloud.aiplatform.v1beta1.MachineResourcesProto.getDescriptor(), + com.google.cloud.aiplatform.v1beta1.ServiceNetworkingProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), }); internal_static_google_cloud_aiplatform_v1beta1_IndexEndpoint_descriptor = @@ -137,6 +143,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "UpdateTime", "Network", "EnablePrivateServiceConnect", + "PrivateServiceConnectConfig", }); internal_static_google_cloud_aiplatform_v1beta1_IndexEndpoint_LabelsEntry_descriptor = internal_static_google_cloud_aiplatform_v1beta1_IndexEndpoint_descriptor @@ -203,6 +210,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); com.google.cloud.aiplatform.v1beta1.MachineResourcesProto.getDescriptor(); + com.google.cloud.aiplatform.v1beta1.ServiceNetworkingProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/JobServiceProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/JobServiceProto.java index 8e66b9f9afd3..cd1e75f43388 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/JobServiceProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/JobServiceProto.java @@ -99,6 +99,42 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_aiplatform_v1beta1_CancelHyperparameterTuningJobRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_aiplatform_v1beta1_CancelHyperparameterTuningJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_CreateNasJobRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_CreateNasJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_GetNasJobRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_GetNasJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_ListNasJobsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_ListNasJobsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_ListNasJobsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_ListNasJobsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_DeleteNasJobRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_DeleteNasJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_CancelNasJobRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_CancelNasJobRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_GetNasTrialDetailRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_GetNasTrialDetailRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_ListNasTrialDetailsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_ListNasTrialDetailsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_ListNasTrialDetailsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_ListNasTrialDetailsResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_aiplatform_v1beta1_CreateBatchPredictionJobRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -192,334 +228,397 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + ".proto\032?google/cloud/aiplatform/v1beta1/" + "hyperparameter_tuning_job.proto\032Egoogle/" + "cloud/aiplatform/v1beta1/model_deploymen" - + "t_monitoring_job.proto\032/google/cloud/aip" - + "latform/v1beta1/operation.proto\032#google/" - + "longrunning/operations.proto\032\033google/pro" - + "tobuf/empty.proto\032 google/protobuf/field" - + "_mask.proto\032\037google/protobuf/timestamp.p" - + "roto\"\230\001\n\026CreateCustomJobRequest\0229\n\006paren" - + "t\030\001 \001(\tB)\340A\002\372A#\n!locations.googleapis.co" - + "m/Location\022C\n\ncustom_job\030\002 \001(\0132*.google." - + "cloud.aiplatform.v1beta1.CustomJobB\003\340A\002\"" - + "P\n\023GetCustomJobRequest\0229\n\004name\030\001 \001(\tB+\340A" + + "t_monitoring_job.proto\032-google/cloud/aip" + + "latform/v1beta1/nas_job.proto\032/google/cl" + + "oud/aiplatform/v1beta1/operation.proto\032#" + + "google/longrunning/operations.proto\032\033goo" + + "gle/protobuf/empty.proto\032 google/protobu" + + "f/field_mask.proto\032\037google/protobuf/time" + + "stamp.proto\"\230\001\n\026CreateCustomJobRequest\0229" + + "\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!locations.google" + + "apis.com/Location\022C\n\ncustom_job\030\002 \001(\0132*." + + "google.cloud.aiplatform.v1beta1.CustomJo" + + "bB\003\340A\002\"P\n\023GetCustomJobRequest\0229\n\004name\030\001 " + + "\001(\tB+\340A\002\372A%\n#aiplatform.googleapis.com/C" + + "ustomJob\"\270\001\n\025ListCustomJobsRequest\0229\n\006pa" + + "rent\030\001 \001(\tB)\340A\002\372A#\n!locations.googleapis" + + ".com/Location\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage_si" + + "ze\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\022-\n\tread_mas" + + "k\030\005 \001(\0132\032.google.protobuf.FieldMask\"r\n\026L" + + "istCustomJobsResponse\022?\n\013custom_jobs\030\001 \003" + + "(\0132*.google.cloud.aiplatform.v1beta1.Cus" + + "tomJob\022\027\n\017next_page_token\030\002 \001(\t\"S\n\026Delet" + + "eCustomJobRequest\0229\n\004name\030\001 \001(\tB+\340A\002\372A%\n" + + "#aiplatform.googleapis.com/CustomJob\"S\n\026" + + "CancelCustomJobRequest\0229\n\004name\030\001 \001(\tB+\340A" + "\002\372A%\n#aiplatform.googleapis.com/CustomJo" - + "b\"\270\001\n\025ListCustomJobsRequest\0229\n\006parent\030\001 " - + "\001(\tB)\340A\002\372A#\n!locations.googleapis.com/Lo" - + "cation\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(" - + "\005\022\022\n\npage_token\030\004 \001(\t\022-\n\tread_mask\030\005 \001(\013" - + "2\032.google.protobuf.FieldMask\"r\n\026ListCust" - + "omJobsResponse\022?\n\013custom_jobs\030\001 \003(\0132*.go" - + "ogle.cloud.aiplatform.v1beta1.CustomJob\022" - + "\027\n\017next_page_token\030\002 \001(\t\"S\n\026DeleteCustom" - + "JobRequest\0229\n\004name\030\001 \001(\tB+\340A\002\372A%\n#aiplat" - + "form.googleapis.com/CustomJob\"S\n\026CancelC" - + "ustomJobRequest\0229\n\004name\030\001 \001(\tB+\340A\002\372A%\n#a" - + "iplatform.googleapis.com/CustomJob\"\253\001\n\034C" - + "reateDataLabelingJobRequest\0229\n\006parent\030\001 " - + "\001(\tB)\340A\002\372A#\n!locations.googleapis.com/Lo" - + "cation\022P\n\021data_labeling_job\030\002 \001(\01320.goog" - + "le.cloud.aiplatform.v1beta1.DataLabeling" - + "JobB\003\340A\002\"\\\n\031GetDataLabelingJobRequest\022?\n" - + "\004name\030\001 \001(\tB1\340A\002\372A+\n)aiplatform.googleap" - + "is.com/DataLabelingJob\"\320\001\n\033ListDataLabel" - + "ingJobsRequest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!" - + "locations.googleapis.com/Location\022\016\n\006fil" - + "ter\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022\022\n\npage_tok" - + "en\030\004 \001(\t\022-\n\tread_mask\030\005 \001(\0132\032.google.pro" - + "tobuf.FieldMask\022\020\n\010order_by\030\006 \001(\t\"\205\001\n\034Li" - + "stDataLabelingJobsResponse\022L\n\022data_label" - + "ing_jobs\030\001 \003(\01320.google.cloud.aiplatform" - + ".v1beta1.DataLabelingJob\022\027\n\017next_page_to" - + "ken\030\002 \001(\t\"_\n\034DeleteDataLabelingJobReques" - + "t\022?\n\004name\030\001 \001(\tB1\340A\002\372A+\n)aiplatform.goog" - + "leapis.com/DataLabelingJob\"_\n\034CancelData" - + "LabelingJobRequest\022?\n\004name\030\001 \001(\tB1\340A\002\372A+" - + "\n)aiplatform.googleapis.com/DataLabeling" - + "Job\"\303\001\n$CreateHyperparameterTuningJobReq" - + "uest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!locations." - + "googleapis.com/Location\022`\n\031hyperparamete" - + "r_tuning_job\030\002 \001(\01328.google.cloud.aiplat" - + "form.v1beta1.HyperparameterTuningJobB\003\340A" - + "\002\"l\n!GetHyperparameterTuningJobRequest\022G" - + "\n\004name\030\001 \001(\tB9\340A\002\372A3\n1aiplatform.googlea" - + "pis.com/HyperparameterTuningJob\"\306\001\n#List" - + "HyperparameterTuningJobsRequest\0229\n\006paren" - + "t\030\001 \001(\tB)\340A\002\372A#\n!locations.googleapis.co" - + "m/Location\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage_size\030" - + "\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\022-\n\tread_mask\030\005" - + " \001(\0132\032.google.protobuf.FieldMask\"\235\001\n$Lis" - + "tHyperparameterTuningJobsResponse\022\\\n\032hyp" - + "erparameter_tuning_jobs\030\001 \003(\01328.google.c" - + "loud.aiplatform.v1beta1.HyperparameterTu" - + "ningJob\022\027\n\017next_page_token\030\002 \001(\t\"o\n$Dele" - + "teHyperparameterTuningJobRequest\022G\n\004name" + + "b\"\253\001\n\034CreateDataLabelingJobRequest\0229\n\006pa" + + "rent\030\001 \001(\tB)\340A\002\372A#\n!locations.googleapis" + + ".com/Location\022P\n\021data_labeling_job\030\002 \001(\013" + + "20.google.cloud.aiplatform.v1beta1.DataL" + + "abelingJobB\003\340A\002\"\\\n\031GetDataLabelingJobReq" + + "uest\022?\n\004name\030\001 \001(\tB1\340A\002\372A+\n)aiplatform.g" + + "oogleapis.com/DataLabelingJob\"\320\001\n\033ListDa" + + "taLabelingJobsRequest\0229\n\006parent\030\001 \001(\tB)\340" + + "A\002\372A#\n!locations.googleapis.com/Location" + + "\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022\022\n\np" + + "age_token\030\004 \001(\t\022-\n\tread_mask\030\005 \001(\0132\032.goo" + + "gle.protobuf.FieldMask\022\020\n\010order_by\030\006 \001(\t" + + "\"\205\001\n\034ListDataLabelingJobsResponse\022L\n\022dat" + + "a_labeling_jobs\030\001 \003(\01320.google.cloud.aip" + + "latform.v1beta1.DataLabelingJob\022\027\n\017next_" + + "page_token\030\002 \001(\t\"_\n\034DeleteDataLabelingJo" + + "bRequest\022?\n\004name\030\001 \001(\tB1\340A\002\372A+\n)aiplatfo" + + "rm.googleapis.com/DataLabelingJob\"_\n\034Can" + + "celDataLabelingJobRequest\022?\n\004name\030\001 \001(\tB" + + "1\340A\002\372A+\n)aiplatform.googleapis.com/DataL" + + "abelingJob\"\303\001\n$CreateHyperparameterTunin" + + "gJobRequest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!loc" + + "ations.googleapis.com/Location\022`\n\031hyperp" + + "arameter_tuning_job\030\002 \001(\01328.google.cloud" + + ".aiplatform.v1beta1.HyperparameterTuning" + + "JobB\003\340A\002\"l\n!GetHyperparameterTuningJobRe" + + "quest\022G\n\004name\030\001 \001(\tB9\340A\002\372A3\n1aiplatform." + + "googleapis.com/HyperparameterTuningJob\"\306" + + "\001\n#ListHyperparameterTuningJobsRequest\0229" + + "\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!locations.google" + + "apis.com/Location\022\016\n\006filter\030\002 \001(\t\022\021\n\tpag" + + "e_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\022-\n\tread" + + "_mask\030\005 \001(\0132\032.google.protobuf.FieldMask\"" + + "\235\001\n$ListHyperparameterTuningJobsResponse" + + "\022\\\n\032hyperparameter_tuning_jobs\030\001 \003(\01328.g" + + "oogle.cloud.aiplatform.v1beta1.Hyperpara" + + "meterTuningJob\022\027\n\017next_page_token\030\002 \001(\t\"" + + "o\n$DeleteHyperparameterTuningJobRequest\022" + + "G\n\004name\030\001 \001(\tB9\340A\002\372A3\n1aiplatform.google" + + "apis.com/HyperparameterTuningJob\"o\n$Canc" + + "elHyperparameterTuningJobRequest\022G\n\004name" + "\030\001 \001(\tB9\340A\002\372A3\n1aiplatform.googleapis.co" - + "m/HyperparameterTuningJob\"o\n$CancelHyper" - + "parameterTuningJobRequest\022G\n\004name\030\001 \001(\tB" - + "9\340A\002\372A3\n1aiplatform.googleapis.com/Hyper" - + "parameterTuningJob\"\264\001\n\037CreateBatchPredic" - + "tionJobRequest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!" - + "locations.googleapis.com/Location\022V\n\024bat" - + "ch_prediction_job\030\002 \001(\01323.google.cloud.a" - + "iplatform.v1beta1.BatchPredictionJobB\003\340A" - + "\002\"b\n\034GetBatchPredictionJobRequest\022B\n\004nam" - + "e\030\001 \001(\tB4\340A\002\372A.\n,aiplatform.googleapis.c" - + "om/BatchPredictionJob\"\301\001\n\036ListBatchPredi" - + "ctionJobsRequest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#" - + "\n!locations.googleapis.com/Location\022\016\n\006f" - + "ilter\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022\022\n\npage_t" - + "oken\030\004 \001(\t\022-\n\tread_mask\030\005 \001(\0132\032.google.p" - + "rotobuf.FieldMask\"\216\001\n\037ListBatchPredictio" - + "nJobsResponse\022R\n\025batch_prediction_jobs\030\001" - + " \003(\01323.google.cloud.aiplatform.v1beta1.B" - + "atchPredictionJob\022\027\n\017next_page_token\030\002 \001" - + "(\t\"e\n\037DeleteBatchPredictionJobRequest\022B\n" - + "\004name\030\001 \001(\tB4\340A\002\372A.\n,aiplatform.googleap" - + "is.com/BatchPredictionJob\"e\n\037CancelBatch" - + "PredictionJobRequest\022B\n\004name\030\001 \001(\tB4\340A\002\372" - + "A.\n,aiplatform.googleapis.com/BatchPredi" - + "ctionJob\"\323\001\n)CreateModelDeploymentMonito" - + "ringJobRequest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!" - + "locations.googleapis.com/Location\022k\n\037mod" - + "el_deployment_monitoring_job\030\002 \001(\0132=.goo" - + "gle.cloud.aiplatform.v1beta1.ModelDeploy" - + "mentMonitoringJobB\003\340A\002\"\371\004\n4SearchModelDe" - + "ploymentMonitoringStatsAnomaliesRequest\022" - + "g\n\037model_deployment_monitoring_job\030\001 \001(\t" - + "B>\340A\002\372A8\n6aiplatform.googleapis.com/Mode" - + "lDeploymentMonitoringJob\022\036\n\021deployed_mod" - + "el_id\030\002 \001(\tB\003\340A\002\022\034\n\024feature_display_name" - + "\030\003 \001(\t\022\206\001\n\nobjectives\030\004 \003(\0132m.google.clo" - + "ud.aiplatform.v1beta1.SearchModelDeploym" - + "entMonitoringStatsAnomaliesRequest.Stats" - + "AnomaliesObjectiveB\003\340A\002\022\021\n\tpage_size\030\005 \001" - + "(\005\022\022\n\npage_token\030\006 \001(\t\022.\n\nstart_time\030\007 \001" - + "(\0132\032.google.protobuf.Timestamp\022,\n\010end_ti" - + "me\030\010 \001(\0132\032.google.protobuf.Timestamp\032\213\001\n" - + "\027StatsAnomaliesObjective\022U\n\004type\030\001 \001(\0162G" - + ".google.cloud.aiplatform.v1beta1.ModelDe" - + "ploymentMonitoringObjectiveType\022\031\n\021top_f" - + "eature_count\030\004 \001(\005\"\252\001\n5SearchModelDeploy" - + "mentMonitoringStatsAnomaliesResponse\022X\n\020" - + "monitoring_stats\030\001 \003(\0132>.google.cloud.ai" - + "platform.v1beta1.ModelMonitoringStatsAno" - + "malies\022\027\n\017next_page_token\030\002 \001(\t\"v\n&GetMo" - + "delDeploymentMonitoringJobRequest\022L\n\004nam" - + "e\030\001 \001(\tB>\340A\002\372A8\n6aiplatform.googleapis.c" - + "om/ModelDeploymentMonitoringJob\"\313\001\n(List" - + "ModelDeploymentMonitoringJobsRequest\0229\n\006" - + "parent\030\001 \001(\tB)\340A\002\372A#\n!locations.googleap" - + "is.com/Location\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage_" - + "size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\022-\n\tread_m" - + "ask\030\005 \001(\0132\032.google.protobuf.FieldMask\"\255\001" - + "\n)ListModelDeploymentMonitoringJobsRespo" - + "nse\022g\n model_deployment_monitoring_jobs\030" - + "\001 \003(\0132=.google.cloud.aiplatform.v1beta1." - + "ModelDeploymentMonitoringJob\022\027\n\017next_pag" - + "e_token\030\002 \001(\t\"\316\001\n)UpdateModelDeploymentM" - + "onitoringJobRequest\022k\n\037model_deployment_" - + "monitoring_job\030\001 \001(\0132=.google.cloud.aipl" - + "atform.v1beta1.ModelDeploymentMonitoring" - + "JobB\003\340A\002\0224\n\013update_mask\030\002 \001(\0132\032.google.p" - + "rotobuf.FieldMaskB\003\340A\002\"y\n)DeleteModelDep" - + "loymentMonitoringJobRequest\022L\n\004name\030\001 \001(" - + "\tB>\340A\002\372A8\n6aiplatform.googleapis.com/Mod" - + "elDeploymentMonitoringJob\"x\n(PauseModelD" - + "eploymentMonitoringJobRequest\022L\n\004name\030\001 " - + "\001(\tB>\340A\002\372A8\n6aiplatform.googleapis.com/M" - + "odelDeploymentMonitoringJob\"y\n)ResumeMod" - + "elDeploymentMonitoringJobRequest\022L\n\004name" - + "\030\001 \001(\tB>\340A\002\372A8\n6aiplatform.googleapis.co" - + "m/ModelDeploymentMonitoringJob\"\212\001\n3Updat" - + "eModelDeploymentMonitoringJobOperationMe" - + "tadata\022S\n\020generic_metadata\030\001 \001(\01329.googl" - + "e.cloud.aiplatform.v1beta1.GenericOperat" - + "ionMetadata2\2208\n\nJobService\022\323\001\n\017CreateCus" - + "tomJob\0227.google.cloud.aiplatform.v1beta1" - + ".CreateCustomJobRequest\032*.google.cloud.a" - + "iplatform.v1beta1.CustomJob\"[\202\323\344\223\002A\"3/v1" - + "beta1/{parent=projects/*/locations/*}/cu" - + "stomJobs:\ncustom_job\332A\021parent,custom_job" - + "\022\264\001\n\014GetCustomJob\0224.google.cloud.aiplatf" - + "orm.v1beta1.GetCustomJobRequest\032*.google" - + ".cloud.aiplatform.v1beta1.CustomJob\"B\202\323\344" - + "\223\0025\0223/v1beta1/{name=projects/*/locations" - + "/*/customJobs/*}\332A\004name\022\307\001\n\016ListCustomJo" - + "bs\0226.google.cloud.aiplatform.v1beta1.Lis" - + "tCustomJobsRequest\0327.google.cloud.aiplat" - + "form.v1beta1.ListCustomJobsResponse\"D\202\323\344" - + "\223\0025\0223/v1beta1/{parent=projects/*/locatio" - + "ns/*}/customJobs\332A\006parent\022\340\001\n\017DeleteCust" - + "omJob\0227.google.cloud.aiplatform.v1beta1." - + "DeleteCustomJobRequest\032\035.google.longrunn" - + "ing.Operation\"u\202\323\344\223\0025*3/v1beta1/{name=pr" - + "ojects/*/locations/*/customJobs/*}\332A\004nam" - + "e\312A0\n\025google.protobuf.Empty\022\027DeleteOpera" - + "tionMetadata\022\260\001\n\017CancelCustomJob\0227.googl" - + "e.cloud.aiplatform.v1beta1.CancelCustomJ" - + "obRequest\032\026.google.protobuf.Empty\"L\202\323\344\223\002" - + "?\":/v1beta1/{name=projects/*/locations/*" - + "/customJobs/*}:cancel:\001*\332A\004name\022\371\001\n\025Crea" - + "teDataLabelingJob\022=.google.cloud.aiplatf" - + "orm.v1beta1.CreateDataLabelingJobRequest" - + "\0320.google.cloud.aiplatform.v1beta1.DataL" - + "abelingJob\"o\202\323\344\223\002N\"9/v1beta1/{parent=pro" - + "jects/*/locations/*}/dataLabelingJobs:\021d" - + "ata_labeling_job\332A\030parent,data_labeling_" - + "job\022\314\001\n\022GetDataLabelingJob\022:.google.clou" - + "d.aiplatform.v1beta1.GetDataLabelingJobR" - + "equest\0320.google.cloud.aiplatform.v1beta1" - + ".DataLabelingJob\"H\202\323\344\223\002;\0229/v1beta1/{name" - + "=projects/*/locations/*/dataLabelingJobs" - + "/*}\332A\004name\022\337\001\n\024ListDataLabelingJobs\022<.go" - + "ogle.cloud.aiplatform.v1beta1.ListDataLa" - + "belingJobsRequest\032=.google.cloud.aiplatf" - + "orm.v1beta1.ListDataLabelingJobsResponse" - + "\"J\202\323\344\223\002;\0229/v1beta1/{parent=projects/*/lo" - + "cations/*}/dataLabelingJobs\332A\006parent\022\362\001\n" - + "\025DeleteDataLabelingJob\022=.google.cloud.ai" - + "platform.v1beta1.DeleteDataLabelingJobRe" - + "quest\032\035.google.longrunning.Operation\"{\202\323" - + "\344\223\002;*9/v1beta1/{name=projects/*/location" - + "s/*/dataLabelingJobs/*}\332A\004name\312A0\n\025googl" - + "e.protobuf.Empty\022\027DeleteOperationMetadat" - + "a\022\302\001\n\025CancelDataLabelingJob\022=.google.clo" - + "ud.aiplatform.v1beta1.CancelDataLabeling" - + "JobRequest\032\026.google.protobuf.Empty\"R\202\323\344\223" - + "\002E\"@/v1beta1/{name=projects/*/locations/" - + "*/dataLabelingJobs/*}:cancel:\001*\332A\004name\022\252" - + "\002\n\035CreateHyperparameterTuningJob\022E.googl" - + "e.cloud.aiplatform.v1beta1.CreateHyperpa" - + "rameterTuningJobRequest\0328.google.cloud.a" - + "iplatform.v1beta1.HyperparameterTuningJo" - + "b\"\207\001\202\323\344\223\002^\"A/v1beta1/{parent=projects/*/" - + "locations/*}/hyperparameterTuningJobs:\031h" - + "yperparameter_tuning_job\332A parent,hyperp" - + "arameter_tuning_job\022\354\001\n\032GetHyperparamete" - + "rTuningJob\022B.google.cloud.aiplatform.v1b" - + "eta1.GetHyperparameterTuningJobRequest\0328" - + ".google.cloud.aiplatform.v1beta1.Hyperpa" - + "rameterTuningJob\"P\202\323\344\223\002C\022A/v1beta1/{name" - + "=projects/*/locations/*/hyperparameterTu" - + "ningJobs/*}\332A\004name\022\377\001\n\034ListHyperparamete" - + "rTuningJobs\022D.google.cloud.aiplatform.v1" - + "beta1.ListHyperparameterTuningJobsReques" - + "t\032E.google.cloud.aiplatform.v1beta1.List" - + "HyperparameterTuningJobsResponse\"R\202\323\344\223\002C" - + "\022A/v1beta1/{parent=projects/*/locations/" - + "*}/hyperparameterTuningJobs\332A\006parent\022\213\002\n" - + "\035DeleteHyperparameterTuningJob\022E.google." - + "cloud.aiplatform.v1beta1.DeleteHyperpara" - + "meterTuningJobRequest\032\035.google.longrunni" - + "ng.Operation\"\203\001\202\323\344\223\002C*A/v1beta1/{name=pr" - + "ojects/*/locations/*/hyperparameterTunin" - + "gJobs/*}\332A\004name\312A0\n\025google.protobuf.Empt" - + "y\022\027DeleteOperationMetadata\022\332\001\n\035CancelHyp" + + "m/HyperparameterTuningJob\"\217\001\n\023CreateNasJ" + + "obRequest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!locat" + + "ions.googleapis.com/Location\022=\n\007nas_job\030" + + "\002 \001(\0132\'.google.cloud.aiplatform.v1beta1." + + "NasJobB\003\340A\002\"J\n\020GetNasJobRequest\0226\n\004name\030" + + "\001 \001(\tB(\340A\002\372A\"\n aiplatform.googleapis.com" + + "/NasJob\"\265\001\n\022ListNasJobsRequest\0229\n\006parent" + + "\030\001 \001(\tB)\340A\002\372A#\n!locations.googleapis.com" + + "/Location\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage_size\030\003" + + " \001(\005\022\022\n\npage_token\030\004 \001(\t\022-\n\tread_mask\030\005 " + + "\001(\0132\032.google.protobuf.FieldMask\"i\n\023ListN" + + "asJobsResponse\0229\n\010nas_jobs\030\001 \003(\0132\'.googl" + + "e.cloud.aiplatform.v1beta1.NasJob\022\027\n\017nex" + + "t_page_token\030\002 \001(\t\"M\n\023DeleteNasJobReques" + + "t\0226\n\004name\030\001 \001(\tB(\340A\002\372A\"\n aiplatform.goog" + + "leapis.com/NasJob\"M\n\023CancelNasJobRequest" + + "\0226\n\004name\030\001 \001(\tB(\340A\002\372A\"\n aiplatform.googl" + + "eapis.com/NasJob\"Z\n\030GetNasTrialDetailReq" + + "uest\022>\n\004name\030\001 \001(\tB0\340A\002\372A*\n(aiplatform.g" + + "oogleapis.com/NasTrialDetail\"}\n\032ListNasT" + + "rialDetailsRequest\0228\n\006parent\030\001 \001(\tB(\340A\002\372" + + "A\"\n aiplatform.googleapis.com/NasJob\022\021\n\t" + + "page_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"\202\001\n\033" + + "ListNasTrialDetailsResponse\022J\n\021nas_trial" + + "_details\030\001 \003(\0132/.google.cloud.aiplatform" + + ".v1beta1.NasTrialDetail\022\027\n\017next_page_tok" + + "en\030\002 \001(\t\"\264\001\n\037CreateBatchPredictionJobReq" + + "uest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!locations." + + "googleapis.com/Location\022V\n\024batch_predict" + + "ion_job\030\002 \001(\01323.google.cloud.aiplatform." + + "v1beta1.BatchPredictionJobB\003\340A\002\"b\n\034GetBa" + + "tchPredictionJobRequest\022B\n\004name\030\001 \001(\tB4\340" + + "A\002\372A.\n,aiplatform.googleapis.com/BatchPr" + + "edictionJob\"\301\001\n\036ListBatchPredictionJobsR" + + "equest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!location" + + "s.googleapis.com/Location\022\016\n\006filter\030\002 \001(" + + "\t\022\021\n\tpage_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t" + + "\022-\n\tread_mask\030\005 \001(\0132\032.google.protobuf.Fi" + + "eldMask\"\216\001\n\037ListBatchPredictionJobsRespo" + + "nse\022R\n\025batch_prediction_jobs\030\001 \003(\01323.goo" + + "gle.cloud.aiplatform.v1beta1.BatchPredic" + + "tionJob\022\027\n\017next_page_token\030\002 \001(\t\"e\n\037Dele" + + "teBatchPredictionJobRequest\022B\n\004name\030\001 \001(" + + "\tB4\340A\002\372A.\n,aiplatform.googleapis.com/Bat" + + "chPredictionJob\"e\n\037CancelBatchPrediction" + + "JobRequest\022B\n\004name\030\001 \001(\tB4\340A\002\372A.\n,aiplat" + + "form.googleapis.com/BatchPredictionJob\"\323" + + "\001\n)CreateModelDeploymentMonitoringJobReq" + + "uest\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!locations." + + "googleapis.com/Location\022k\n\037model_deploym" + + "ent_monitoring_job\030\002 \001(\0132=.google.cloud." + + "aiplatform.v1beta1.ModelDeploymentMonito" + + "ringJobB\003\340A\002\"\371\004\n4SearchModelDeploymentMo" + + "nitoringStatsAnomaliesRequest\022g\n\037model_d" + + "eployment_monitoring_job\030\001 \001(\tB>\340A\002\372A8\n6" + + "aiplatform.googleapis.com/ModelDeploymen" + + "tMonitoringJob\022\036\n\021deployed_model_id\030\002 \001(" + + "\tB\003\340A\002\022\034\n\024feature_display_name\030\003 \001(\t\022\206\001\n" + + "\nobjectives\030\004 \003(\0132m.google.cloud.aiplatf" + + "orm.v1beta1.SearchModelDeploymentMonitor" + + "ingStatsAnomaliesRequest.StatsAnomaliesO" + + "bjectiveB\003\340A\002\022\021\n\tpage_size\030\005 \001(\005\022\022\n\npage" + + "_token\030\006 \001(\t\022.\n\nstart_time\030\007 \001(\0132\032.googl" + + "e.protobuf.Timestamp\022,\n\010end_time\030\010 \001(\0132\032" + + ".google.protobuf.Timestamp\032\213\001\n\027StatsAnom" + + "aliesObjective\022U\n\004type\030\001 \001(\0162G.google.cl" + + "oud.aiplatform.v1beta1.ModelDeploymentMo" + + "nitoringObjectiveType\022\031\n\021top_feature_cou" + + "nt\030\004 \001(\005\"\252\001\n5SearchModelDeploymentMonito" + + "ringStatsAnomaliesResponse\022X\n\020monitoring" + + "_stats\030\001 \003(\0132>.google.cloud.aiplatform.v" + + "1beta1.ModelMonitoringStatsAnomalies\022\027\n\017" + + "next_page_token\030\002 \001(\t\"v\n&GetModelDeploym" + + "entMonitoringJobRequest\022L\n\004name\030\001 \001(\tB>\340" + + "A\002\372A8\n6aiplatform.googleapis.com/ModelDe" + + "ploymentMonitoringJob\"\313\001\n(ListModelDeplo" + + "ymentMonitoringJobsRequest\0229\n\006parent\030\001 \001" + + "(\tB)\340A\002\372A#\n!locations.googleapis.com/Loc" + + "ation\022\016\n\006filter\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005" + + "\022\022\n\npage_token\030\004 \001(\t\022-\n\tread_mask\030\005 \001(\0132" + + "\032.google.protobuf.FieldMask\"\255\001\n)ListMode" + + "lDeploymentMonitoringJobsResponse\022g\n mod" + + "el_deployment_monitoring_jobs\030\001 \003(\0132=.go" + + "ogle.cloud.aiplatform.v1beta1.ModelDeplo" + + "ymentMonitoringJob\022\027\n\017next_page_token\030\002 " + + "\001(\t\"\316\001\n)UpdateModelDeploymentMonitoringJ" + + "obRequest\022k\n\037model_deployment_monitoring" + + "_job\030\001 \001(\0132=.google.cloud.aiplatform.v1b" + + "eta1.ModelDeploymentMonitoringJobB\003\340A\002\0224" + + "\n\013update_mask\030\002 \001(\0132\032.google.protobuf.Fi" + + "eldMaskB\003\340A\002\"y\n)DeleteModelDeploymentMon" + + "itoringJobRequest\022L\n\004name\030\001 \001(\tB>\340A\002\372A8\n" + + "6aiplatform.googleapis.com/ModelDeployme" + + "ntMonitoringJob\"x\n(PauseModelDeploymentM" + + "onitoringJobRequest\022L\n\004name\030\001 \001(\tB>\340A\002\372A" + + "8\n6aiplatform.googleapis.com/ModelDeploy" + + "mentMonitoringJob\"y\n)ResumeModelDeployme" + + "ntMonitoringJobRequest\022L\n\004name\030\001 \001(\tB>\340A" + + "\002\372A8\n6aiplatform.googleapis.com/ModelDep" + + "loymentMonitoringJob\"\212\001\n3UpdateModelDepl" + + "oymentMonitoringJobOperationMetadata\022S\n\020" + + "generic_metadata\030\001 \001(\01329.google.cloud.ai" + + "platform.v1beta1.GenericOperationMetadat" + + "a2\270C\n\nJobService\022\323\001\n\017CreateCustomJob\0227.g" + + "oogle.cloud.aiplatform.v1beta1.CreateCus" + + "tomJobRequest\032*.google.cloud.aiplatform." + + "v1beta1.CustomJob\"[\202\323\344\223\002A\"3/v1beta1/{par" + + "ent=projects/*/locations/*}/customJobs:\n" + + "custom_job\332A\021parent,custom_job\022\264\001\n\014GetCu" + + "stomJob\0224.google.cloud.aiplatform.v1beta" + + "1.GetCustomJobRequest\032*.google.cloud.aip" + + "latform.v1beta1.CustomJob\"B\202\323\344\223\0025\0223/v1be" + + "ta1/{name=projects/*/locations/*/customJ" + + "obs/*}\332A\004name\022\307\001\n\016ListCustomJobs\0226.googl" + + "e.cloud.aiplatform.v1beta1.ListCustomJob" + + "sRequest\0327.google.cloud.aiplatform.v1bet" + + "a1.ListCustomJobsResponse\"D\202\323\344\223\0025\0223/v1be" + + "ta1/{parent=projects/*/locations/*}/cust" + + "omJobs\332A\006parent\022\340\001\n\017DeleteCustomJob\0227.go" + + "ogle.cloud.aiplatform.v1beta1.DeleteCust" + + "omJobRequest\032\035.google.longrunning.Operat" + + "ion\"u\202\323\344\223\0025*3/v1beta1/{name=projects/*/l" + + "ocations/*/customJobs/*}\332A\004name\312A0\n\025goog" + + "le.protobuf.Empty\022\027DeleteOperationMetada" + + "ta\022\260\001\n\017CancelCustomJob\0227.google.cloud.ai" + + "platform.v1beta1.CancelCustomJobRequest\032" + + "\026.google.protobuf.Empty\"L\202\323\344\223\002?\":/v1beta" + + "1/{name=projects/*/locations/*/customJob" + + "s/*}:cancel:\001*\332A\004name\022\371\001\n\025CreateDataLabe" + + "lingJob\022=.google.cloud.aiplatform.v1beta" + + "1.CreateDataLabelingJobRequest\0320.google." + + "cloud.aiplatform.v1beta1.DataLabelingJob" + + "\"o\202\323\344\223\002N\"9/v1beta1/{parent=projects/*/lo" + + "cations/*}/dataLabelingJobs:\021data_labeli" + + "ng_job\332A\030parent,data_labeling_job\022\314\001\n\022Ge" + + "tDataLabelingJob\022:.google.cloud.aiplatfo" + + "rm.v1beta1.GetDataLabelingJobRequest\0320.g" + + "oogle.cloud.aiplatform.v1beta1.DataLabel" + + "ingJob\"H\202\323\344\223\002;\0229/v1beta1/{name=projects/" + + "*/locations/*/dataLabelingJobs/*}\332A\004name" + + "\022\337\001\n\024ListDataLabelingJobs\022<.google.cloud" + + ".aiplatform.v1beta1.ListDataLabelingJobs" + + "Request\032=.google.cloud.aiplatform.v1beta" + + "1.ListDataLabelingJobsResponse\"J\202\323\344\223\002;\0229" + + "/v1beta1/{parent=projects/*/locations/*}" + + "/dataLabelingJobs\332A\006parent\022\362\001\n\025DeleteDat" + + "aLabelingJob\022=.google.cloud.aiplatform.v" + + "1beta1.DeleteDataLabelingJobRequest\032\035.go" + + "ogle.longrunning.Operation\"{\202\323\344\223\002;*9/v1b" + + "eta1/{name=projects/*/locations/*/dataLa" + + "belingJobs/*}\332A\004name\312A0\n\025google.protobuf" + + ".Empty\022\027DeleteOperationMetadata\022\302\001\n\025Canc" + + "elDataLabelingJob\022=.google.cloud.aiplatf" + + "orm.v1beta1.CancelDataLabelingJobRequest" + + "\032\026.google.protobuf.Empty\"R\202\323\344\223\002E\"@/v1bet" + + "a1/{name=projects/*/locations/*/dataLabe" + + "lingJobs/*}:cancel:\001*\332A\004name\022\252\002\n\035CreateH" + + "yperparameterTuningJob\022E.google.cloud.ai" + + "platform.v1beta1.CreateHyperparameterTun" + + "ingJobRequest\0328.google.cloud.aiplatform." + + "v1beta1.HyperparameterTuningJob\"\207\001\202\323\344\223\002^" + + "\"A/v1beta1/{parent=projects/*/locations/" + + "*}/hyperparameterTuningJobs:\031hyperparame" + + "ter_tuning_job\332A parent,hyperparameter_t" + + "uning_job\022\354\001\n\032GetHyperparameterTuningJob" + + "\022B.google.cloud.aiplatform.v1beta1.GetHy" + + "perparameterTuningJobRequest\0328.google.cl" + + "oud.aiplatform.v1beta1.HyperparameterTun" + + "ingJob\"P\202\323\344\223\002C\022A/v1beta1/{name=projects/" + + "*/locations/*/hyperparameterTuningJobs/*" + + "}\332A\004name\022\377\001\n\034ListHyperparameterTuningJob" + + "s\022D.google.cloud.aiplatform.v1beta1.List" + + "HyperparameterTuningJobsRequest\032E.google" + + ".cloud.aiplatform.v1beta1.ListHyperparam" + + "eterTuningJobsResponse\"R\202\323\344\223\002C\022A/v1beta1" + + "/{parent=projects/*/locations/*}/hyperpa" + + "rameterTuningJobs\332A\006parent\022\213\002\n\035DeleteHyp" + "erparameterTuningJob\022E.google.cloud.aipl" - + "atform.v1beta1.CancelHyperparameterTunin" - + "gJobRequest\032\026.google.protobuf.Empty\"Z\202\323\344" - + "\223\002M\"H/v1beta1/{name=projects/*/locations" - + "/*/hyperparameterTuningJobs/*}:cancel:\001*" - + "\332A\004name\022\213\002\n\030CreateBatchPredictionJob\022@.g" - + "oogle.cloud.aiplatform.v1beta1.CreateBat" - + "chPredictionJobRequest\0323.google.cloud.ai" - + "platform.v1beta1.BatchPredictionJob\"x\202\323\344" - + "\223\002T\"\022\022*\022\022* + * Request message for + * [JobService.ListNasJobs][google.cloud.aiplatform.v1beta1.JobService.ListNasJobs]. + *
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.ListNasJobsRequest} + */ +public final class ListNasJobsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.ListNasJobsRequest) + ListNasJobsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListNasJobsRequest.newBuilder() to construct. + private ListNasJobsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListNasJobsRequest() { + parent_ = ""; + filter_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListNasJobsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListNasJobsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListNasJobsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.ListNasJobsRequest.class, + com.google.cloud.aiplatform.v1beta1.ListNasJobsRequest.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 NasJobs
+   * 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 NasJobs
+   * 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_ = ""; + /** + * + * + *
+   * The standard list filter.
+   * Supported fields:
+   *   * `display_name` supports `=`, `!=` comparisons, and `:` wildcard.
+   *   * `state` supports `=`, `!=` comparisons.
+   *   * `create_time` supports `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons.
+   *     `create_time` must be in RFC 3339 format.
+   *   * `labels` supports general map functions that is:
+   *     `labels.key=value` - key:value equality
+   *     `labels.key:* - key existence
+   * Some examples of using the filter are:
+   *   * `state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*"`
+   *   * `state!="JOB_STATE_FAILED" OR display_name="my_job"`
+   *   * `NOT display_name="my_job"`
+   *   * `create_time>"2021-05-18T00:00:00Z"`
+   *   * `labels.keyA=valueA`
+   *   * `labels.keyB:*`
+   * 
+ * + * string filter = 2; + * + * @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; + } + } + /** + * + * + *
+   * The standard list filter.
+   * Supported fields:
+   *   * `display_name` supports `=`, `!=` comparisons, and `:` wildcard.
+   *   * `state` supports `=`, `!=` comparisons.
+   *   * `create_time` supports `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons.
+   *     `create_time` must be in RFC 3339 format.
+   *   * `labels` supports general map functions that is:
+   *     `labels.key=value` - key:value equality
+   *     `labels.key:* - key existence
+   * Some examples of using the filter are:
+   *   * `state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*"`
+   *   * `state!="JOB_STATE_FAILED" OR display_name="my_job"`
+   *   * `NOT display_name="my_job"`
+   *   * `create_time>"2021-05-18T00:00:00Z"`
+   *   * `labels.keyA=valueA`
+   *   * `labels.keyB:*`
+   * 
+ * + * string filter = 2; + * + * @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; + /** + * + * + *
+   * The standard list page size.
+   * 
+ * + * int32 page_size = 3; + * + * @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_ = ""; + /** + * + * + *
+   * The standard list page token.
+   * Typically obtained via
+   * [ListNasJobsResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListNasJobsResponse.next_page_token]
+   * of the previous
+   * [JobService.ListNasJobs][google.cloud.aiplatform.v1beta1.JobService.ListNasJobs]
+   * call.
+   * 
+ * + * string page_token = 4; + * + * @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; + } + } + /** + * + * + *
+   * The standard list page token.
+   * Typically obtained via
+   * [ListNasJobsResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListNasJobsResponse.next_page_token]
+   * of the previous
+   * [JobService.ListNasJobs][google.cloud.aiplatform.v1beta1.JobService.ListNasJobs]
+   * call.
+   * 
+ * + * string page_token = 4; + * + * @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_; + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return Whether the readMask field is set. + */ + @java.lang.Override + public boolean hasReadMask() { + return readMask_ != null; + } + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return The readMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getReadMask() { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + + 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 (readMask_ != null) { + output.writeMessage(5, getReadMask()); + } + 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 (readMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getReadMask()); + } + 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.ListNasJobsRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.ListNasJobsRequest other = + (com.google.cloud.aiplatform.v1beta1.ListNasJobsRequest) 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 (!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 = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.ListNasJobsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNasJobsRequest 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.ListNasJobsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNasJobsRequest 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.ListNasJobsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNasJobsRequest 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.ListNasJobsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNasJobsRequest 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.ListNasJobsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNasJobsRequest 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.ListNasJobsRequest 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.ListNasJobsRequest 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.ListNasJobsRequest 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
+   * [JobService.ListNasJobs][google.cloud.aiplatform.v1beta1.JobService.ListNasJobs].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.ListNasJobsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.ListNasJobsRequest) + com.google.cloud.aiplatform.v1beta1.ListNasJobsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListNasJobsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListNasJobsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.ListNasJobsRequest.class, + com.google.cloud.aiplatform.v1beta1.ListNasJobsRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.ListNasJobsRequest.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_ = ""; + readMask_ = null; + if (readMaskBuilder_ != null) { + readMaskBuilder_.dispose(); + readMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListNasJobsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListNasJobsRequest getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.ListNasJobsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListNasJobsRequest build() { + com.google.cloud.aiplatform.v1beta1.ListNasJobsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListNasJobsRequest buildPartial() { + com.google.cloud.aiplatform.v1beta1.ListNasJobsRequest result = + new com.google.cloud.aiplatform.v1beta1.ListNasJobsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.ListNasJobsRequest 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_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.readMask_ = readMaskBuilder_ == null ? readMask_ : readMaskBuilder_.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.ListNasJobsRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.ListNasJobsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.ListNasJobsRequest other) { + if (other == com.google.cloud.aiplatform.v1beta1.ListNasJobsRequest.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()); + } + 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 + 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 NasJobs
+     * 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 NasJobs
+     * 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 NasJobs
+     * 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 NasJobs
+     * 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 NasJobs
+     * 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_ = ""; + /** + * + * + *
+     * The standard list filter.
+     * Supported fields:
+     *   * `display_name` supports `=`, `!=` comparisons, and `:` wildcard.
+     *   * `state` supports `=`, `!=` comparisons.
+     *   * `create_time` supports `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons.
+     *     `create_time` must be in RFC 3339 format.
+     *   * `labels` supports general map functions that is:
+     *     `labels.key=value` - key:value equality
+     *     `labels.key:* - key existence
+     * Some examples of using the filter are:
+     *   * `state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*"`
+     *   * `state!="JOB_STATE_FAILED" OR display_name="my_job"`
+     *   * `NOT display_name="my_job"`
+     *   * `create_time>"2021-05-18T00:00:00Z"`
+     *   * `labels.keyA=valueA`
+     *   * `labels.keyB:*`
+     * 
+ * + * string filter = 2; + * + * @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; + } + } + /** + * + * + *
+     * The standard list filter.
+     * Supported fields:
+     *   * `display_name` supports `=`, `!=` comparisons, and `:` wildcard.
+     *   * `state` supports `=`, `!=` comparisons.
+     *   * `create_time` supports `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons.
+     *     `create_time` must be in RFC 3339 format.
+     *   * `labels` supports general map functions that is:
+     *     `labels.key=value` - key:value equality
+     *     `labels.key:* - key existence
+     * Some examples of using the filter are:
+     *   * `state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*"`
+     *   * `state!="JOB_STATE_FAILED" OR display_name="my_job"`
+     *   * `NOT display_name="my_job"`
+     *   * `create_time>"2021-05-18T00:00:00Z"`
+     *   * `labels.keyA=valueA`
+     *   * `labels.keyB:*`
+     * 
+ * + * string filter = 2; + * + * @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; + } + } + /** + * + * + *
+     * The standard list filter.
+     * Supported fields:
+     *   * `display_name` supports `=`, `!=` comparisons, and `:` wildcard.
+     *   * `state` supports `=`, `!=` comparisons.
+     *   * `create_time` supports `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons.
+     *     `create_time` must be in RFC 3339 format.
+     *   * `labels` supports general map functions that is:
+     *     `labels.key=value` - key:value equality
+     *     `labels.key:* - key existence
+     * Some examples of using the filter are:
+     *   * `state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*"`
+     *   * `state!="JOB_STATE_FAILED" OR display_name="my_job"`
+     *   * `NOT display_name="my_job"`
+     *   * `create_time>"2021-05-18T00:00:00Z"`
+     *   * `labels.keyA=valueA`
+     *   * `labels.keyB:*`
+     * 
+ * + * string filter = 2; + * + * @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; + } + /** + * + * + *
+     * The standard list filter.
+     * Supported fields:
+     *   * `display_name` supports `=`, `!=` comparisons, and `:` wildcard.
+     *   * `state` supports `=`, `!=` comparisons.
+     *   * `create_time` supports `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons.
+     *     `create_time` must be in RFC 3339 format.
+     *   * `labels` supports general map functions that is:
+     *     `labels.key=value` - key:value equality
+     *     `labels.key:* - key existence
+     * Some examples of using the filter are:
+     *   * `state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*"`
+     *   * `state!="JOB_STATE_FAILED" OR display_name="my_job"`
+     *   * `NOT display_name="my_job"`
+     *   * `create_time>"2021-05-18T00:00:00Z"`
+     *   * `labels.keyA=valueA`
+     *   * `labels.keyB:*`
+     * 
+ * + * string filter = 2; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list filter.
+     * Supported fields:
+     *   * `display_name` supports `=`, `!=` comparisons, and `:` wildcard.
+     *   * `state` supports `=`, `!=` comparisons.
+     *   * `create_time` supports `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons.
+     *     `create_time` must be in RFC 3339 format.
+     *   * `labels` supports general map functions that is:
+     *     `labels.key=value` - key:value equality
+     *     `labels.key:* - key existence
+     * Some examples of using the filter are:
+     *   * `state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*"`
+     *   * `state!="JOB_STATE_FAILED" OR display_name="my_job"`
+     *   * `NOT display_name="my_job"`
+     *   * `create_time>"2021-05-18T00:00:00Z"`
+     *   * `labels.keyA=valueA`
+     *   * `labels.keyB:*`
+     * 
+ * + * string filter = 2; + * + * @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_; + /** + * + * + *
+     * The standard list page size.
+     * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The standard list page size.
+     * 
+ * + * int32 page_size = 3; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list page size.
+     * 
+ * + * int32 page_size = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000004); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained via
+     * [ListNasJobsResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListNasJobsResponse.next_page_token]
+     * of the previous
+     * [JobService.ListNasJobs][google.cloud.aiplatform.v1beta1.JobService.ListNasJobs]
+     * call.
+     * 
+ * + * string page_token = 4; + * + * @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; + } + } + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained via
+     * [ListNasJobsResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListNasJobsResponse.next_page_token]
+     * of the previous
+     * [JobService.ListNasJobs][google.cloud.aiplatform.v1beta1.JobService.ListNasJobs]
+     * call.
+     * 
+ * + * string page_token = 4; + * + * @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; + } + } + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained via
+     * [ListNasJobsResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListNasJobsResponse.next_page_token]
+     * of the previous
+     * [JobService.ListNasJobs][google.cloud.aiplatform.v1beta1.JobService.ListNasJobs]
+     * call.
+     * 
+ * + * string page_token = 4; + * + * @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; + } + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained via
+     * [ListNasJobsResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListNasJobsResponse.next_page_token]
+     * of the previous
+     * [JobService.ListNasJobs][google.cloud.aiplatform.v1beta1.JobService.ListNasJobs]
+     * call.
+     * 
+ * + * string page_token = 4; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained via
+     * [ListNasJobsResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListNasJobsResponse.next_page_token]
+     * of the previous
+     * [JobService.ListNasJobs][google.cloud.aiplatform.v1beta1.JobService.ListNasJobs]
+     * call.
+     * 
+ * + * string page_token = 4; + * + * @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_; + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return Whether the readMask field is set. + */ + public boolean hasReadMask() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @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(); + } + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + 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; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + 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; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + 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); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public Builder clearReadMask() { + bitField0_ = (bitField0_ & ~0x00000010); + readMask_ = null; + if (readMaskBuilder_ != null) { + readMaskBuilder_.dispose(); + readMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public com.google.protobuf.FieldMask.Builder getReadMaskBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getReadMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + public com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder() { + if (readMaskBuilder_ != null) { + return readMaskBuilder_.getMessageOrBuilder(); + } else { + return readMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : readMask_; + } + } + /** + * + * + *
+     * Mask specifying which fields to read.
+     * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + 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_; + } + + @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.ListNasJobsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.ListNasJobsRequest) + private static final com.google.cloud.aiplatform.v1beta1.ListNasJobsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.ListNasJobsRequest(); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNasJobsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListNasJobsRequest 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.ListNasJobsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListNasJobsRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListNasJobsRequestOrBuilder.java new file mode 100644 index 000000000000..1533abd1527c --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListNasJobsRequestOrBuilder.java @@ -0,0 +1,194 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/job_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +public interface ListNasJobsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.ListNasJobsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the Location to list the NasJobs
+   * 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 NasJobs
+   * 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(); + + /** + * + * + *
+   * The standard list filter.
+   * Supported fields:
+   *   * `display_name` supports `=`, `!=` comparisons, and `:` wildcard.
+   *   * `state` supports `=`, `!=` comparisons.
+   *   * `create_time` supports `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons.
+   *     `create_time` must be in RFC 3339 format.
+   *   * `labels` supports general map functions that is:
+   *     `labels.key=value` - key:value equality
+   *     `labels.key:* - key existence
+   * Some examples of using the filter are:
+   *   * `state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*"`
+   *   * `state!="JOB_STATE_FAILED" OR display_name="my_job"`
+   *   * `NOT display_name="my_job"`
+   *   * `create_time>"2021-05-18T00:00:00Z"`
+   *   * `labels.keyA=valueA`
+   *   * `labels.keyB:*`
+   * 
+ * + * string filter = 2; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * The standard list filter.
+   * Supported fields:
+   *   * `display_name` supports `=`, `!=` comparisons, and `:` wildcard.
+   *   * `state` supports `=`, `!=` comparisons.
+   *   * `create_time` supports `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons.
+   *     `create_time` must be in RFC 3339 format.
+   *   * `labels` supports general map functions that is:
+   *     `labels.key=value` - key:value equality
+   *     `labels.key:* - key existence
+   * Some examples of using the filter are:
+   *   * `state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*"`
+   *   * `state!="JOB_STATE_FAILED" OR display_name="my_job"`
+   *   * `NOT display_name="my_job"`
+   *   * `create_time>"2021-05-18T00:00:00Z"`
+   *   * `labels.keyA=valueA`
+   *   * `labels.keyB:*`
+   * 
+ * + * string filter = 2; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * The standard list page size.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The standard list page token.
+   * Typically obtained via
+   * [ListNasJobsResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListNasJobsResponse.next_page_token]
+   * of the previous
+   * [JobService.ListNasJobs][google.cloud.aiplatform.v1beta1.JobService.ListNasJobs]
+   * call.
+   * 
+ * + * string page_token = 4; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The standard list page token.
+   * Typically obtained via
+   * [ListNasJobsResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListNasJobsResponse.next_page_token]
+   * of the previous
+   * [JobService.ListNasJobs][google.cloud.aiplatform.v1beta1.JobService.ListNasJobs]
+   * call.
+   * 
+ * + * string page_token = 4; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return Whether the readMask field is set. + */ + boolean hasReadMask(); + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + * + * @return The readMask. + */ + com.google.protobuf.FieldMask getReadMask(); + /** + * + * + *
+   * Mask specifying which fields to read.
+   * 
+ * + * .google.protobuf.FieldMask read_mask = 5; + */ + com.google.protobuf.FieldMaskOrBuilder getReadMaskOrBuilder(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListNasJobsResponse.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListNasJobsResponse.java new file mode 100644 index 000000000000..bf25b3e6407a --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListNasJobsResponse.java @@ -0,0 +1,1192 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/job_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Response message for
+ * [JobService.ListNasJobs][google.cloud.aiplatform.v1beta1.JobService.ListNasJobs]
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.ListNasJobsResponse} + */ +public final class ListNasJobsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.ListNasJobsResponse) + ListNasJobsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListNasJobsResponse.newBuilder() to construct. + private ListNasJobsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListNasJobsResponse() { + nasJobs_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListNasJobsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListNasJobsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListNasJobsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.ListNasJobsResponse.class, + com.google.cloud.aiplatform.v1beta1.ListNasJobsResponse.Builder.class); + } + + public static final int NAS_JOBS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List nasJobs_; + /** + * + * + *
+   * List of NasJobs in the requested page.
+   * [NasJob.nas_job_output][google.cloud.aiplatform.v1beta1.NasJob.nas_job_output]
+   * of the jobs will not be returned.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NasJob nas_jobs = 1; + */ + @java.lang.Override + public java.util.List getNasJobsList() { + return nasJobs_; + } + /** + * + * + *
+   * List of NasJobs in the requested page.
+   * [NasJob.nas_job_output][google.cloud.aiplatform.v1beta1.NasJob.nas_job_output]
+   * of the jobs will not be returned.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NasJob nas_jobs = 1; + */ + @java.lang.Override + public java.util.List + getNasJobsOrBuilderList() { + return nasJobs_; + } + /** + * + * + *
+   * List of NasJobs in the requested page.
+   * [NasJob.nas_job_output][google.cloud.aiplatform.v1beta1.NasJob.nas_job_output]
+   * of the jobs will not be returned.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NasJob nas_jobs = 1; + */ + @java.lang.Override + public int getNasJobsCount() { + return nasJobs_.size(); + } + /** + * + * + *
+   * List of NasJobs in the requested page.
+   * [NasJob.nas_job_output][google.cloud.aiplatform.v1beta1.NasJob.nas_job_output]
+   * of the jobs will not be returned.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NasJob nas_jobs = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasJob getNasJobs(int index) { + return nasJobs_.get(index); + } + /** + * + * + *
+   * List of NasJobs in the requested page.
+   * [NasJob.nas_job_output][google.cloud.aiplatform.v1beta1.NasJob.nas_job_output]
+   * of the jobs will not be returned.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NasJob nas_jobs = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasJobOrBuilder getNasJobsOrBuilder(int index) { + return nasJobs_.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
+   * [ListNasJobsRequest.page_token][google.cloud.aiplatform.v1beta1.ListNasJobsRequest.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
+   * [ListNasJobsRequest.page_token][google.cloud.aiplatform.v1beta1.ListNasJobsRequest.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 < nasJobs_.size(); i++) { + output.writeMessage(1, nasJobs_.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 < nasJobs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, nasJobs_.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.ListNasJobsResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.ListNasJobsResponse other = + (com.google.cloud.aiplatform.v1beta1.ListNasJobsResponse) obj; + + if (!getNasJobsList().equals(other.getNasJobsList())) 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 (getNasJobsCount() > 0) { + hash = (37 * hash) + NAS_JOBS_FIELD_NUMBER; + hash = (53 * hash) + getNasJobsList().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.ListNasJobsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNasJobsResponse 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.ListNasJobsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNasJobsResponse 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.ListNasJobsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNasJobsResponse 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.ListNasJobsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNasJobsResponse 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.ListNasJobsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNasJobsResponse 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.ListNasJobsResponse 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.ListNasJobsResponse 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.ListNasJobsResponse 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
+   * [JobService.ListNasJobs][google.cloud.aiplatform.v1beta1.JobService.ListNasJobs]
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.ListNasJobsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.ListNasJobsResponse) + com.google.cloud.aiplatform.v1beta1.ListNasJobsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListNasJobsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListNasJobsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.ListNasJobsResponse.class, + com.google.cloud.aiplatform.v1beta1.ListNasJobsResponse.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.ListNasJobsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (nasJobsBuilder_ == null) { + nasJobs_ = java.util.Collections.emptyList(); + } else { + nasJobs_ = null; + nasJobsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListNasJobsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListNasJobsResponse getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.ListNasJobsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListNasJobsResponse build() { + com.google.cloud.aiplatform.v1beta1.ListNasJobsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListNasJobsResponse buildPartial() { + com.google.cloud.aiplatform.v1beta1.ListNasJobsResponse result = + new com.google.cloud.aiplatform.v1beta1.ListNasJobsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.aiplatform.v1beta1.ListNasJobsResponse result) { + if (nasJobsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + nasJobs_ = java.util.Collections.unmodifiableList(nasJobs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.nasJobs_ = nasJobs_; + } else { + result.nasJobs_ = nasJobsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.ListNasJobsResponse 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.ListNasJobsResponse) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.ListNasJobsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.ListNasJobsResponse other) { + if (other == com.google.cloud.aiplatform.v1beta1.ListNasJobsResponse.getDefaultInstance()) + return this; + if (nasJobsBuilder_ == null) { + if (!other.nasJobs_.isEmpty()) { + if (nasJobs_.isEmpty()) { + nasJobs_ = other.nasJobs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureNasJobsIsMutable(); + nasJobs_.addAll(other.nasJobs_); + } + onChanged(); + } + } else { + if (!other.nasJobs_.isEmpty()) { + if (nasJobsBuilder_.isEmpty()) { + nasJobsBuilder_.dispose(); + nasJobsBuilder_ = null; + nasJobs_ = other.nasJobs_; + bitField0_ = (bitField0_ & ~0x00000001); + nasJobsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getNasJobsFieldBuilder() + : null; + } else { + nasJobsBuilder_.addAllMessages(other.nasJobs_); + } + } + } + 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.NasJob m = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.NasJob.parser(), extensionRegistry); + if (nasJobsBuilder_ == null) { + ensureNasJobsIsMutable(); + nasJobs_.add(m); + } else { + nasJobsBuilder_.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 nasJobs_ = + java.util.Collections.emptyList(); + + private void ensureNasJobsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + nasJobs_ = new java.util.ArrayList(nasJobs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NasJob, + com.google.cloud.aiplatform.v1beta1.NasJob.Builder, + com.google.cloud.aiplatform.v1beta1.NasJobOrBuilder> + nasJobsBuilder_; + + /** + * + * + *
+     * List of NasJobs in the requested page.
+     * [NasJob.nas_job_output][google.cloud.aiplatform.v1beta1.NasJob.nas_job_output]
+     * of the jobs will not be returned.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NasJob nas_jobs = 1; + */ + public java.util.List getNasJobsList() { + if (nasJobsBuilder_ == null) { + return java.util.Collections.unmodifiableList(nasJobs_); + } else { + return nasJobsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of NasJobs in the requested page.
+     * [NasJob.nas_job_output][google.cloud.aiplatform.v1beta1.NasJob.nas_job_output]
+     * of the jobs will not be returned.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NasJob nas_jobs = 1; + */ + public int getNasJobsCount() { + if (nasJobsBuilder_ == null) { + return nasJobs_.size(); + } else { + return nasJobsBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of NasJobs in the requested page.
+     * [NasJob.nas_job_output][google.cloud.aiplatform.v1beta1.NasJob.nas_job_output]
+     * of the jobs will not be returned.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NasJob nas_jobs = 1; + */ + public com.google.cloud.aiplatform.v1beta1.NasJob getNasJobs(int index) { + if (nasJobsBuilder_ == null) { + return nasJobs_.get(index); + } else { + return nasJobsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of NasJobs in the requested page.
+     * [NasJob.nas_job_output][google.cloud.aiplatform.v1beta1.NasJob.nas_job_output]
+     * of the jobs will not be returned.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NasJob nas_jobs = 1; + */ + public Builder setNasJobs(int index, com.google.cloud.aiplatform.v1beta1.NasJob value) { + if (nasJobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNasJobsIsMutable(); + nasJobs_.set(index, value); + onChanged(); + } else { + nasJobsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of NasJobs in the requested page.
+     * [NasJob.nas_job_output][google.cloud.aiplatform.v1beta1.NasJob.nas_job_output]
+     * of the jobs will not be returned.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NasJob nas_jobs = 1; + */ + public Builder setNasJobs( + int index, com.google.cloud.aiplatform.v1beta1.NasJob.Builder builderForValue) { + if (nasJobsBuilder_ == null) { + ensureNasJobsIsMutable(); + nasJobs_.set(index, builderForValue.build()); + onChanged(); + } else { + nasJobsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of NasJobs in the requested page.
+     * [NasJob.nas_job_output][google.cloud.aiplatform.v1beta1.NasJob.nas_job_output]
+     * of the jobs will not be returned.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NasJob nas_jobs = 1; + */ + public Builder addNasJobs(com.google.cloud.aiplatform.v1beta1.NasJob value) { + if (nasJobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNasJobsIsMutable(); + nasJobs_.add(value); + onChanged(); + } else { + nasJobsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of NasJobs in the requested page.
+     * [NasJob.nas_job_output][google.cloud.aiplatform.v1beta1.NasJob.nas_job_output]
+     * of the jobs will not be returned.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NasJob nas_jobs = 1; + */ + public Builder addNasJobs(int index, com.google.cloud.aiplatform.v1beta1.NasJob value) { + if (nasJobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNasJobsIsMutable(); + nasJobs_.add(index, value); + onChanged(); + } else { + nasJobsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of NasJobs in the requested page.
+     * [NasJob.nas_job_output][google.cloud.aiplatform.v1beta1.NasJob.nas_job_output]
+     * of the jobs will not be returned.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NasJob nas_jobs = 1; + */ + public Builder addNasJobs(com.google.cloud.aiplatform.v1beta1.NasJob.Builder builderForValue) { + if (nasJobsBuilder_ == null) { + ensureNasJobsIsMutable(); + nasJobs_.add(builderForValue.build()); + onChanged(); + } else { + nasJobsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of NasJobs in the requested page.
+     * [NasJob.nas_job_output][google.cloud.aiplatform.v1beta1.NasJob.nas_job_output]
+     * of the jobs will not be returned.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NasJob nas_jobs = 1; + */ + public Builder addNasJobs( + int index, com.google.cloud.aiplatform.v1beta1.NasJob.Builder builderForValue) { + if (nasJobsBuilder_ == null) { + ensureNasJobsIsMutable(); + nasJobs_.add(index, builderForValue.build()); + onChanged(); + } else { + nasJobsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of NasJobs in the requested page.
+     * [NasJob.nas_job_output][google.cloud.aiplatform.v1beta1.NasJob.nas_job_output]
+     * of the jobs will not be returned.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NasJob nas_jobs = 1; + */ + public Builder addAllNasJobs( + java.lang.Iterable values) { + if (nasJobsBuilder_ == null) { + ensureNasJobsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, nasJobs_); + onChanged(); + } else { + nasJobsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of NasJobs in the requested page.
+     * [NasJob.nas_job_output][google.cloud.aiplatform.v1beta1.NasJob.nas_job_output]
+     * of the jobs will not be returned.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NasJob nas_jobs = 1; + */ + public Builder clearNasJobs() { + if (nasJobsBuilder_ == null) { + nasJobs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + nasJobsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of NasJobs in the requested page.
+     * [NasJob.nas_job_output][google.cloud.aiplatform.v1beta1.NasJob.nas_job_output]
+     * of the jobs will not be returned.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NasJob nas_jobs = 1; + */ + public Builder removeNasJobs(int index) { + if (nasJobsBuilder_ == null) { + ensureNasJobsIsMutable(); + nasJobs_.remove(index); + onChanged(); + } else { + nasJobsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of NasJobs in the requested page.
+     * [NasJob.nas_job_output][google.cloud.aiplatform.v1beta1.NasJob.nas_job_output]
+     * of the jobs will not be returned.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NasJob nas_jobs = 1; + */ + public com.google.cloud.aiplatform.v1beta1.NasJob.Builder getNasJobsBuilder(int index) { + return getNasJobsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of NasJobs in the requested page.
+     * [NasJob.nas_job_output][google.cloud.aiplatform.v1beta1.NasJob.nas_job_output]
+     * of the jobs will not be returned.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NasJob nas_jobs = 1; + */ + public com.google.cloud.aiplatform.v1beta1.NasJobOrBuilder getNasJobsOrBuilder(int index) { + if (nasJobsBuilder_ == null) { + return nasJobs_.get(index); + } else { + return nasJobsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of NasJobs in the requested page.
+     * [NasJob.nas_job_output][google.cloud.aiplatform.v1beta1.NasJob.nas_job_output]
+     * of the jobs will not be returned.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NasJob nas_jobs = 1; + */ + public java.util.List + getNasJobsOrBuilderList() { + if (nasJobsBuilder_ != null) { + return nasJobsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(nasJobs_); + } + } + /** + * + * + *
+     * List of NasJobs in the requested page.
+     * [NasJob.nas_job_output][google.cloud.aiplatform.v1beta1.NasJob.nas_job_output]
+     * of the jobs will not be returned.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NasJob nas_jobs = 1; + */ + public com.google.cloud.aiplatform.v1beta1.NasJob.Builder addNasJobsBuilder() { + return getNasJobsFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1beta1.NasJob.getDefaultInstance()); + } + /** + * + * + *
+     * List of NasJobs in the requested page.
+     * [NasJob.nas_job_output][google.cloud.aiplatform.v1beta1.NasJob.nas_job_output]
+     * of the jobs will not be returned.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NasJob nas_jobs = 1; + */ + public com.google.cloud.aiplatform.v1beta1.NasJob.Builder addNasJobsBuilder(int index) { + return getNasJobsFieldBuilder() + .addBuilder(index, com.google.cloud.aiplatform.v1beta1.NasJob.getDefaultInstance()); + } + /** + * + * + *
+     * List of NasJobs in the requested page.
+     * [NasJob.nas_job_output][google.cloud.aiplatform.v1beta1.NasJob.nas_job_output]
+     * of the jobs will not be returned.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NasJob nas_jobs = 1; + */ + public java.util.List + getNasJobsBuilderList() { + return getNasJobsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NasJob, + com.google.cloud.aiplatform.v1beta1.NasJob.Builder, + com.google.cloud.aiplatform.v1beta1.NasJobOrBuilder> + getNasJobsFieldBuilder() { + if (nasJobsBuilder_ == null) { + nasJobsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NasJob, + com.google.cloud.aiplatform.v1beta1.NasJob.Builder, + com.google.cloud.aiplatform.v1beta1.NasJobOrBuilder>( + nasJobs_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + nasJobs_ = null; + } + return nasJobsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to
+     * [ListNasJobsRequest.page_token][google.cloud.aiplatform.v1beta1.ListNasJobsRequest.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
+     * [ListNasJobsRequest.page_token][google.cloud.aiplatform.v1beta1.ListNasJobsRequest.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
+     * [ListNasJobsRequest.page_token][google.cloud.aiplatform.v1beta1.ListNasJobsRequest.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
+     * [ListNasJobsRequest.page_token][google.cloud.aiplatform.v1beta1.ListNasJobsRequest.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
+     * [ListNasJobsRequest.page_token][google.cloud.aiplatform.v1beta1.ListNasJobsRequest.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.ListNasJobsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.ListNasJobsResponse) + private static final com.google.cloud.aiplatform.v1beta1.ListNasJobsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.ListNasJobsResponse(); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNasJobsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListNasJobsResponse 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.ListNasJobsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListNasJobsResponseOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListNasJobsResponseOrBuilder.java new file mode 100644 index 000000000000..31f14c428dee --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListNasJobsResponseOrBuilder.java @@ -0,0 +1,118 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/job_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +public interface ListNasJobsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.ListNasJobsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of NasJobs in the requested page.
+   * [NasJob.nas_job_output][google.cloud.aiplatform.v1beta1.NasJob.nas_job_output]
+   * of the jobs will not be returned.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NasJob nas_jobs = 1; + */ + java.util.List getNasJobsList(); + /** + * + * + *
+   * List of NasJobs in the requested page.
+   * [NasJob.nas_job_output][google.cloud.aiplatform.v1beta1.NasJob.nas_job_output]
+   * of the jobs will not be returned.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NasJob nas_jobs = 1; + */ + com.google.cloud.aiplatform.v1beta1.NasJob getNasJobs(int index); + /** + * + * + *
+   * List of NasJobs in the requested page.
+   * [NasJob.nas_job_output][google.cloud.aiplatform.v1beta1.NasJob.nas_job_output]
+   * of the jobs will not be returned.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NasJob nas_jobs = 1; + */ + int getNasJobsCount(); + /** + * + * + *
+   * List of NasJobs in the requested page.
+   * [NasJob.nas_job_output][google.cloud.aiplatform.v1beta1.NasJob.nas_job_output]
+   * of the jobs will not be returned.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NasJob nas_jobs = 1; + */ + java.util.List + getNasJobsOrBuilderList(); + /** + * + * + *
+   * List of NasJobs in the requested page.
+   * [NasJob.nas_job_output][google.cloud.aiplatform.v1beta1.NasJob.nas_job_output]
+   * of the jobs will not be returned.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NasJob nas_jobs = 1; + */ + com.google.cloud.aiplatform.v1beta1.NasJobOrBuilder getNasJobsOrBuilder(int index); + + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to
+   * [ListNasJobsRequest.page_token][google.cloud.aiplatform.v1beta1.ListNasJobsRequest.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
+   * [ListNasJobsRequest.page_token][google.cloud.aiplatform.v1beta1.ListNasJobsRequest.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/ListNasTrialDetailsRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListNasTrialDetailsRequest.java new file mode 100644 index 000000000000..0bdd9a313a29 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListNasTrialDetailsRequest.java @@ -0,0 +1,976 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/job_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Request message for
+ * [JobService.ListNasTrialDetails][google.cloud.aiplatform.v1beta1.JobService.ListNasTrialDetails].
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.ListNasTrialDetailsRequest} + */ +public final class ListNasTrialDetailsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.ListNasTrialDetailsRequest) + ListNasTrialDetailsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListNasTrialDetailsRequest.newBuilder() to construct. + private ListNasTrialDetailsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListNasTrialDetailsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListNasTrialDetailsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListNasTrialDetailsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListNasTrialDetailsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsRequest.class, + com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The name of the NasJob resource.
+   * Format:
+   * `projects/{project}/locations/{location}/nasJobs/{nas_job}`
+   * 
+ * + * + * 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 NasJob resource.
+   * Format:
+   * `projects/{project}/locations/{location}/nasJobs/{nas_job}`
+   * 
+ * + * + * 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; + /** + * + * + *
+   * The standard list page size.
+   * 
+ * + * int32 page_size = 2; + * + * @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_ = ""; + /** + * + * + *
+   * The standard list page token.
+   * Typically obtained via
+   * [ListNasTrialDetailsResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListNasTrialDetailsResponse.next_page_token]
+   * of the previous
+   * [JobService.ListNasTrialDetails][google.cloud.aiplatform.v1beta1.JobService.ListNasTrialDetails]
+   * call.
+   * 
+ * + * string page_token = 3; + * + * @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; + } + } + /** + * + * + *
+   * The standard list page token.
+   * Typically obtained via
+   * [ListNasTrialDetailsResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListNasTrialDetailsResponse.next_page_token]
+   * of the previous
+   * [JobService.ListNasTrialDetails][google.cloud.aiplatform.v1beta1.JobService.ListNasTrialDetails]
+   * call.
+   * 
+ * + * string page_token = 3; + * + * @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.ListNasTrialDetailsRequest)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsRequest other = + (com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsRequest) 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.ListNasTrialDetailsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsRequest 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.ListNasTrialDetailsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsRequest 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.ListNasTrialDetailsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsRequest 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.ListNasTrialDetailsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsRequest 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.ListNasTrialDetailsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsRequest 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.ListNasTrialDetailsRequest 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.ListNasTrialDetailsRequest 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.ListNasTrialDetailsRequest 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
+   * [JobService.ListNasTrialDetails][google.cloud.aiplatform.v1beta1.JobService.ListNasTrialDetails].
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.ListNasTrialDetailsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.ListNasTrialDetailsRequest) + com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListNasTrialDetailsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListNasTrialDetailsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsRequest.class, + com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsRequest.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsRequest.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.JobServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListNasTrialDetailsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsRequest + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsRequest build() { + com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsRequest buildPartial() { + com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsRequest result = + new com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsRequest 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.ListNasTrialDetailsRequest) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsRequest other) { + if (other + == com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsRequest.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 name of the NasJob resource.
+     * Format:
+     * `projects/{project}/locations/{location}/nasJobs/{nas_job}`
+     * 
+ * + * + * 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 NasJob resource.
+     * Format:
+     * `projects/{project}/locations/{location}/nasJobs/{nas_job}`
+     * 
+ * + * + * 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 NasJob resource.
+     * Format:
+     * `projects/{project}/locations/{location}/nasJobs/{nas_job}`
+     * 
+ * + * + * 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 NasJob resource.
+     * Format:
+     * `projects/{project}/locations/{location}/nasJobs/{nas_job}`
+     * 
+ * + * + * 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 NasJob resource.
+     * Format:
+     * `projects/{project}/locations/{location}/nasJobs/{nas_job}`
+     * 
+ * + * + * 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_; + /** + * + * + *
+     * The standard list page size.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The standard list page size.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list page size.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained via
+     * [ListNasTrialDetailsResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListNasTrialDetailsResponse.next_page_token]
+     * of the previous
+     * [JobService.ListNasTrialDetails][google.cloud.aiplatform.v1beta1.JobService.ListNasTrialDetails]
+     * call.
+     * 
+ * + * string page_token = 3; + * + * @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; + } + } + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained via
+     * [ListNasTrialDetailsResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListNasTrialDetailsResponse.next_page_token]
+     * of the previous
+     * [JobService.ListNasTrialDetails][google.cloud.aiplatform.v1beta1.JobService.ListNasTrialDetails]
+     * call.
+     * 
+ * + * string page_token = 3; + * + * @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; + } + } + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained via
+     * [ListNasTrialDetailsResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListNasTrialDetailsResponse.next_page_token]
+     * of the previous
+     * [JobService.ListNasTrialDetails][google.cloud.aiplatform.v1beta1.JobService.ListNasTrialDetails]
+     * call.
+     * 
+ * + * string page_token = 3; + * + * @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; + } + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained via
+     * [ListNasTrialDetailsResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListNasTrialDetailsResponse.next_page_token]
+     * of the previous
+     * [JobService.ListNasTrialDetails][google.cloud.aiplatform.v1beta1.JobService.ListNasTrialDetails]
+     * call.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The standard list page token.
+     * Typically obtained via
+     * [ListNasTrialDetailsResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListNasTrialDetailsResponse.next_page_token]
+     * of the previous
+     * [JobService.ListNasTrialDetails][google.cloud.aiplatform.v1beta1.JobService.ListNasTrialDetails]
+     * call.
+     * 
+ * + * string page_token = 3; + * + * @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.ListNasTrialDetailsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.ListNasTrialDetailsRequest) + private static final com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsRequest(); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListNasTrialDetailsRequest 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.ListNasTrialDetailsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListNasTrialDetailsRequestOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListNasTrialDetailsRequestOrBuilder.java new file mode 100644 index 000000000000..a355bd76843e --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListNasTrialDetailsRequestOrBuilder.java @@ -0,0 +1,106 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/job_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +public interface ListNasTrialDetailsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.ListNasTrialDetailsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the NasJob resource.
+   * Format:
+   * `projects/{project}/locations/{location}/nasJobs/{nas_job}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The name of the NasJob resource.
+   * Format:
+   * `projects/{project}/locations/{location}/nasJobs/{nas_job}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The standard list page size.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * The standard list page token.
+   * Typically obtained via
+   * [ListNasTrialDetailsResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListNasTrialDetailsResponse.next_page_token]
+   * of the previous
+   * [JobService.ListNasTrialDetails][google.cloud.aiplatform.v1beta1.JobService.ListNasTrialDetails]
+   * call.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The standard list page token.
+   * Typically obtained via
+   * [ListNasTrialDetailsResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListNasTrialDetailsResponse.next_page_token]
+   * of the previous
+   * [JobService.ListNasTrialDetails][google.cloud.aiplatform.v1beta1.JobService.ListNasTrialDetails]
+   * call.
+   * 
+ * + * string page_token = 3; + * + * @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/ListNasTrialDetailsResponse.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListNasTrialDetailsResponse.java new file mode 100644 index 000000000000..c0ce4488772a --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListNasTrialDetailsResponse.java @@ -0,0 +1,1169 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/job_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Response message for
+ * [JobService.ListNasTrialDetails][google.cloud.aiplatform.v1beta1.JobService.ListNasTrialDetails]
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.ListNasTrialDetailsResponse} + */ +public final class ListNasTrialDetailsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.ListNasTrialDetailsResponse) + ListNasTrialDetailsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListNasTrialDetailsResponse.newBuilder() to construct. + private ListNasTrialDetailsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListNasTrialDetailsResponse() { + nasTrialDetails_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListNasTrialDetailsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListNasTrialDetailsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListNasTrialDetailsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsResponse.class, + com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsResponse.Builder.class); + } + + public static final int NAS_TRIAL_DETAILS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List nasTrialDetails_; + /** + * + * + *
+   * List of top NasTrials in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NasTrialDetail nas_trial_details = 1; + */ + @java.lang.Override + public java.util.List + getNasTrialDetailsList() { + return nasTrialDetails_; + } + /** + * + * + *
+   * List of top NasTrials in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NasTrialDetail nas_trial_details = 1; + */ + @java.lang.Override + public java.util.List + getNasTrialDetailsOrBuilderList() { + return nasTrialDetails_; + } + /** + * + * + *
+   * List of top NasTrials in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NasTrialDetail nas_trial_details = 1; + */ + @java.lang.Override + public int getNasTrialDetailsCount() { + return nasTrialDetails_.size(); + } + /** + * + * + *
+   * List of top NasTrials in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NasTrialDetail nas_trial_details = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasTrialDetail getNasTrialDetails(int index) { + return nasTrialDetails_.get(index); + } + /** + * + * + *
+   * List of top NasTrials in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NasTrialDetail nas_trial_details = 1; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasTrialDetailOrBuilder getNasTrialDetailsOrBuilder( + int index) { + return nasTrialDetails_.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
+   * [ListNasTrialDetailsRequest.page_token][google.cloud.aiplatform.v1beta1.ListNasTrialDetailsRequest.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
+   * [ListNasTrialDetailsRequest.page_token][google.cloud.aiplatform.v1beta1.ListNasTrialDetailsRequest.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 < nasTrialDetails_.size(); i++) { + output.writeMessage(1, nasTrialDetails_.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 < nasTrialDetails_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, nasTrialDetails_.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.ListNasTrialDetailsResponse)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsResponse other = + (com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsResponse) obj; + + if (!getNasTrialDetailsList().equals(other.getNasTrialDetailsList())) 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 (getNasTrialDetailsCount() > 0) { + hash = (37 * hash) + NAS_TRIAL_DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getNasTrialDetailsList().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.ListNasTrialDetailsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsResponse 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.ListNasTrialDetailsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsResponse 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.ListNasTrialDetailsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsResponse 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.ListNasTrialDetailsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsResponse 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.ListNasTrialDetailsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsResponse 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.ListNasTrialDetailsResponse 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.ListNasTrialDetailsResponse 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.ListNasTrialDetailsResponse 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
+   * [JobService.ListNasTrialDetails][google.cloud.aiplatform.v1beta1.JobService.ListNasTrialDetails]
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.ListNasTrialDetailsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.ListNasTrialDetailsResponse) + com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListNasTrialDetailsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListNasTrialDetailsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsResponse.class, + com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsResponse.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (nasTrialDetailsBuilder_ == null) { + nasTrialDetails_ = java.util.Collections.emptyList(); + } else { + nasTrialDetails_ = null; + nasTrialDetailsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.JobServiceProto + .internal_static_google_cloud_aiplatform_v1beta1_ListNasTrialDetailsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsResponse + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsResponse build() { + com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsResponse buildPartial() { + com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsResponse result = + new com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsResponse result) { + if (nasTrialDetailsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + nasTrialDetails_ = java.util.Collections.unmodifiableList(nasTrialDetails_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.nasTrialDetails_ = nasTrialDetails_; + } else { + result.nasTrialDetails_ = nasTrialDetailsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsResponse 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.ListNasTrialDetailsResponse) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsResponse other) { + if (other + == com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsResponse.getDefaultInstance()) + return this; + if (nasTrialDetailsBuilder_ == null) { + if (!other.nasTrialDetails_.isEmpty()) { + if (nasTrialDetails_.isEmpty()) { + nasTrialDetails_ = other.nasTrialDetails_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureNasTrialDetailsIsMutable(); + nasTrialDetails_.addAll(other.nasTrialDetails_); + } + onChanged(); + } + } else { + if (!other.nasTrialDetails_.isEmpty()) { + if (nasTrialDetailsBuilder_.isEmpty()) { + nasTrialDetailsBuilder_.dispose(); + nasTrialDetailsBuilder_ = null; + nasTrialDetails_ = other.nasTrialDetails_; + bitField0_ = (bitField0_ & ~0x00000001); + nasTrialDetailsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getNasTrialDetailsFieldBuilder() + : null; + } else { + nasTrialDetailsBuilder_.addAllMessages(other.nasTrialDetails_); + } + } + } + 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.NasTrialDetail m = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.NasTrialDetail.parser(), + extensionRegistry); + if (nasTrialDetailsBuilder_ == null) { + ensureNasTrialDetailsIsMutable(); + nasTrialDetails_.add(m); + } else { + nasTrialDetailsBuilder_.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 nasTrialDetails_ = + java.util.Collections.emptyList(); + + private void ensureNasTrialDetailsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + nasTrialDetails_ = + new java.util.ArrayList( + nasTrialDetails_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NasTrialDetail, + com.google.cloud.aiplatform.v1beta1.NasTrialDetail.Builder, + com.google.cloud.aiplatform.v1beta1.NasTrialDetailOrBuilder> + nasTrialDetailsBuilder_; + + /** + * + * + *
+     * List of top NasTrials in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NasTrialDetail nas_trial_details = 1; + */ + public java.util.List + getNasTrialDetailsList() { + if (nasTrialDetailsBuilder_ == null) { + return java.util.Collections.unmodifiableList(nasTrialDetails_); + } else { + return nasTrialDetailsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of top NasTrials in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NasTrialDetail nas_trial_details = 1; + */ + public int getNasTrialDetailsCount() { + if (nasTrialDetailsBuilder_ == null) { + return nasTrialDetails_.size(); + } else { + return nasTrialDetailsBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of top NasTrials in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NasTrialDetail nas_trial_details = 1; + */ + public com.google.cloud.aiplatform.v1beta1.NasTrialDetail getNasTrialDetails(int index) { + if (nasTrialDetailsBuilder_ == null) { + return nasTrialDetails_.get(index); + } else { + return nasTrialDetailsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of top NasTrials in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NasTrialDetail nas_trial_details = 1; + */ + public Builder setNasTrialDetails( + int index, com.google.cloud.aiplatform.v1beta1.NasTrialDetail value) { + if (nasTrialDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNasTrialDetailsIsMutable(); + nasTrialDetails_.set(index, value); + onChanged(); + } else { + nasTrialDetailsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of top NasTrials in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NasTrialDetail nas_trial_details = 1; + */ + public Builder setNasTrialDetails( + int index, com.google.cloud.aiplatform.v1beta1.NasTrialDetail.Builder builderForValue) { + if (nasTrialDetailsBuilder_ == null) { + ensureNasTrialDetailsIsMutable(); + nasTrialDetails_.set(index, builderForValue.build()); + onChanged(); + } else { + nasTrialDetailsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of top NasTrials in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NasTrialDetail nas_trial_details = 1; + */ + public Builder addNasTrialDetails(com.google.cloud.aiplatform.v1beta1.NasTrialDetail value) { + if (nasTrialDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNasTrialDetailsIsMutable(); + nasTrialDetails_.add(value); + onChanged(); + } else { + nasTrialDetailsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of top NasTrials in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NasTrialDetail nas_trial_details = 1; + */ + public Builder addNasTrialDetails( + int index, com.google.cloud.aiplatform.v1beta1.NasTrialDetail value) { + if (nasTrialDetailsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNasTrialDetailsIsMutable(); + nasTrialDetails_.add(index, value); + onChanged(); + } else { + nasTrialDetailsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of top NasTrials in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NasTrialDetail nas_trial_details = 1; + */ + public Builder addNasTrialDetails( + com.google.cloud.aiplatform.v1beta1.NasTrialDetail.Builder builderForValue) { + if (nasTrialDetailsBuilder_ == null) { + ensureNasTrialDetailsIsMutable(); + nasTrialDetails_.add(builderForValue.build()); + onChanged(); + } else { + nasTrialDetailsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of top NasTrials in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NasTrialDetail nas_trial_details = 1; + */ + public Builder addNasTrialDetails( + int index, com.google.cloud.aiplatform.v1beta1.NasTrialDetail.Builder builderForValue) { + if (nasTrialDetailsBuilder_ == null) { + ensureNasTrialDetailsIsMutable(); + nasTrialDetails_.add(index, builderForValue.build()); + onChanged(); + } else { + nasTrialDetailsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of top NasTrials in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NasTrialDetail nas_trial_details = 1; + */ + public Builder addAllNasTrialDetails( + java.lang.Iterable values) { + if (nasTrialDetailsBuilder_ == null) { + ensureNasTrialDetailsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, nasTrialDetails_); + onChanged(); + } else { + nasTrialDetailsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of top NasTrials in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NasTrialDetail nas_trial_details = 1; + */ + public Builder clearNasTrialDetails() { + if (nasTrialDetailsBuilder_ == null) { + nasTrialDetails_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + nasTrialDetailsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of top NasTrials in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NasTrialDetail nas_trial_details = 1; + */ + public Builder removeNasTrialDetails(int index) { + if (nasTrialDetailsBuilder_ == null) { + ensureNasTrialDetailsIsMutable(); + nasTrialDetails_.remove(index); + onChanged(); + } else { + nasTrialDetailsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of top NasTrials in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NasTrialDetail nas_trial_details = 1; + */ + public com.google.cloud.aiplatform.v1beta1.NasTrialDetail.Builder getNasTrialDetailsBuilder( + int index) { + return getNasTrialDetailsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of top NasTrials in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NasTrialDetail nas_trial_details = 1; + */ + public com.google.cloud.aiplatform.v1beta1.NasTrialDetailOrBuilder getNasTrialDetailsOrBuilder( + int index) { + if (nasTrialDetailsBuilder_ == null) { + return nasTrialDetails_.get(index); + } else { + return nasTrialDetailsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of top NasTrials in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NasTrialDetail nas_trial_details = 1; + */ + public java.util.List + getNasTrialDetailsOrBuilderList() { + if (nasTrialDetailsBuilder_ != null) { + return nasTrialDetailsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(nasTrialDetails_); + } + } + /** + * + * + *
+     * List of top NasTrials in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NasTrialDetail nas_trial_details = 1; + */ + public com.google.cloud.aiplatform.v1beta1.NasTrialDetail.Builder addNasTrialDetailsBuilder() { + return getNasTrialDetailsFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1beta1.NasTrialDetail.getDefaultInstance()); + } + /** + * + * + *
+     * List of top NasTrials in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NasTrialDetail nas_trial_details = 1; + */ + public com.google.cloud.aiplatform.v1beta1.NasTrialDetail.Builder addNasTrialDetailsBuilder( + int index) { + return getNasTrialDetailsFieldBuilder() + .addBuilder( + index, com.google.cloud.aiplatform.v1beta1.NasTrialDetail.getDefaultInstance()); + } + /** + * + * + *
+     * List of top NasTrials in the requested page.
+     * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NasTrialDetail nas_trial_details = 1; + */ + public java.util.List + getNasTrialDetailsBuilderList() { + return getNasTrialDetailsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NasTrialDetail, + com.google.cloud.aiplatform.v1beta1.NasTrialDetail.Builder, + com.google.cloud.aiplatform.v1beta1.NasTrialDetailOrBuilder> + getNasTrialDetailsFieldBuilder() { + if (nasTrialDetailsBuilder_ == null) { + nasTrialDetailsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NasTrialDetail, + com.google.cloud.aiplatform.v1beta1.NasTrialDetail.Builder, + com.google.cloud.aiplatform.v1beta1.NasTrialDetailOrBuilder>( + nasTrialDetails_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + nasTrialDetails_ = null; + } + return nasTrialDetailsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to
+     * [ListNasTrialDetailsRequest.page_token][google.cloud.aiplatform.v1beta1.ListNasTrialDetailsRequest.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
+     * [ListNasTrialDetailsRequest.page_token][google.cloud.aiplatform.v1beta1.ListNasTrialDetailsRequest.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
+     * [ListNasTrialDetailsRequest.page_token][google.cloud.aiplatform.v1beta1.ListNasTrialDetailsRequest.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
+     * [ListNasTrialDetailsRequest.page_token][google.cloud.aiplatform.v1beta1.ListNasTrialDetailsRequest.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
+     * [ListNasTrialDetailsRequest.page_token][google.cloud.aiplatform.v1beta1.ListNasTrialDetailsRequest.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.ListNasTrialDetailsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.ListNasTrialDetailsResponse) + private static final com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsResponse(); + } + + public static com.google.cloud.aiplatform.v1beta1.ListNasTrialDetailsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListNasTrialDetailsResponse 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.ListNasTrialDetailsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListNasTrialDetailsResponseOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListNasTrialDetailsResponseOrBuilder.java new file mode 100644 index 000000000000..268b8eb501a7 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ListNasTrialDetailsResponseOrBuilder.java @@ -0,0 +1,109 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/job_service.proto + +package com.google.cloud.aiplatform.v1beta1; + +public interface ListNasTrialDetailsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.ListNasTrialDetailsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of top NasTrials in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NasTrialDetail nas_trial_details = 1; + */ + java.util.List getNasTrialDetailsList(); + /** + * + * + *
+   * List of top NasTrials in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NasTrialDetail nas_trial_details = 1; + */ + com.google.cloud.aiplatform.v1beta1.NasTrialDetail getNasTrialDetails(int index); + /** + * + * + *
+   * List of top NasTrials in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NasTrialDetail nas_trial_details = 1; + */ + int getNasTrialDetailsCount(); + /** + * + * + *
+   * List of top NasTrials in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NasTrialDetail nas_trial_details = 1; + */ + java.util.List + getNasTrialDetailsOrBuilderList(); + /** + * + * + *
+   * List of top NasTrials in the requested page.
+   * 
+ * + * repeated .google.cloud.aiplatform.v1beta1.NasTrialDetail nas_trial_details = 1; + */ + com.google.cloud.aiplatform.v1beta1.NasTrialDetailOrBuilder getNasTrialDetailsOrBuilder( + int index); + + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to
+   * [ListNasTrialDetailsRequest.page_token][google.cloud.aiplatform.v1beta1.ListNasTrialDetailsRequest.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
+   * [ListNasTrialDetailsRequest.page_token][google.cloud.aiplatform.v1beta1.ListNasTrialDetailsRequest.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/Model.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Model.java index d0ea2bf64b27..606c9672d787 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Model.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Model.java @@ -1759,6 +1759,693 @@ public com.google.cloud.aiplatform.v1beta1.Model.ExportFormat getDefaultInstance } } + public interface OriginalModelInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Output only. The resource name of the Model this Model is a copy of,
+     * including the revision. Format:
+     * `projects/{project}/locations/{location}/models/{model_id}@{version_id}`
+     * 
+ * + * + * 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 Model this Model is a copy of,
+     * including the revision. Format:
+     * `projects/{project}/locations/{location}/models/{model_id}@{version_id}`
+     * 
+ * + * + * string model = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for model. + */ + com.google.protobuf.ByteString getModelBytes(); + } + /** + * + * + *
+   * Contains information about the original Model if this Model is a copy.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo} + */ + public static final class OriginalModelInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo) + OriginalModelInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use OriginalModelInfo.newBuilder() to construct. + private OriginalModelInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OriginalModelInfo() { + model_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OriginalModelInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.ModelProto + .internal_static_google_cloud_aiplatform_v1beta1_Model_OriginalModelInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.ModelProto + .internal_static_google_cloud_aiplatform_v1beta1_Model_OriginalModelInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo.class, + com.google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo.Builder.class); + } + + public static final int MODEL_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object model_ = ""; + /** + * + * + *
+     * Output only. The resource name of the Model this Model is a copy of,
+     * including the revision. Format:
+     * `projects/{project}/locations/{location}/models/{model_id}@{version_id}`
+     * 
+ * + * + * string model = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @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; + } + } + /** + * + * + *
+     * Output only. The resource name of the Model this Model is a copy of,
+     * including the revision. Format:
+     * `projects/{project}/locations/{location}/models/{model_id}@{version_id}`
+     * 
+ * + * + * string model = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @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; + } + } + + 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(model_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, model_); + } + 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(model_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, model_); + } + 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.Model.OriginalModelInfo)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo other = + (com.google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo) obj; + + if (!getModel().equals(other.getModel())) 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) + MODEL_FIELD_NUMBER; + hash = (53 * hash) + getModel().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo 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.Model.OriginalModelInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo 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.Model.OriginalModelInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo 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.Model.OriginalModelInfo parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo 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.Model.OriginalModelInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo 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.Model.OriginalModelInfo 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.Model.OriginalModelInfo 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.Model.OriginalModelInfo 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; + } + /** + * + * + *
+     * Contains information about the original Model if this Model is a copy.
+     * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo) + com.google.cloud.aiplatform.v1beta1.Model.OriginalModelInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.ModelProto + .internal_static_google_cloud_aiplatform_v1beta1_Model_OriginalModelInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.ModelProto + .internal_static_google_cloud_aiplatform_v1beta1_Model_OriginalModelInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo.class, + com.google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + model_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.ModelProto + .internal_static_google_cloud_aiplatform_v1beta1_Model_OriginalModelInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo build() { + com.google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo buildPartial() { + com.google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo result = + new com.google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.model_ = model_; + } + } + + @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.Model.OriginalModelInfo) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo other) { + if (other + == com.google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo.getDefaultInstance()) + return this; + if (!other.getModel().isEmpty()) { + model_ = other.model_; + 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: + { + model_ = 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 model_ = ""; + /** + * + * + *
+       * Output only. The resource name of the Model this Model is a copy of,
+       * including the revision. Format:
+       * `projects/{project}/locations/{location}/models/{model_id}@{version_id}`
+       * 
+ * + * + * string model = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @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; + } + } + /** + * + * + *
+       * Output only. The resource name of the Model this Model is a copy of,
+       * including the revision. Format:
+       * `projects/{project}/locations/{location}/models/{model_id}@{version_id}`
+       * 
+ * + * + * string model = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @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; + } + } + /** + * + * + *
+       * Output only. The resource name of the Model this Model is a copy of,
+       * including the revision. Format:
+       * `projects/{project}/locations/{location}/models/{model_id}@{version_id}`
+       * 
+ * + * + * string model = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @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_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The resource name of the Model this Model is a copy of,
+       * including the revision. Format:
+       * `projects/{project}/locations/{location}/models/{model_id}@{version_id}`
+       * 
+ * + * + * string model = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearModel() { + model_ = getDefaultInstance().getModel(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The resource name of the Model this Model is a copy of,
+       * including the revision. Format:
+       * `projects/{project}/locations/{location}/models/{model_id}@{version_id}`
+       * 
+ * + * + * string model = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @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_ |= 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.Model.OriginalModelInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo) + private static final com.google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo(); + } + + public static com.google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OriginalModelInfo 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.Model.OriginalModelInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + public static final int NAME_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -3891,6 +4578,66 @@ public com.google.cloud.aiplatform.v1beta1.ModelSourceInfo getModelSourceInfo() : modelSourceInfo_; } + public static final int ORIGINAL_MODEL_INFO_FIELD_NUMBER = 34; + private com.google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo originalModelInfo_; + /** + * + * + *
+   * Output only. If this Model is a copy of another Model, this contains info
+   * about the original.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo original_model_info = 34 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the originalModelInfo field is set. + */ + @java.lang.Override + public boolean hasOriginalModelInfo() { + return originalModelInfo_ != null; + } + /** + * + * + *
+   * Output only. If this Model is a copy of another Model, this contains info
+   * about the original.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo original_model_info = 34 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The originalModelInfo. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo getOriginalModelInfo() { + return originalModelInfo_ == null + ? com.google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo.getDefaultInstance() + : originalModelInfo_; + } + /** + * + * + *
+   * Output only. If this Model is a copy of another Model, this contains info
+   * about the original.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo original_model_info = 34 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.Model.OriginalModelInfoOrBuilder + getOriginalModelInfoOrBuilder() { + return originalModelInfo_ == null + ? com.google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo.getDefaultInstance() + : originalModelInfo_; + } + public static final int METADATA_ARTIFACT_FIELD_NUMBER = 44; @SuppressWarnings("serial") @@ -4043,6 +4790,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (versionUpdateTime_ != null) { output.writeMessage(32, getVersionUpdateTime()); } + if (originalModelInfo_ != null) { + output.writeMessage(34, getOriginalModelInfo()); + } if (modelSourceInfo_ != null) { output.writeMessage(38, getModelSourceInfo()); } @@ -4168,6 +4918,9 @@ public int getSerializedSize() { if (versionUpdateTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(32, getVersionUpdateTime()); } + if (originalModelInfo_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(34, getOriginalModelInfo()); + } if (modelSourceInfo_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(38, getModelSourceInfo()); } @@ -4250,6 +5003,10 @@ public boolean equals(final java.lang.Object obj) { if (hasModelSourceInfo()) { if (!getModelSourceInfo().equals(other.getModelSourceInfo())) return false; } + if (hasOriginalModelInfo() != other.hasOriginalModelInfo()) return false; + if (hasOriginalModelInfo()) { + if (!getOriginalModelInfo().equals(other.getOriginalModelInfo())) return false; + } if (!getMetadataArtifact().equals(other.getMetadataArtifact())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; @@ -4348,6 +5105,10 @@ public int hashCode() { hash = (37 * hash) + MODEL_SOURCE_INFO_FIELD_NUMBER; hash = (53 * hash) + getModelSourceInfo().hashCode(); } + if (hasOriginalModelInfo()) { + hash = (37 * hash) + ORIGINAL_MODEL_INFO_FIELD_NUMBER; + hash = (53 * hash) + getOriginalModelInfo().hashCode(); + } hash = (37 * hash) + METADATA_ARTIFACT_FIELD_NUMBER; hash = (53 * hash) + getMetadataArtifact().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); @@ -4591,6 +5352,11 @@ public Builder clear() { modelSourceInfoBuilder_.dispose(); modelSourceInfoBuilder_ = null; } + originalModelInfo_ = null; + if (originalModelInfoBuilder_ != null) { + originalModelInfoBuilder_.dispose(); + originalModelInfoBuilder_ = null; + } metadataArtifact_ = ""; return this; } @@ -4744,6 +5510,12 @@ private void buildPartial0(com.google.cloud.aiplatform.v1beta1.Model result) { modelSourceInfoBuilder_ == null ? modelSourceInfo_ : modelSourceInfoBuilder_.build(); } if (((from_bitField0_ & 0x04000000) != 0)) { + result.originalModelInfo_ = + originalModelInfoBuilder_ == null + ? originalModelInfo_ + : originalModelInfoBuilder_.build(); + } + if (((from_bitField0_ & 0x08000000) != 0)) { result.metadataArtifact_ = metadataArtifact_; } } @@ -4964,9 +5736,12 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.Model other) { if (other.hasModelSourceInfo()) { mergeModelSourceInfo(other.getModelSourceInfo()); } + if (other.hasOriginalModelInfo()) { + mergeOriginalModelInfo(other.getOriginalModelInfo()); + } if (!other.getMetadataArtifact().isEmpty()) { metadataArtifact_ = other.metadataArtifact_; - bitField0_ |= 0x04000000; + bitField0_ |= 0x08000000; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); @@ -5185,6 +5960,13 @@ public Builder mergeFrom( bitField0_ |= 0x00000010; break; } // case 258 + case 274: + { + input.readMessage( + getOriginalModelInfoFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x04000000; + break; + } // case 274 case 306: { input.readMessage(getModelSourceInfoFieldBuilder().getBuilder(), extensionRegistry); @@ -5194,7 +5976,7 @@ public Builder mergeFrom( case 354: { metadataArtifact_ = input.readStringRequireUtf8(); - bitField0_ |= 0x04000000; + bitField0_ |= 0x08000000; break; } // case 354 default: @@ -11255,6 +12037,223 @@ public com.google.cloud.aiplatform.v1beta1.ModelSourceInfo.Builder getModelSourc return modelSourceInfoBuilder_; } + private com.google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo originalModelInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo, + com.google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo.Builder, + com.google.cloud.aiplatform.v1beta1.Model.OriginalModelInfoOrBuilder> + originalModelInfoBuilder_; + /** + * + * + *
+     * Output only. If this Model is a copy of another Model, this contains info
+     * about the original.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo original_model_info = 34 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the originalModelInfo field is set. + */ + public boolean hasOriginalModelInfo() { + return ((bitField0_ & 0x04000000) != 0); + } + /** + * + * + *
+     * Output only. If this Model is a copy of another Model, this contains info
+     * about the original.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo original_model_info = 34 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The originalModelInfo. + */ + public com.google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo getOriginalModelInfo() { + if (originalModelInfoBuilder_ == null) { + return originalModelInfo_ == null + ? com.google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo.getDefaultInstance() + : originalModelInfo_; + } else { + return originalModelInfoBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. If this Model is a copy of another Model, this contains info
+     * about the original.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo original_model_info = 34 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setOriginalModelInfo( + com.google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo value) { + if (originalModelInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + originalModelInfo_ = value; + } else { + originalModelInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x04000000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. If this Model is a copy of another Model, this contains info
+     * about the original.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo original_model_info = 34 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setOriginalModelInfo( + com.google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo.Builder builderForValue) { + if (originalModelInfoBuilder_ == null) { + originalModelInfo_ = builderForValue.build(); + } else { + originalModelInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x04000000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. If this Model is a copy of another Model, this contains info
+     * about the original.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo original_model_info = 34 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeOriginalModelInfo( + com.google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo value) { + if (originalModelInfoBuilder_ == null) { + if (((bitField0_ & 0x04000000) != 0) + && originalModelInfo_ != null + && originalModelInfo_ + != com.google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo + .getDefaultInstance()) { + getOriginalModelInfoBuilder().mergeFrom(value); + } else { + originalModelInfo_ = value; + } + } else { + originalModelInfoBuilder_.mergeFrom(value); + } + bitField0_ |= 0x04000000; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. If this Model is a copy of another Model, this contains info
+     * about the original.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo original_model_info = 34 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearOriginalModelInfo() { + bitField0_ = (bitField0_ & ~0x04000000); + originalModelInfo_ = null; + if (originalModelInfoBuilder_ != null) { + originalModelInfoBuilder_.dispose(); + originalModelInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. If this Model is a copy of another Model, this contains info
+     * about the original.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo original_model_info = 34 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo.Builder + getOriginalModelInfoBuilder() { + bitField0_ |= 0x04000000; + onChanged(); + return getOriginalModelInfoFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. If this Model is a copy of another Model, this contains info
+     * about the original.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo original_model_info = 34 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1beta1.Model.OriginalModelInfoOrBuilder + getOriginalModelInfoOrBuilder() { + if (originalModelInfoBuilder_ != null) { + return originalModelInfoBuilder_.getMessageOrBuilder(); + } else { + return originalModelInfo_ == null + ? com.google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo.getDefaultInstance() + : originalModelInfo_; + } + } + /** + * + * + *
+     * Output only. If this Model is a copy of another Model, this contains info
+     * about the original.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo original_model_info = 34 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo, + com.google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo.Builder, + com.google.cloud.aiplatform.v1beta1.Model.OriginalModelInfoOrBuilder> + getOriginalModelInfoFieldBuilder() { + if (originalModelInfoBuilder_ == null) { + originalModelInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo, + com.google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo.Builder, + com.google.cloud.aiplatform.v1beta1.Model.OriginalModelInfoOrBuilder>( + getOriginalModelInfo(), getParentForChildren(), isClean()); + originalModelInfo_ = null; + } + return originalModelInfoBuilder_; + } + private java.lang.Object metadataArtifact_ = ""; /** * @@ -11326,7 +12325,7 @@ public Builder setMetadataArtifact(java.lang.String value) { throw new NullPointerException(); } metadataArtifact_ = value; - bitField0_ |= 0x04000000; + bitField0_ |= 0x08000000; onChanged(); return this; } @@ -11346,7 +12345,7 @@ public Builder setMetadataArtifact(java.lang.String value) { */ public Builder clearMetadataArtifact() { metadataArtifact_ = getDefaultInstance().getMetadataArtifact(); - bitField0_ = (bitField0_ & ~0x04000000); + bitField0_ = (bitField0_ & ~0x08000000); onChanged(); return this; } @@ -11371,7 +12370,7 @@ public Builder setMetadataArtifactBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); metadataArtifact_ = value; - bitField0_ |= 0x04000000; + bitField0_ |= 0x08000000; onChanged(); return this; } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelOrBuilder.java index 67d76e5bd9c6..f00ac60b9e5d 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelOrBuilder.java @@ -1622,6 +1622,51 @@ java.lang.String getLabelsOrDefault( */ com.google.cloud.aiplatform.v1beta1.ModelSourceInfoOrBuilder getModelSourceInfoOrBuilder(); + /** + * + * + *
+   * Output only. If this Model is a copy of another Model, this contains info
+   * about the original.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo original_model_info = 34 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the originalModelInfo field is set. + */ + boolean hasOriginalModelInfo(); + /** + * + * + *
+   * Output only. If this Model is a copy of another Model, this contains info
+   * about the original.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo original_model_info = 34 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The originalModelInfo. + */ + com.google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo getOriginalModelInfo(); + /** + * + * + *
+   * Output only. If this Model is a copy of another Model, this contains info
+   * about the original.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Model.OriginalModelInfo original_model_info = 34 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1beta1.Model.OriginalModelInfoOrBuilder + getOriginalModelInfoOrBuilder(); + /** * * diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelProto.java index 3a64499fb6fc..2293cf86b746 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelProto.java @@ -35,6 +35,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_aiplatform_v1beta1_Model_ExportFormat_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_aiplatform_v1beta1_Model_ExportFormat_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_Model_OriginalModelInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_Model_OriginalModelInfo_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_aiplatform_v1beta1_Model_LabelsEntry_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -74,7 +78,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "eta1/env_var.proto\0321google/cloud/aiplatf" + "orm/v1beta1/explanation.proto\032\034google/pr" + "otobuf/struct.proto\032\037google/protobuf/tim" - + "estamp.proto\"\250\017\n\005Model\022\014\n\004name\030\001 \001(\t\022\032\n\n" + + "estamp.proto\"\321\020\n\005Model\022\014\n\004name\030\001 \001(\t\022\032\n\n" + "version_id\030\034 \001(\tB\006\340A\005\340A\003\022\027\n\017version_alia" + "ses\030\035 \003(\t\022<\n\023version_create_time\030\037 \001(\0132\032" + ".google.protobuf.TimestampB\003\340A\003\022<\n\023versi" @@ -109,42 +113,46 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ry\022H\n\017encryption_spec\030\030 \001(\0132/.google.clo" + "ud.aiplatform.v1beta1.EncryptionSpec\022P\n\021" + "model_source_info\030& \001(\01320.google.cloud.a" - + "iplatform.v1beta1.ModelSourceInfoB\003\340A\003\022\036" - + "\n\021metadata_artifact\030, \001(\tB\003\340A\003\032\332\001\n\014Expor" - + "tFormat\022\017\n\002id\030\001 \001(\tB\003\340A\003\022g\n\023exportable_c" - + "ontents\030\002 \003(\0162E.google.cloud.aiplatform." - + "v1beta1.Model.ExportFormat.ExportableCon" - + "tentB\003\340A\003\"P\n\021ExportableContent\022\"\n\036EXPORT" - + "ABLE_CONTENT_UNSPECIFIED\020\000\022\014\n\010ARTIFACT\020\001" - + "\022\t\n\005IMAGE\020\002\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022" - + "\r\n\005value\030\002 \001(\t:\0028\001\"\214\001\n\027DeploymentResourc" - + "esType\022)\n%DEPLOYMENT_RESOURCES_TYPE_UNSP" - + "ECIFIED\020\000\022\027\n\023DEDICATED_RESOURCES\020\001\022\027\n\023AU" - + "TOMATIC_RESOURCES\020\002\022\024\n\020SHARED_RESOURCES\020" - + "\003:\\\352AY\n\037aiplatform.googleapis.com/Model\022" - + "6projects/{project}/locations/{location}" - + "/models/{model}\"{\n\017PredictSchemata\022 \n\023in" - + "stance_schema_uri\030\001 \001(\tB\003\340A\005\022\"\n\025paramete" - + "rs_schema_uri\030\002 \001(\tB\003\340A\005\022\"\n\025prediction_s" - + "chema_uri\030\003 \001(\tB\003\340A\005\"\205\002\n\022ModelContainerS" - + "pec\022\031\n\timage_uri\030\001 \001(\tB\006\340A\002\340A\005\022\024\n\007comman" - + "d\030\002 \003(\tB\003\340A\005\022\021\n\004args\030\003 \003(\tB\003\340A\005\0229\n\003env\030\004" - + " \003(\0132\'.google.cloud.aiplatform.v1beta1.E" - + "nvVarB\003\340A\005\0229\n\005ports\030\005 \003(\0132%.google.cloud" - + ".aiplatform.v1beta1.PortB\003\340A\005\022\032\n\rpredict" - + "_route\030\006 \001(\tB\003\340A\005\022\031\n\014health_route\030\007 \001(\tB" - + "\003\340A\005\"\036\n\004Port\022\026\n\016container_port\030\003 \001(\005\"\300\001\n" - + "\017ModelSourceInfo\022U\n\013source_type\030\001 \001(\0162@." - + "google.cloud.aiplatform.v1beta1.ModelSou" - + "rceInfo.ModelSourceType\"V\n\017ModelSourceTy" - + "pe\022!\n\035MODEL_SOURCE_TYPE_UNSPECIFIED\020\000\022\n\n" - + "\006AUTOML\020\001\022\n\n\006CUSTOM\020\002\022\010\n\004BQML\020\003B\341\001\n#com." - + "google.cloud.aiplatform.v1beta1B\nModelPr" - + "otoP\001ZCcloud.google.com/go/aiplatform/ap" - + "iv1beta1/aiplatformpb;aiplatformpb\252\002\037Goo" - + "gle.Cloud.AIPlatform.V1Beta1\312\002\037Google\\Cl" - + "oud\\AIPlatform\\V1beta1\352\002\"Google::Cloud::" - + "AIPlatform::V1beta1b\006proto3" + + "iplatform.v1beta1.ModelSourceInfoB\003\340A\003\022Z" + + "\n\023original_model_info\030\" \001(\01328.google.clo" + + "ud.aiplatform.v1beta1.Model.OriginalMode" + + "lInfoB\003\340A\003\022\036\n\021metadata_artifact\030, \001(\tB\003\340" + + "A\003\032\332\001\n\014ExportFormat\022\017\n\002id\030\001 \001(\tB\003\340A\003\022g\n\023" + + "exportable_contents\030\002 \003(\0162E.google.cloud" + + ".aiplatform.v1beta1.Model.ExportFormat.E" + + "xportableContentB\003\340A\003\"P\n\021ExportableConte" + + "nt\022\"\n\036EXPORTABLE_CONTENT_UNSPECIFIED\020\000\022\014" + + "\n\010ARTIFACT\020\001\022\t\n\005IMAGE\020\002\032K\n\021OriginalModel" + + "Info\0226\n\005model\030\001 \001(\tB\'\340A\003\372A!\n\037aiplatform." + + "googleapis.com/Model\032-\n\013LabelsEntry\022\013\n\003k" + + "ey\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\214\001\n\027Deployme" + + "ntResourcesType\022)\n%DEPLOYMENT_RESOURCES_" + + "TYPE_UNSPECIFIED\020\000\022\027\n\023DEDICATED_RESOURCE" + + "S\020\001\022\027\n\023AUTOMATIC_RESOURCES\020\002\022\024\n\020SHARED_R" + + "ESOURCES\020\003:\\\352AY\n\037aiplatform.googleapis.c" + + "om/Model\0226projects/{project}/locations/{" + + "location}/models/{model}\"{\n\017PredictSchem" + + "ata\022 \n\023instance_schema_uri\030\001 \001(\tB\003\340A\005\022\"\n" + + "\025parameters_schema_uri\030\002 \001(\tB\003\340A\005\022\"\n\025pre" + + "diction_schema_uri\030\003 \001(\tB\003\340A\005\"\205\002\n\022ModelC" + + "ontainerSpec\022\031\n\timage_uri\030\001 \001(\tB\006\340A\002\340A\005\022" + + "\024\n\007command\030\002 \003(\tB\003\340A\005\022\021\n\004args\030\003 \003(\tB\003\340A\005" + + "\0229\n\003env\030\004 \003(\0132\'.google.cloud.aiplatform." + + "v1beta1.EnvVarB\003\340A\005\0229\n\005ports\030\005 \003(\0132%.goo" + + "gle.cloud.aiplatform.v1beta1.PortB\003\340A\005\022\032" + + "\n\rpredict_route\030\006 \001(\tB\003\340A\005\022\031\n\014health_rou" + + "te\030\007 \001(\tB\003\340A\005\"\036\n\004Port\022\026\n\016container_port\030" + + "\003 \001(\005\"\300\001\n\017ModelSourceInfo\022U\n\013source_type" + + "\030\001 \001(\0162@.google.cloud.aiplatform.v1beta1" + + ".ModelSourceInfo.ModelSourceType\"V\n\017Mode" + + "lSourceType\022!\n\035MODEL_SOURCE_TYPE_UNSPECI" + + "FIED\020\000\022\n\n\006AUTOML\020\001\022\n\n\006CUSTOM\020\002\022\010\n\004BQML\020\003" + + "B\341\001\n#com.google.cloud.aiplatform.v1beta1" + + "B\nModelProtoP\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::V1beta1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -191,6 +199,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Labels", "EncryptionSpec", "ModelSourceInfo", + "OriginalModelInfo", "MetadataArtifact", }); internal_static_google_cloud_aiplatform_v1beta1_Model_ExportFormat_descriptor = @@ -201,8 +210,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Id", "ExportableContents", }); - internal_static_google_cloud_aiplatform_v1beta1_Model_LabelsEntry_descriptor = + internal_static_google_cloud_aiplatform_v1beta1_Model_OriginalModelInfo_descriptor = internal_static_google_cloud_aiplatform_v1beta1_Model_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_aiplatform_v1beta1_Model_OriginalModelInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_Model_OriginalModelInfo_descriptor, + new java.lang.String[] { + "Model", + }); + internal_static_google_cloud_aiplatform_v1beta1_Model_LabelsEntry_descriptor = + internal_static_google_cloud_aiplatform_v1beta1_Model_descriptor.getNestedTypes().get(2); internal_static_google_cloud_aiplatform_v1beta1_Model_LabelsEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_Model_LabelsEntry_descriptor, diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelServiceProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelServiceProto.java index 29973fe8b093..99da54fc192d 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelServiceProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ModelServiceProto.java @@ -107,6 +107,18 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_aiplatform_v1beta1_ExportModelResponse_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_aiplatform_v1beta1_ExportModelResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_CopyModelRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_CopyModelRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_CopyModelOperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_CopyModelOperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_CopyModelResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_CopyModelResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_aiplatform_v1beta1_ImportModelEvaluationRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -157,215 +169,236 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "1beta1\032\034google/api/annotations.proto\032\027go" + "ogle/api/client.proto\032\037google/api/field_" + "behavior.proto\032\031google/api/resource.prot" - + "o\0321google/cloud/aiplatform/v1beta1/expla" - + "nation.proto\032(google/cloud/aiplatform/v1" - + "beta1/io.proto\032+google/cloud/aiplatform/" - + "v1beta1/model.proto\0326google/cloud/aiplat" - + "form/v1beta1/model_evaluation.proto\032" - + "\202\323\344\223\0021\022//v1beta1/{name=projects/*/locati" - + "ons/*/models/*}\332A\004name\022\267\001\n\nListModels\0222." - + "google.cloud.aiplatform.v1beta1.ListMode" - + "lsRequest\0323.google.cloud.aiplatform.v1be" - + "ta1.ListModelsResponse\"@\202\323\344\223\0021\022//v1beta1" - + "/{parent=projects/*/locations/*}/models\332" - + "A\006parent\022\327\001\n\021ListModelVersions\0229.google." - + "cloud.aiplatform.v1beta1.ListModelVersio" - + "nsRequest\032:.google.cloud.aiplatform.v1be" - + "ta1.ListModelVersionsResponse\"K\202\323\344\223\002>\02225/v1beta1/{model" - + ".name=projects/*/locations/*/models/*}:\005" - + "model\332A\021model,update_mask\022\252\002\n\030UpdateExpl" - + "anationDataset\022@.google.cloud.aiplatform" - + ".v1beta1.UpdateExplanationDatasetRequest" - + "\032\035.google.longrunning.Operation\"\254\001\202\323\344\223\002N" - + "\"I/v1beta1/{model=projects/*/locations/*" - + "/models/*}:updateExplanationDataset:\001*\332A" - + "\005model\312AM\n UpdateExplanationDatasetRespo" - + "nse\022)UpdateExplanationDatasetOperationMe" - + "tadata\022\324\001\n\013DeleteModel\0223.google.cloud.ai" - + "platform.v1beta1.DeleteModelRequest\032\035.go" - + "ogle.longrunning.Operation\"q\202\323\344\223\0021*//v1b" - + "eta1/{name=projects/*/locations/*/models" - + "/*}\332A\004name\312A0\n\025google.protobuf.Empty\022\027De" - + "leteOperationMetadata\022\360\001\n\022DeleteModelVer" - + "sion\022:.google.cloud.aiplatform.v1beta1.D" - + "eleteModelVersionRequest\032\035.google.longru" - + "nning.Operation\"\177\202\323\344\223\002?*=/v1beta1/{name=" - + "projects/*/locations/*/models/*}:deleteV" - + "ersion\332A\004name\312A0\n\025google.protobuf.Empty\022" - + "\027DeleteOperationMetadata\022\341\001\n\023MergeVersio" - + "nAliases\022;.google.cloud.aiplatform.v1bet" - + "a1.MergeVersionAliasesRequest\032&.google.c" - + "loud.aiplatform.v1beta1.Model\"e\202\323\344\223\002H\"C/" + + "o\0325google/cloud/aiplatform/v1beta1/encry" + + "ption_spec.proto\0321google/cloud/aiplatfor" + + "m/v1beta1/explanation.proto\032(google/clou" + + "d/aiplatform/v1beta1/io.proto\032+google/cl" + + "oud/aiplatform/v1beta1/model.proto\0326goog" + + "le/cloud/aiplatform/v1beta1/model_evalua" + + "tion.proto\032\202\323\344\223\0021\022//v1beta1/{name=projects/*/loc" + + "ations/*/models/*}\332A\004name\022\267\001\n\nListModels" + + "\0222.google.cloud.aiplatform.v1beta1.ListM" + + "odelsRequest\0323.google.cloud.aiplatform.v" + + "1beta1.ListModelsResponse\"@\202\323\344\223\0021\022//v1be" + + "ta1/{parent=projects/*/locations/*}/mode" + + "ls\332A\006parent\022\327\001\n\021ListModelVersions\0229.goog" + + "le.cloud.aiplatform.v1beta1.ListModelVer" + + "sionsRequest\032:.google.cloud.aiplatform.v" + + "1beta1.ListModelVersionsResponse\"K\202\323\344\223\002>" + + "\02225/v1beta1/{mo" + + "del.name=projects/*/locations/*/models/*" + + "}:\005model\332A\021model,update_mask\022\252\002\n\030UpdateE" + + "xplanationDataset\022@.google.cloud.aiplatf" + + "orm.v1beta1.UpdateExplanationDatasetRequ" + + "est\032\035.google.longrunning.Operation\"\254\001\202\323\344" + + "\223\002N\"I/v1beta1/{model=projects/*/location" + + "s/*/models/*}:updateExplanationDataset:\001" + + "*\332A\005model\312AM\n UpdateExplanationDatasetRe" + + "sponse\022)UpdateExplanationDatasetOperatio" + + "nMetadata\022\324\001\n\013DeleteModel\0223.google.cloud" + + ".aiplatform.v1beta1.DeleteModelRequest\032\035" + + ".google.longrunning.Operation\"q\202\323\344\223\0021*//" + "v1beta1/{name=projects/*/locations/*/mod" - + "els/*}:mergeVersionAliases:\001*\332A\024name,ver" - + "sion_aliases\022\360\001\n\013ExportModel\0223.google.cl" - + "oud.aiplatform.v1beta1.ExportModelReques" - + "t\032\035.google.longrunning.Operation\"\214\001\202\323\344\223\002" - + ";\"6/v1beta1/{name=projects/*/locations/*" - + "/models/*}:export:\001*\332A\022name,output_confi" - + "g\312A3\n\023ExportModelResponse\022\034ExportModelOp" - + "erationMetadata\022\363\001\n\025ImportModelEvaluatio" - + "n\022=.google.cloud.aiplatform.v1beta1.Impo" - + "rtModelEvaluationRequest\0320.google.cloud." - + "aiplatform.v1beta1.ModelEvaluation\"i\202\323\344\223" - + "\002I\"D/v1beta1/{parent=projects/*/location" - + "s/*/models/*}/evaluations:import:\001*\332A\027pa" - + "rent,model_evaluation\022\267\002\n BatchImportMod" - + "elEvaluationSlices\022H.google.cloud.aiplat" - + "form.v1beta1.BatchImportModelEvaluationS" - + "licesRequest\032I.google.cloud.aiplatform.v" - + "1beta1.BatchImportModelEvaluationSlicesR" - + "esponse\"~\202\323\344\223\002W\"R/v1beta1/{parent=projec" - + "ts/*/locations/*/models/*/evaluations/*}" - + "/slices:batchImport:\001*\332A\036parent,model_ev" - + "aluation_slices\022\320\001\n\022GetModelEvaluation\022:" - + ".google.cloud.aiplatform.v1beta1.GetMode" - + "lEvaluationRequest\0320.google.cloud.aiplat" - + "form.v1beta1.ModelEvaluation\"L\202\323\344\223\002?\022=/v" - + "1beta1/{name=projects/*/locations/*/mode" - + "ls/*/evaluations/*}\332A\004name\022\343\001\n\024ListModel" - + "Evaluations\022<.google.cloud.aiplatform.v1" - + "beta1.ListModelEvaluationsRequest\032=.goog" - + "le.cloud.aiplatform.v1beta1.ListModelEva" - + "luationsResponse\"N\202\323\344\223\002?\022=/v1beta1/{pare" - + "nt=projects/*/locations/*/models/*}/eval" - + "uations\332A\006parent\022\350\001\n\027GetModelEvaluationS" - + "lice\022?.google.cloud.aiplatform.v1beta1.G" - + "etModelEvaluationSliceRequest\0325.google.c" - + "loud.aiplatform.v1beta1.ModelEvaluationS" - + "lice\"U\202\323\344\223\002H\022F/v1beta1/{name=projects/*/" - + "locations/*/models/*/evaluations/*/slice" - + "s/*}\332A\004name\022\373\001\n\031ListModelEvaluationSlice" - + "s\022A.google.cloud.aiplatform.v1beta1.List" - + "ModelEvaluationSlicesRequest\032B.google.cl" - + "oud.aiplatform.v1beta1.ListModelEvaluati" - + "onSlicesResponse\"W\202\323\344\223\002H\022F/v1beta1/{pare" - + "nt=projects/*/locations/*/models/*/evalu" - + "ations/*}/slices\332A\006parent\032M\312A\031aiplatform" - + ".googleapis.com\322A.https://www.googleapis" - + ".com/auth/cloud-platformB\350\001\n#com.google." - + "cloud.aiplatform.v1beta1B\021ModelServicePr" - + "otoP\001ZCcloud.google.com/go/aiplatform/ap" - + "iv1beta1/aiplatformpb;aiplatformpb\252\002\037Goo" - + "gle.Cloud.AIPlatform.V1Beta1\312\002\037Google\\Cl" - + "oud\\AIPlatform\\V1beta1\352\002\"Google::Cloud::" - + "AIPlatform::V1beta1b\006proto3" + + "els/*}\332A\004name\312A0\n\025google.protobuf.Empty\022" + + "\027DeleteOperationMetadata\022\360\001\n\022DeleteModel" + + "Version\022:.google.cloud.aiplatform.v1beta" + + "1.DeleteModelVersionRequest\032\035.google.lon" + + "grunning.Operation\"\177\202\323\344\223\002?*=/v1beta1/{na" + + "me=projects/*/locations/*/models/*}:dele" + + "teVersion\332A\004name\312A0\n\025google.protobuf.Emp" + + "ty\022\027DeleteOperationMetadata\022\341\001\n\023MergeVer" + + "sionAliases\022;.google.cloud.aiplatform.v1" + + "beta1.MergeVersionAliasesRequest\032&.googl" + + "e.cloud.aiplatform.v1beta1.Model\"e\202\323\344\223\002H" + + "\"C/v1beta1/{name=projects/*/locations/*/" + + "models/*}:mergeVersionAliases:\001*\332A\024name," + + "version_aliases\022\360\001\n\013ExportModel\0223.google" + + ".cloud.aiplatform.v1beta1.ExportModelReq" + + "uest\032\035.google.longrunning.Operation\"\214\001\202\323" + + "\344\223\002;\"6/v1beta1/{name=projects/*/location" + + "s/*/models/*}:export:\001*\332A\022name,output_co" + + "nfig\312A3\n\023ExportModelResponse\022\034ExportMode" + + "lOperationMetadata\022\347\001\n\tCopyModel\0221.googl" + + "e.cloud.aiplatform.v1beta1.CopyModelRequ" + + "est\032\035.google.longrunning.Operation\"\207\001\202\323\344" + + "\223\0029\"4/v1beta1/{parent=projects/*/locatio" + + "ns/*}/models:copy:\001*\332A\023parent,source_mod" + + "el\312A/\n\021CopyModelResponse\022\032CopyModelOpera" + + "tionMetadata\022\363\001\n\025ImportModelEvaluation\022=" + + ".google.cloud.aiplatform.v1beta1.ImportM" + + "odelEvaluationRequest\0320.google.cloud.aip" + + "latform.v1beta1.ModelEvaluation\"i\202\323\344\223\002I\"" + + "D/v1beta1/{parent=projects/*/locations/*" + + "/models/*}/evaluations:import:\001*\332A\027paren" + + "t,model_evaluation\022\267\002\n BatchImportModelE" + + "valuationSlices\022H.google.cloud.aiplatfor" + + "m.v1beta1.BatchImportModelEvaluationSlic" + + "esRequest\032I.google.cloud.aiplatform.v1be" + + "ta1.BatchImportModelEvaluationSlicesResp" + + "onse\"~\202\323\344\223\002W\"R/v1beta1/{parent=projects/" + + "*/locations/*/models/*/evaluations/*}/sl" + + "ices:batchImport:\001*\332A\036parent,model_evalu" + + "ation_slices\022\320\001\n\022GetModelEvaluation\022:.go" + + "ogle.cloud.aiplatform.v1beta1.GetModelEv" + + "aluationRequest\0320.google.cloud.aiplatfor" + + "m.v1beta1.ModelEvaluation\"L\202\323\344\223\002?\022=/v1be" + + "ta1/{name=projects/*/locations/*/models/" + + "*/evaluations/*}\332A\004name\022\343\001\n\024ListModelEva" + + "luations\022<.google.cloud.aiplatform.v1bet" + + "a1.ListModelEvaluationsRequest\032=.google." + + "cloud.aiplatform.v1beta1.ListModelEvalua" + + "tionsResponse\"N\202\323\344\223\002?\022=/v1beta1/{parent=" + + "projects/*/locations/*/models/*}/evaluat" + + "ions\332A\006parent\022\350\001\n\027GetModelEvaluationSlic" + + "e\022?.google.cloud.aiplatform.v1beta1.GetM" + + "odelEvaluationSliceRequest\0325.google.clou" + + "d.aiplatform.v1beta1.ModelEvaluationSlic" + + "e\"U\202\323\344\223\002H\022F/v1beta1/{name=projects/*/loc" + + "ations/*/models/*/evaluations/*/slices/*" + + "}\332A\004name\022\373\001\n\031ListModelEvaluationSlices\022A" + + ".google.cloud.aiplatform.v1beta1.ListMod" + + "elEvaluationSlicesRequest\032B.google.cloud" + + ".aiplatform.v1beta1.ListModelEvaluationS" + + "licesResponse\"W\202\323\344\223\002H\022F/v1beta1/{parent=" + + "projects/*/locations/*/models/*/evaluati" + + "ons/*}/slices\332A\006parent\032M\312A\031aiplatform.go" + + "ogleapis.com\322A.https://www.googleapis.co" + + "m/auth/cloud-platformB\350\001\n#com.google.clo" + + "ud.aiplatform.v1beta1B\021ModelServiceProto" + + "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( @@ -375,6 +408,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ClientProto.getDescriptor(), com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.aiplatform.v1beta1.EncryptionSpecProto.getDescriptor(), com.google.cloud.aiplatform.v1beta1.ExplanationProto.getDescriptor(), com.google.cloud.aiplatform.v1beta1.IoProto.getDescriptor(), com.google.cloud.aiplatform.v1beta1.ModelProto.getDescriptor(), @@ -544,8 +578,37 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_ExportModelResponse_descriptor, new java.lang.String[] {}); - internal_static_google_cloud_aiplatform_v1beta1_ImportModelEvaluationRequest_descriptor = + internal_static_google_cloud_aiplatform_v1beta1_CopyModelRequest_descriptor = getDescriptor().getMessageTypes().get(18); + internal_static_google_cloud_aiplatform_v1beta1_CopyModelRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_CopyModelRequest_descriptor, + new java.lang.String[] { + "ModelId", + "ParentModel", + "Parent", + "SourceModel", + "EncryptionSpec", + "DestinationModel", + }); + internal_static_google_cloud_aiplatform_v1beta1_CopyModelOperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_google_cloud_aiplatform_v1beta1_CopyModelOperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_CopyModelOperationMetadata_descriptor, + new java.lang.String[] { + "GenericMetadata", + }); + internal_static_google_cloud_aiplatform_v1beta1_CopyModelResponse_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_google_cloud_aiplatform_v1beta1_CopyModelResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_CopyModelResponse_descriptor, + new java.lang.String[] { + "Model", "ModelVersionId", + }); + internal_static_google_cloud_aiplatform_v1beta1_ImportModelEvaluationRequest_descriptor = + getDescriptor().getMessageTypes().get(21); internal_static_google_cloud_aiplatform_v1beta1_ImportModelEvaluationRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_ImportModelEvaluationRequest_descriptor, @@ -553,7 +616,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "ModelEvaluation", }); internal_static_google_cloud_aiplatform_v1beta1_BatchImportModelEvaluationSlicesRequest_descriptor = - getDescriptor().getMessageTypes().get(19); + getDescriptor().getMessageTypes().get(22); internal_static_google_cloud_aiplatform_v1beta1_BatchImportModelEvaluationSlicesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_BatchImportModelEvaluationSlicesRequest_descriptor, @@ -561,7 +624,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "ModelEvaluationSlices", }); internal_static_google_cloud_aiplatform_v1beta1_BatchImportModelEvaluationSlicesResponse_descriptor = - getDescriptor().getMessageTypes().get(20); + getDescriptor().getMessageTypes().get(23); internal_static_google_cloud_aiplatform_v1beta1_BatchImportModelEvaluationSlicesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_BatchImportModelEvaluationSlicesResponse_descriptor, @@ -569,7 +632,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ImportedModelEvaluationSlices", }); internal_static_google_cloud_aiplatform_v1beta1_GetModelEvaluationRequest_descriptor = - getDescriptor().getMessageTypes().get(21); + getDescriptor().getMessageTypes().get(24); internal_static_google_cloud_aiplatform_v1beta1_GetModelEvaluationRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_GetModelEvaluationRequest_descriptor, @@ -577,7 +640,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_aiplatform_v1beta1_ListModelEvaluationsRequest_descriptor = - getDescriptor().getMessageTypes().get(22); + getDescriptor().getMessageTypes().get(25); internal_static_google_cloud_aiplatform_v1beta1_ListModelEvaluationsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_ListModelEvaluationsRequest_descriptor, @@ -585,7 +648,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "Filter", "PageSize", "PageToken", "ReadMask", }); internal_static_google_cloud_aiplatform_v1beta1_ListModelEvaluationsResponse_descriptor = - getDescriptor().getMessageTypes().get(23); + getDescriptor().getMessageTypes().get(26); internal_static_google_cloud_aiplatform_v1beta1_ListModelEvaluationsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_ListModelEvaluationsResponse_descriptor, @@ -593,7 +656,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ModelEvaluations", "NextPageToken", }); internal_static_google_cloud_aiplatform_v1beta1_GetModelEvaluationSliceRequest_descriptor = - getDescriptor().getMessageTypes().get(24); + getDescriptor().getMessageTypes().get(27); internal_static_google_cloud_aiplatform_v1beta1_GetModelEvaluationSliceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_GetModelEvaluationSliceRequest_descriptor, @@ -601,7 +664,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_aiplatform_v1beta1_ListModelEvaluationSlicesRequest_descriptor = - getDescriptor().getMessageTypes().get(25); + getDescriptor().getMessageTypes().get(28); internal_static_google_cloud_aiplatform_v1beta1_ListModelEvaluationSlicesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_ListModelEvaluationSlicesRequest_descriptor, @@ -609,7 +672,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "Filter", "PageSize", "PageToken", "ReadMask", }); internal_static_google_cloud_aiplatform_v1beta1_ListModelEvaluationSlicesResponse_descriptor = - getDescriptor().getMessageTypes().get(26); + getDescriptor().getMessageTypes().get(29); internal_static_google_cloud_aiplatform_v1beta1_ListModelEvaluationSlicesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_ListModelEvaluationSlicesResponse_descriptor, @@ -631,6 +694,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ClientProto.getDescriptor(); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.aiplatform.v1beta1.EncryptionSpecProto.getDescriptor(); com.google.cloud.aiplatform.v1beta1.ExplanationProto.getDescriptor(); com.google.cloud.aiplatform.v1beta1.IoProto.getDescriptor(); com.google.cloud.aiplatform.v1beta1.ModelProto.getDescriptor(); diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NasJob.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NasJob.java new file mode 100644 index 000000000000..987cd7044f40 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NasJob.java @@ -0,0 +1,3723 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/nas_job.proto + +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Represents a Neural Architecture Search (NAS) job.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.NasJob} + */ +public final class NasJob extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.NasJob) + NasJobOrBuilder { + private static final long serialVersionUID = 0L; + // Use NasJob.newBuilder() to construct. + private NasJob(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NasJob() { + name_ = ""; + displayName_ = ""; + state_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NasJob(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NasJobProto + .internal_static_google_cloud_aiplatform_v1beta1_NasJob_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(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.v1beta1.NasJobProto + .internal_static_google_cloud_aiplatform_v1beta1_NasJob_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.NasJob.class, + com.google.cloud.aiplatform.v1beta1.NasJob.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Output only. Resource name of the NasJob.
+   * 
+ * + * 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. Resource name of the NasJob.
+   * 
+ * + * 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 NasJob.
+   * 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 NasJob.
+   * 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 NAS_JOB_SPEC_FIELD_NUMBER = 4; + private com.google.cloud.aiplatform.v1beta1.NasJobSpec nasJobSpec_; + /** + * + * + *
+   * Required. The specification of a NasJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec nas_job_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the nasJobSpec field is set. + */ + @java.lang.Override + public boolean hasNasJobSpec() { + return nasJobSpec_ != null; + } + /** + * + * + *
+   * Required. The specification of a NasJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec nas_job_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The nasJobSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasJobSpec getNasJobSpec() { + return nasJobSpec_ == null + ? com.google.cloud.aiplatform.v1beta1.NasJobSpec.getDefaultInstance() + : nasJobSpec_; + } + /** + * + * + *
+   * Required. The specification of a NasJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec nas_job_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasJobSpecOrBuilder getNasJobSpecOrBuilder() { + return nasJobSpec_ == null + ? com.google.cloud.aiplatform.v1beta1.NasJobSpec.getDefaultInstance() + : nasJobSpec_; + } + + public static final int NAS_JOB_OUTPUT_FIELD_NUMBER = 5; + private com.google.cloud.aiplatform.v1beta1.NasJobOutput nasJobOutput_; + /** + * + * + *
+   * Output only. Output of the NasJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobOutput nas_job_output = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the nasJobOutput field is set. + */ + @java.lang.Override + public boolean hasNasJobOutput() { + return nasJobOutput_ != null; + } + /** + * + * + *
+   * Output only. Output of the NasJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobOutput nas_job_output = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The nasJobOutput. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasJobOutput getNasJobOutput() { + return nasJobOutput_ == null + ? com.google.cloud.aiplatform.v1beta1.NasJobOutput.getDefaultInstance() + : nasJobOutput_; + } + /** + * + * + *
+   * Output only. Output of the NasJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobOutput nas_job_output = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasJobOutputOrBuilder getNasJobOutputOrBuilder() { + return nasJobOutput_ == null + ? com.google.cloud.aiplatform.v1beta1.NasJobOutput.getDefaultInstance() + : nasJobOutput_; + } + + public static final int STATE_FIELD_NUMBER = 6; + private int state_ = 0; + /** + * + * + *
+   * Output only. The detailed state of the job.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.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.v1beta1.JobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.JobState getState() { + com.google.cloud.aiplatform.v1beta1.JobState result = + com.google.cloud.aiplatform.v1beta1.JobState.forNumber(state_); + return result == null ? com.google.cloud.aiplatform.v1beta1.JobState.UNRECOGNIZED : result; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Time when the NasJob 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 createTime_ != null; + } + /** + * + * + *
+   * Output only. Time when the NasJob 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 NasJob 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 NasJob 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 startTime_ != null; + } + /** + * + * + *
+   * Output only. Time when the NasJob 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 NasJob 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 NasJob entered any of the following states:
+   * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+   * 
+ * + * .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 endTime_ != null; + } + /** + * + * + *
+   * Output only. Time when the NasJob entered any of the following states:
+   * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+   * 
+ * + * .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 NasJob entered any of the following states:
+   * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+   * 
+ * + * .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 NasJob 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 updateTime_ != null; + } + /** + * + * + *
+   * Output only. Time when the NasJob 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 NasJob 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 error_ != null; + } + /** + * + * + *
+   * 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.v1beta1.NasJobProto + .internal_static_google_cloud_aiplatform_v1beta1_NasJob_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 NasJobs.
+   * 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; + */ + @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 NasJobs.
+   * 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; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * The labels with user-defined metadata to organize NasJobs.
+   * 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; + */ + @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 NasJobs.
+   * 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; + */ + @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 ENCRYPTION_SPEC_FIELD_NUMBER = 13; + private com.google.cloud.aiplatform.v1beta1.EncryptionSpec encryptionSpec_; + /** + * + * + *
+   * Customer-managed encryption key options for a NasJob.
+   * If this is set, then all resources created by the NasJob
+   * will be encrypted with the provided encryption key.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.EncryptionSpec encryption_spec = 13; + * + * @return Whether the encryptionSpec field is set. + */ + @java.lang.Override + public boolean hasEncryptionSpec() { + return encryptionSpec_ != null; + } + /** + * + * + *
+   * Customer-managed encryption key options for a NasJob.
+   * If this is set, then all resources created by the NasJob
+   * will be encrypted with the provided encryption key.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.EncryptionSpec encryption_spec = 13; + * + * @return The encryptionSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.EncryptionSpec getEncryptionSpec() { + return encryptionSpec_ == null + ? com.google.cloud.aiplatform.v1beta1.EncryptionSpec.getDefaultInstance() + : encryptionSpec_; + } + /** + * + * + *
+   * Customer-managed encryption key options for a NasJob.
+   * If this is set, then all resources created by the NasJob
+   * will be encrypted with the provided encryption key.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.EncryptionSpec encryption_spec = 13; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.EncryptionSpecOrBuilder getEncryptionSpecOrBuilder() { + return encryptionSpec_ == null + ? com.google.cloud.aiplatform.v1beta1.EncryptionSpec.getDefaultInstance() + : encryptionSpec_; + } + + public static final int ENABLE_RESTRICTED_IMAGE_TRAINING_FIELD_NUMBER = 14; + private boolean enableRestrictedImageTraining_ = false; + /** + * + * + *
+   * Optional. Enable a separation of Custom model training
+   * and restricted image training for tenant project.
+   * 
+ * + * bool enable_restricted_image_training = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enableRestrictedImageTraining. + */ + @java.lang.Override + public boolean getEnableRestrictedImageTraining() { + return enableRestrictedImageTraining_; + } + + 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 (nasJobSpec_ != null) { + output.writeMessage(4, getNasJobSpec()); + } + if (nasJobOutput_ != null) { + output.writeMessage(5, getNasJobOutput()); + } + if (state_ != com.google.cloud.aiplatform.v1beta1.JobState.JOB_STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(6, state_); + } + if (createTime_ != null) { + output.writeMessage(7, getCreateTime()); + } + if (startTime_ != null) { + output.writeMessage(8, getStartTime()); + } + if (endTime_ != null) { + output.writeMessage(9, getEndTime()); + } + if (updateTime_ != null) { + output.writeMessage(10, getUpdateTime()); + } + if (error_ != null) { + output.writeMessage(11, getError()); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 12); + if (encryptionSpec_ != null) { + output.writeMessage(13, getEncryptionSpec()); + } + if (enableRestrictedImageTraining_ != false) { + output.writeBool(14, enableRestrictedImageTraining_); + } + 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 (nasJobSpec_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getNasJobSpec()); + } + if (nasJobOutput_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getNasJobOutput()); + } + if (state_ != com.google.cloud.aiplatform.v1beta1.JobState.JOB_STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, state_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getCreateTime()); + } + if (startTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getStartTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getEndTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getUpdateTime()); + } + if (error_ != null) { + 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 (encryptionSpec_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getEncryptionSpec()); + } + if (enableRestrictedImageTraining_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(14, enableRestrictedImageTraining_); + } + 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.NasJob)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.NasJob other = + (com.google.cloud.aiplatform.v1beta1.NasJob) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (hasNasJobSpec() != other.hasNasJobSpec()) return false; + if (hasNasJobSpec()) { + if (!getNasJobSpec().equals(other.getNasJobSpec())) return false; + } + if (hasNasJobOutput() != other.hasNasJobOutput()) return false; + if (hasNasJobOutput()) { + if (!getNasJobOutput().equals(other.getNasJobOutput())) 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 (hasEncryptionSpec() != other.hasEncryptionSpec()) return false; + if (hasEncryptionSpec()) { + if (!getEncryptionSpec().equals(other.getEncryptionSpec())) return false; + } + if (getEnableRestrictedImageTraining() != other.getEnableRestrictedImageTraining()) + 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 (hasNasJobSpec()) { + hash = (37 * hash) + NAS_JOB_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getNasJobSpec().hashCode(); + } + if (hasNasJobOutput()) { + hash = (37 * hash) + NAS_JOB_OUTPUT_FIELD_NUMBER; + hash = (53 * hash) + getNasJobOutput().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(); + } + if (hasEncryptionSpec()) { + hash = (37 * hash) + ENCRYPTION_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getEncryptionSpec().hashCode(); + } + hash = (37 * hash) + ENABLE_RESTRICTED_IMAGE_TRAINING_FIELD_NUMBER; + hash = + (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableRestrictedImageTraining()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.NasJob parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.NasJob 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.NasJob parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.NasJob 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.NasJob parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.NasJob 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.NasJob parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.NasJob 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.NasJob parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.NasJob 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.NasJob 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.NasJob 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.NasJob 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 Neural Architecture Search (NAS) job.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.NasJob} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.NasJob) + com.google.cloud.aiplatform.v1beta1.NasJobOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NasJobProto + .internal_static_google_cloud_aiplatform_v1beta1_NasJob_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 12: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(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.v1beta1.NasJobProto + .internal_static_google_cloud_aiplatform_v1beta1_NasJob_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.NasJob.class, + com.google.cloud.aiplatform.v1beta1.NasJob.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.NasJob.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + displayName_ = ""; + nasJobSpec_ = null; + if (nasJobSpecBuilder_ != null) { + nasJobSpecBuilder_.dispose(); + nasJobSpecBuilder_ = null; + } + nasJobOutput_ = null; + if (nasJobOutputBuilder_ != null) { + nasJobOutputBuilder_.dispose(); + nasJobOutputBuilder_ = null; + } + 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(); + encryptionSpec_ = null; + if (encryptionSpecBuilder_ != null) { + encryptionSpecBuilder_.dispose(); + encryptionSpecBuilder_ = null; + } + enableRestrictedImageTraining_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.NasJobProto + .internal_static_google_cloud_aiplatform_v1beta1_NasJob_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasJob getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.NasJob.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasJob build() { + com.google.cloud.aiplatform.v1beta1.NasJob result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasJob buildPartial() { + com.google.cloud.aiplatform.v1beta1.NasJob result = + new com.google.cloud.aiplatform.v1beta1.NasJob(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.NasJob 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.nasJobSpec_ = nasJobSpecBuilder_ == null ? nasJobSpec_ : nasJobSpecBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.nasJobOutput_ = + nasJobOutputBuilder_ == null ? nasJobOutput_ : nasJobOutputBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.error_ = errorBuilder_ == null ? error_ : errorBuilder_.build(); + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.encryptionSpec_ = + encryptionSpecBuilder_ == null ? encryptionSpec_ : encryptionSpecBuilder_.build(); + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.enableRestrictedImageTraining_ = enableRestrictedImageTraining_; + } + } + + @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.NasJob) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.NasJob) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.NasJob other) { + if (other == com.google.cloud.aiplatform.v1beta1.NasJob.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.hasNasJobSpec()) { + mergeNasJobSpec(other.getNasJobSpec()); + } + if (other.hasNasJobOutput()) { + mergeNasJobOutput(other.getNasJobOutput()); + } + 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_ |= 0x00000400; + if (other.hasEncryptionSpec()) { + mergeEncryptionSpec(other.getEncryptionSpec()); + } + if (other.getEnableRestrictedImageTraining() != false) { + setEnableRestrictedImageTraining(other.getEnableRestrictedImageTraining()); + } + 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: + { + input.readMessage(getNasJobSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 34 + case 42: + { + input.readMessage(getNasJobOutputFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 42 + case 48: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 48 + 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(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 74 + case 82: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 82 + case 90: + { + input.readMessage(getErrorFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 90 + case 98: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000400; + break; + } // case 98 + case 106: + { + input.readMessage(getEncryptionSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000800; + break; + } // case 106 + case 112: + { + enableRestrictedImageTraining_ = input.readBool(); + bitField0_ |= 0x00001000; + break; + } // case 112 + 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. Resource name of the NasJob.
+     * 
+ * + * 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. Resource name of the NasJob.
+     * 
+ * + * 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. Resource name of the NasJob.
+     * 
+ * + * 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. Resource name of the NasJob.
+     * 
+ * + * 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. Resource name of the NasJob.
+     * 
+ * + * 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 NasJob.
+     * 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 NasJob.
+     * 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 NasJob.
+     * 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 NasJob.
+     * 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 NasJob.
+     * 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 com.google.cloud.aiplatform.v1beta1.NasJobSpec nasJobSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NasJobSpec, + com.google.cloud.aiplatform.v1beta1.NasJobSpec.Builder, + com.google.cloud.aiplatform.v1beta1.NasJobSpecOrBuilder> + nasJobSpecBuilder_; + /** + * + * + *
+     * Required. The specification of a NasJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec nas_job_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the nasJobSpec field is set. + */ + public boolean hasNasJobSpec() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. The specification of a NasJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec nas_job_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The nasJobSpec. + */ + public com.google.cloud.aiplatform.v1beta1.NasJobSpec getNasJobSpec() { + if (nasJobSpecBuilder_ == null) { + return nasJobSpec_ == null + ? com.google.cloud.aiplatform.v1beta1.NasJobSpec.getDefaultInstance() + : nasJobSpec_; + } else { + return nasJobSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The specification of a NasJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec nas_job_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setNasJobSpec(com.google.cloud.aiplatform.v1beta1.NasJobSpec value) { + if (nasJobSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + nasJobSpec_ = value; + } else { + nasJobSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The specification of a NasJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec nas_job_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setNasJobSpec( + com.google.cloud.aiplatform.v1beta1.NasJobSpec.Builder builderForValue) { + if (nasJobSpecBuilder_ == null) { + nasJobSpec_ = builderForValue.build(); + } else { + nasJobSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The specification of a NasJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec nas_job_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeNasJobSpec(com.google.cloud.aiplatform.v1beta1.NasJobSpec value) { + if (nasJobSpecBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && nasJobSpec_ != null + && nasJobSpec_ != com.google.cloud.aiplatform.v1beta1.NasJobSpec.getDefaultInstance()) { + getNasJobSpecBuilder().mergeFrom(value); + } else { + nasJobSpec_ = value; + } + } else { + nasJobSpecBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The specification of a NasJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec nas_job_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearNasJobSpec() { + bitField0_ = (bitField0_ & ~0x00000004); + nasJobSpec_ = null; + if (nasJobSpecBuilder_ != null) { + nasJobSpecBuilder_.dispose(); + nasJobSpecBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The specification of a NasJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec nas_job_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1beta1.NasJobSpec.Builder getNasJobSpecBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getNasJobSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The specification of a NasJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec nas_job_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1beta1.NasJobSpecOrBuilder getNasJobSpecOrBuilder() { + if (nasJobSpecBuilder_ != null) { + return nasJobSpecBuilder_.getMessageOrBuilder(); + } else { + return nasJobSpec_ == null + ? com.google.cloud.aiplatform.v1beta1.NasJobSpec.getDefaultInstance() + : nasJobSpec_; + } + } + /** + * + * + *
+     * Required. The specification of a NasJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec nas_job_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NasJobSpec, + com.google.cloud.aiplatform.v1beta1.NasJobSpec.Builder, + com.google.cloud.aiplatform.v1beta1.NasJobSpecOrBuilder> + getNasJobSpecFieldBuilder() { + if (nasJobSpecBuilder_ == null) { + nasJobSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NasJobSpec, + com.google.cloud.aiplatform.v1beta1.NasJobSpec.Builder, + com.google.cloud.aiplatform.v1beta1.NasJobSpecOrBuilder>( + getNasJobSpec(), getParentForChildren(), isClean()); + nasJobSpec_ = null; + } + return nasJobSpecBuilder_; + } + + private com.google.cloud.aiplatform.v1beta1.NasJobOutput nasJobOutput_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NasJobOutput, + com.google.cloud.aiplatform.v1beta1.NasJobOutput.Builder, + com.google.cloud.aiplatform.v1beta1.NasJobOutputOrBuilder> + nasJobOutputBuilder_; + /** + * + * + *
+     * Output only. Output of the NasJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobOutput nas_job_output = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the nasJobOutput field is set. + */ + public boolean hasNasJobOutput() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Output only. Output of the NasJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobOutput nas_job_output = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The nasJobOutput. + */ + public com.google.cloud.aiplatform.v1beta1.NasJobOutput getNasJobOutput() { + if (nasJobOutputBuilder_ == null) { + return nasJobOutput_ == null + ? com.google.cloud.aiplatform.v1beta1.NasJobOutput.getDefaultInstance() + : nasJobOutput_; + } else { + return nasJobOutputBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Output of the NasJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobOutput nas_job_output = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setNasJobOutput(com.google.cloud.aiplatform.v1beta1.NasJobOutput value) { + if (nasJobOutputBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + nasJobOutput_ = value; + } else { + nasJobOutputBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Output of the NasJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobOutput nas_job_output = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setNasJobOutput( + com.google.cloud.aiplatform.v1beta1.NasJobOutput.Builder builderForValue) { + if (nasJobOutputBuilder_ == null) { + nasJobOutput_ = builderForValue.build(); + } else { + nasJobOutputBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Output of the NasJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobOutput nas_job_output = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeNasJobOutput(com.google.cloud.aiplatform.v1beta1.NasJobOutput value) { + if (nasJobOutputBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && nasJobOutput_ != null + && nasJobOutput_ + != com.google.cloud.aiplatform.v1beta1.NasJobOutput.getDefaultInstance()) { + getNasJobOutputBuilder().mergeFrom(value); + } else { + nasJobOutput_ = value; + } + } else { + nasJobOutputBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Output of the NasJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobOutput nas_job_output = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearNasJobOutput() { + bitField0_ = (bitField0_ & ~0x00000008); + nasJobOutput_ = null; + if (nasJobOutputBuilder_ != null) { + nasJobOutputBuilder_.dispose(); + nasJobOutputBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Output of the NasJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobOutput nas_job_output = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1beta1.NasJobOutput.Builder getNasJobOutputBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getNasJobOutputFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Output of the NasJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobOutput nas_job_output = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1beta1.NasJobOutputOrBuilder getNasJobOutputOrBuilder() { + if (nasJobOutputBuilder_ != null) { + return nasJobOutputBuilder_.getMessageOrBuilder(); + } else { + return nasJobOutput_ == null + ? com.google.cloud.aiplatform.v1beta1.NasJobOutput.getDefaultInstance() + : nasJobOutput_; + } + } + /** + * + * + *
+     * Output only. Output of the NasJob.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobOutput nas_job_output = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NasJobOutput, + com.google.cloud.aiplatform.v1beta1.NasJobOutput.Builder, + com.google.cloud.aiplatform.v1beta1.NasJobOutputOrBuilder> + getNasJobOutputFieldBuilder() { + if (nasJobOutputBuilder_ == null) { + nasJobOutputBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NasJobOutput, + com.google.cloud.aiplatform.v1beta1.NasJobOutput.Builder, + com.google.cloud.aiplatform.v1beta1.NasJobOutputOrBuilder>( + getNasJobOutput(), getParentForChildren(), isClean()); + nasJobOutput_ = null; + } + return nasJobOutputBuilder_; + } + + private int state_ = 0; + /** + * + * + *
+     * Output only. The detailed state of the job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.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.v1beta1.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_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The detailed state of the job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.JobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.JobState getState() { + com.google.cloud.aiplatform.v1beta1.JobState result = + com.google.cloud.aiplatform.v1beta1.JobState.forNumber(state_); + return result == null ? com.google.cloud.aiplatform.v1beta1.JobState.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Output only. The detailed state of the job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.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.v1beta1.JobState value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The detailed state of the job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.JobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000010); + 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 NasJob 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 NasJob 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 NasJob 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 NasJob 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 NasJob 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); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the NasJob 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 NasJob 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 NasJob 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 NasJob 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 NasJob 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_ & 0x00000040) != 0); + } + /** + * + * + *
+     * Output only. Time when the NasJob 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 NasJob 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_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the NasJob 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_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the NasJob 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_ & 0x00000040) != 0) + && startTime_ != null + && startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getStartTimeBuilder().mergeFrom(value); + } else { + startTime_ = value; + } + } else { + startTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the NasJob 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_ & ~0x00000040); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the NasJob 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_ |= 0x00000040; + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when the NasJob 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 NasJob 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 NasJob entered any of the following states:
+     * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * + * + *
+     * Output only. Time when the NasJob entered any of the following states:
+     * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+     * 
+ * + * .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 NasJob entered any of the following states:
+     * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+     * 
+ * + * .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_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the NasJob entered any of the following states:
+     * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+     * 
+ * + * .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_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the NasJob entered any of the following states:
+     * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+     * 
+ * + * .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_ & 0x00000080) != 0) + && endTime_ != null + && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the NasJob entered any of the following states:
+     * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000080); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the NasJob entered any of the following states:
+     * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000080; + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when the NasJob entered any of the following states:
+     * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+     * 
+ * + * .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 NasJob entered any of the following states:
+     * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+     * 
+ * + * .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 NasJob 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_ & 0x00000100) != 0); + } + /** + * + * + *
+     * Output only. Time when the NasJob 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 NasJob 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_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the NasJob 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_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the NasJob 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_ & 0x00000100) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the NasJob was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000100); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the NasJob was most recently updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when the NasJob 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 NasJob 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_ & 0x00000200) != 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_ |= 0x00000200; + 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_ |= 0x00000200; + 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_ & 0x00000200) != 0) + && error_ != null + && error_ != com.google.rpc.Status.getDefaultInstance()) { + getErrorBuilder().mergeFrom(value); + } else { + error_ = value; + } + } else { + errorBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000200; + 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_ & ~0x00000200); + 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_ |= 0x00000200; + 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_ |= 0x00000400; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * The labels with user-defined metadata to organize NasJobs.
+     * 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; + */ + @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 NasJobs.
+     * 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; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * The labels with user-defined metadata to organize NasJobs.
+     * 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; + */ + @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 NasJobs.
+     * 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; + */ + @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_ & ~0x00000400); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * The labels with user-defined metadata to organize NasJobs.
+     * 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; + */ + 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_ |= 0x00000400; + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * The labels with user-defined metadata to organize NasJobs.
+     * 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; + */ + 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_ |= 0x00000400; + return this; + } + /** + * + * + *
+     * The labels with user-defined metadata to organize NasJobs.
+     * 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; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000400; + return this; + } + + private com.google.cloud.aiplatform.v1beta1.EncryptionSpec encryptionSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.EncryptionSpec, + com.google.cloud.aiplatform.v1beta1.EncryptionSpec.Builder, + com.google.cloud.aiplatform.v1beta1.EncryptionSpecOrBuilder> + encryptionSpecBuilder_; + /** + * + * + *
+     * Customer-managed encryption key options for a NasJob.
+     * If this is set, then all resources created by the NasJob
+     * will be encrypted with the provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.EncryptionSpec encryption_spec = 13; + * + * @return Whether the encryptionSpec field is set. + */ + public boolean hasEncryptionSpec() { + return ((bitField0_ & 0x00000800) != 0); + } + /** + * + * + *
+     * Customer-managed encryption key options for a NasJob.
+     * If this is set, then all resources created by the NasJob
+     * will be encrypted with the provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.EncryptionSpec encryption_spec = 13; + * + * @return The encryptionSpec. + */ + public com.google.cloud.aiplatform.v1beta1.EncryptionSpec getEncryptionSpec() { + if (encryptionSpecBuilder_ == null) { + return encryptionSpec_ == null + ? com.google.cloud.aiplatform.v1beta1.EncryptionSpec.getDefaultInstance() + : encryptionSpec_; + } else { + return encryptionSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Customer-managed encryption key options for a NasJob.
+     * If this is set, then all resources created by the NasJob
+     * will be encrypted with the provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.EncryptionSpec encryption_spec = 13; + */ + public Builder setEncryptionSpec(com.google.cloud.aiplatform.v1beta1.EncryptionSpec value) { + if (encryptionSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + encryptionSpec_ = value; + } else { + encryptionSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * Customer-managed encryption key options for a NasJob.
+     * If this is set, then all resources created by the NasJob
+     * will be encrypted with the provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.EncryptionSpec encryption_spec = 13; + */ + public Builder setEncryptionSpec( + com.google.cloud.aiplatform.v1beta1.EncryptionSpec.Builder builderForValue) { + if (encryptionSpecBuilder_ == null) { + encryptionSpec_ = builderForValue.build(); + } else { + encryptionSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * Customer-managed encryption key options for a NasJob.
+     * If this is set, then all resources created by the NasJob
+     * will be encrypted with the provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.EncryptionSpec encryption_spec = 13; + */ + public Builder mergeEncryptionSpec(com.google.cloud.aiplatform.v1beta1.EncryptionSpec value) { + if (encryptionSpecBuilder_ == null) { + if (((bitField0_ & 0x00000800) != 0) + && encryptionSpec_ != null + && encryptionSpec_ + != com.google.cloud.aiplatform.v1beta1.EncryptionSpec.getDefaultInstance()) { + getEncryptionSpecBuilder().mergeFrom(value); + } else { + encryptionSpec_ = value; + } + } else { + encryptionSpecBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * Customer-managed encryption key options for a NasJob.
+     * If this is set, then all resources created by the NasJob
+     * will be encrypted with the provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.EncryptionSpec encryption_spec = 13; + */ + public Builder clearEncryptionSpec() { + bitField0_ = (bitField0_ & ~0x00000800); + encryptionSpec_ = null; + if (encryptionSpecBuilder_ != null) { + encryptionSpecBuilder_.dispose(); + encryptionSpecBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Customer-managed encryption key options for a NasJob.
+     * If this is set, then all resources created by the NasJob
+     * will be encrypted with the provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.EncryptionSpec encryption_spec = 13; + */ + public com.google.cloud.aiplatform.v1beta1.EncryptionSpec.Builder getEncryptionSpecBuilder() { + bitField0_ |= 0x00000800; + onChanged(); + return getEncryptionSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Customer-managed encryption key options for a NasJob.
+     * If this is set, then all resources created by the NasJob
+     * will be encrypted with the provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.EncryptionSpec encryption_spec = 13; + */ + public com.google.cloud.aiplatform.v1beta1.EncryptionSpecOrBuilder + getEncryptionSpecOrBuilder() { + if (encryptionSpecBuilder_ != null) { + return encryptionSpecBuilder_.getMessageOrBuilder(); + } else { + return encryptionSpec_ == null + ? com.google.cloud.aiplatform.v1beta1.EncryptionSpec.getDefaultInstance() + : encryptionSpec_; + } + } + /** + * + * + *
+     * Customer-managed encryption key options for a NasJob.
+     * If this is set, then all resources created by the NasJob
+     * will be encrypted with the provided encryption key.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.EncryptionSpec encryption_spec = 13; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.EncryptionSpec, + com.google.cloud.aiplatform.v1beta1.EncryptionSpec.Builder, + com.google.cloud.aiplatform.v1beta1.EncryptionSpecOrBuilder> + getEncryptionSpecFieldBuilder() { + if (encryptionSpecBuilder_ == null) { + encryptionSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.EncryptionSpec, + com.google.cloud.aiplatform.v1beta1.EncryptionSpec.Builder, + com.google.cloud.aiplatform.v1beta1.EncryptionSpecOrBuilder>( + getEncryptionSpec(), getParentForChildren(), isClean()); + encryptionSpec_ = null; + } + return encryptionSpecBuilder_; + } + + private boolean enableRestrictedImageTraining_; + /** + * + * + *
+     * Optional. Enable a separation of Custom model training
+     * and restricted image training for tenant project.
+     * 
+ * + * bool enable_restricted_image_training = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enableRestrictedImageTraining. + */ + @java.lang.Override + public boolean getEnableRestrictedImageTraining() { + return enableRestrictedImageTraining_; + } + /** + * + * + *
+     * Optional. Enable a separation of Custom model training
+     * and restricted image training for tenant project.
+     * 
+ * + * bool enable_restricted_image_training = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enableRestrictedImageTraining to set. + * @return This builder for chaining. + */ + public Builder setEnableRestrictedImageTraining(boolean value) { + + enableRestrictedImageTraining_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Enable a separation of Custom model training
+     * and restricted image training for tenant project.
+     * 
+ * + * bool enable_restricted_image_training = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearEnableRestrictedImageTraining() { + bitField0_ = (bitField0_ & ~0x00001000); + enableRestrictedImageTraining_ = 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.NasJob) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.NasJob) + private static final com.google.cloud.aiplatform.v1beta1.NasJob DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.NasJob(); + } + + public static com.google.cloud.aiplatform.v1beta1.NasJob getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NasJob 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.NasJob getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NasJobName.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NasJobName.java new file mode 100644 index 000000000000..4da41e401811 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NasJobName.java @@ -0,0 +1,223 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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 NasJobName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_NAS_JOB = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/nasJobs/{nas_job}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String nasJob; + + @Deprecated + protected NasJobName() { + project = null; + location = null; + nasJob = null; + } + + private NasJobName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + nasJob = Preconditions.checkNotNull(builder.getNasJob()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getNasJob() { + return nasJob; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static NasJobName of(String project, String location, String nasJob) { + return newBuilder().setProject(project).setLocation(location).setNasJob(nasJob).build(); + } + + public static String format(String project, String location, String nasJob) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setNasJob(nasJob) + .build() + .toString(); + } + + public static NasJobName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_NAS_JOB.validatedMatch( + formattedString, "NasJobName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("nas_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 (NasJobName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_NAS_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 (nasJob != null) { + fieldMapBuilder.put("nas_job", nasJob); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_NAS_JOB.instantiate( + "project", project, "location", location, "nas_job", nasJob); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + NasJobName that = ((NasJobName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.nasJob, that.nasJob); + } + 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(nasJob); + return h; + } + + /** Builder for projects/{project}/locations/{location}/nasJobs/{nas_job}. */ + public static class Builder { + private String project; + private String location; + private String nasJob; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getNasJob() { + return nasJob; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setNasJob(String nasJob) { + this.nasJob = nasJob; + return this; + } + + private Builder(NasJobName nasJobName) { + this.project = nasJobName.project; + this.location = nasJobName.location; + this.nasJob = nasJobName.nasJob; + } + + public NasJobName build() { + return new NasJobName(this); + } + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NasJobOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NasJobOrBuilder.java new file mode 100644 index 000000000000..0d2d6ac0f011 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NasJobOrBuilder.java @@ -0,0 +1,520 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/nas_job.proto + +package com.google.cloud.aiplatform.v1beta1; + +public interface NasJobOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.NasJob) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Resource name of the NasJob.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Resource name of the NasJob.
+   * 
+ * + * 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 NasJob.
+   * 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 NasJob.
+   * 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(); + + /** + * + * + *
+   * Required. The specification of a NasJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec nas_job_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the nasJobSpec field is set. + */ + boolean hasNasJobSpec(); + /** + * + * + *
+   * Required. The specification of a NasJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec nas_job_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The nasJobSpec. + */ + com.google.cloud.aiplatform.v1beta1.NasJobSpec getNasJobSpec(); + /** + * + * + *
+   * Required. The specification of a NasJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec nas_job_spec = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1beta1.NasJobSpecOrBuilder getNasJobSpecOrBuilder(); + + /** + * + * + *
+   * Output only. Output of the NasJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobOutput nas_job_output = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the nasJobOutput field is set. + */ + boolean hasNasJobOutput(); + /** + * + * + *
+   * Output only. Output of the NasJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobOutput nas_job_output = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The nasJobOutput. + */ + com.google.cloud.aiplatform.v1beta1.NasJobOutput getNasJobOutput(); + /** + * + * + *
+   * Output only. Output of the NasJob.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobOutput nas_job_output = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1beta1.NasJobOutputOrBuilder getNasJobOutputOrBuilder(); + + /** + * + * + *
+   * Output only. The detailed state of the job.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.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.v1beta1.JobState state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.aiplatform.v1beta1.JobState getState(); + + /** + * + * + *
+   * Output only. Time when the NasJob 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 NasJob 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 NasJob was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time when the NasJob 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 NasJob 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 NasJob 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 NasJob entered any of the following states:
+   * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+   * 
+ * + * .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 NasJob entered any of the following states:
+   * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+   * 
+ * + * .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 NasJob entered any of the following states:
+   * `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time when the NasJob 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 NasJob 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 NasJob 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(); + + /** + * + * + *
+   * The labels with user-defined metadata to organize NasJobs.
+   * 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; + */ + int getLabelsCount(); + /** + * + * + *
+   * The labels with user-defined metadata to organize NasJobs.
+   * 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; + */ + 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 NasJobs.
+   * 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; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * The labels with user-defined metadata to organize NasJobs.
+   * 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; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * The labels with user-defined metadata to organize NasJobs.
+   * 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; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Customer-managed encryption key options for a NasJob.
+   * If this is set, then all resources created by the NasJob
+   * will be encrypted with the provided encryption key.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.EncryptionSpec encryption_spec = 13; + * + * @return Whether the encryptionSpec field is set. + */ + boolean hasEncryptionSpec(); + /** + * + * + *
+   * Customer-managed encryption key options for a NasJob.
+   * If this is set, then all resources created by the NasJob
+   * will be encrypted with the provided encryption key.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.EncryptionSpec encryption_spec = 13; + * + * @return The encryptionSpec. + */ + com.google.cloud.aiplatform.v1beta1.EncryptionSpec getEncryptionSpec(); + /** + * + * + *
+   * Customer-managed encryption key options for a NasJob.
+   * If this is set, then all resources created by the NasJob
+   * will be encrypted with the provided encryption key.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.EncryptionSpec encryption_spec = 13; + */ + com.google.cloud.aiplatform.v1beta1.EncryptionSpecOrBuilder getEncryptionSpecOrBuilder(); + + /** + * + * + *
+   * Optional. Enable a separation of Custom model training
+   * and restricted image training for tenant project.
+   * 
+ * + * bool enable_restricted_image_training = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enableRestrictedImageTraining. + */ + boolean getEnableRestrictedImageTraining(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NasJobOutput.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NasJobOutput.java new file mode 100644 index 000000000000..68620ce7a826 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NasJobOutput.java @@ -0,0 +1,2542 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/nas_job.proto + +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Represents a uCAIP NasJob output.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.NasJobOutput} + */ +public final class NasJobOutput extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.NasJobOutput) + NasJobOutputOrBuilder { + private static final long serialVersionUID = 0L; + // Use NasJobOutput.newBuilder() to construct. + private NasJobOutput(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NasJobOutput() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NasJobOutput(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NasJobProto + .internal_static_google_cloud_aiplatform_v1beta1_NasJobOutput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NasJobProto + .internal_static_google_cloud_aiplatform_v1beta1_NasJobOutput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.NasJobOutput.class, + com.google.cloud.aiplatform.v1beta1.NasJobOutput.Builder.class); + } + + public interface MultiTrialJobOutputOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Output only. List of NasTrials that were started as part of search stage.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NasTrial search_trials = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getSearchTrialsList(); + /** + * + * + *
+     * Output only. List of NasTrials that were started as part of search stage.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NasTrial search_trials = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1beta1.NasTrial getSearchTrials(int index); + /** + * + * + *
+     * Output only. List of NasTrials that were started as part of search stage.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NasTrial search_trials = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getSearchTrialsCount(); + /** + * + * + *
+     * Output only. List of NasTrials that were started as part of search stage.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NasTrial search_trials = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getSearchTrialsOrBuilderList(); + /** + * + * + *
+     * Output only. List of NasTrials that were started as part of search stage.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NasTrial search_trials = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1beta1.NasTrialOrBuilder getSearchTrialsOrBuilder(int index); + + /** + * + * + *
+     * Output only. List of NasTrials that were started as part of train stage.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NasTrial train_trials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getTrainTrialsList(); + /** + * + * + *
+     * Output only. List of NasTrials that were started as part of train stage.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NasTrial train_trials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1beta1.NasTrial getTrainTrials(int index); + /** + * + * + *
+     * Output only. List of NasTrials that were started as part of train stage.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NasTrial train_trials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getTrainTrialsCount(); + /** + * + * + *
+     * Output only. List of NasTrials that were started as part of train stage.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NasTrial train_trials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getTrainTrialsOrBuilderList(); + /** + * + * + *
+     * Output only. List of NasTrials that were started as part of train stage.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NasTrial train_trials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1beta1.NasTrialOrBuilder getTrainTrialsOrBuilder(int index); + } + /** + * + * + *
+   * The output of a multi-trial Neural Architecture Search (NAS) jobs.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput} + */ + public static final class MultiTrialJobOutput extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput) + MultiTrialJobOutputOrBuilder { + private static final long serialVersionUID = 0L; + // Use MultiTrialJobOutput.newBuilder() to construct. + private MultiTrialJobOutput(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MultiTrialJobOutput() { + searchTrials_ = java.util.Collections.emptyList(); + trainTrials_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MultiTrialJobOutput(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NasJobProto + .internal_static_google_cloud_aiplatform_v1beta1_NasJobOutput_MultiTrialJobOutput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NasJobProto + .internal_static_google_cloud_aiplatform_v1beta1_NasJobOutput_MultiTrialJobOutput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput.class, + com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput.Builder.class); + } + + public static final int SEARCH_TRIALS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List searchTrials_; + /** + * + * + *
+     * Output only. List of NasTrials that were started as part of search stage.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NasTrial search_trials = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List getSearchTrialsList() { + return searchTrials_; + } + /** + * + * + *
+     * Output only. List of NasTrials that were started as part of search stage.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NasTrial search_trials = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getSearchTrialsOrBuilderList() { + return searchTrials_; + } + /** + * + * + *
+     * Output only. List of NasTrials that were started as part of search stage.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NasTrial search_trials = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getSearchTrialsCount() { + return searchTrials_.size(); + } + /** + * + * + *
+     * Output only. List of NasTrials that were started as part of search stage.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NasTrial search_trials = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasTrial getSearchTrials(int index) { + return searchTrials_.get(index); + } + /** + * + * + *
+     * Output only. List of NasTrials that were started as part of search stage.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NasTrial search_trials = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasTrialOrBuilder getSearchTrialsOrBuilder( + int index) { + return searchTrials_.get(index); + } + + public static final int TRAIN_TRIALS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List trainTrials_; + /** + * + * + *
+     * Output only. List of NasTrials that were started as part of train stage.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NasTrial train_trials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List getTrainTrialsList() { + return trainTrials_; + } + /** + * + * + *
+     * Output only. List of NasTrials that were started as part of train stage.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NasTrial train_trials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getTrainTrialsOrBuilderList() { + return trainTrials_; + } + /** + * + * + *
+     * Output only. List of NasTrials that were started as part of train stage.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NasTrial train_trials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getTrainTrialsCount() { + return trainTrials_.size(); + } + /** + * + * + *
+     * Output only. List of NasTrials that were started as part of train stage.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NasTrial train_trials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasTrial getTrainTrials(int index) { + return trainTrials_.get(index); + } + /** + * + * + *
+     * Output only. List of NasTrials that were started as part of train stage.
+     * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NasTrial train_trials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasTrialOrBuilder getTrainTrialsOrBuilder( + int index) { + return trainTrials_.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 < searchTrials_.size(); i++) { + output.writeMessage(1, searchTrials_.get(i)); + } + for (int i = 0; i < trainTrials_.size(); i++) { + output.writeMessage(2, trainTrials_.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 < searchTrials_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, searchTrials_.get(i)); + } + for (int i = 0; i < trainTrials_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, trainTrials_.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.NasJobOutput.MultiTrialJobOutput)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput other = + (com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput) obj; + + if (!getSearchTrialsList().equals(other.getSearchTrialsList())) return false; + if (!getTrainTrialsList().equals(other.getTrainTrialsList())) 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 (getSearchTrialsCount() > 0) { + hash = (37 * hash) + SEARCH_TRIALS_FIELD_NUMBER; + hash = (53 * hash) + getSearchTrialsList().hashCode(); + } + if (getTrainTrialsCount() > 0) { + hash = (37 * hash) + TRAIN_TRIALS_FIELD_NUMBER; + hash = (53 * hash) + getTrainTrialsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput 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.NasJobOutput.MultiTrialJobOutput parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput 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.NasJobOutput.MultiTrialJobOutput parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput 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.NasJobOutput.MultiTrialJobOutput parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput 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.NasJobOutput.MultiTrialJobOutput + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput + 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.NasJobOutput.MultiTrialJobOutput 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.NasJobOutput.MultiTrialJobOutput 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.NasJobOutput.MultiTrialJobOutput 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 output of a multi-trial Neural Architecture Search (NAS) jobs.
+     * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput) + com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutputOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NasJobProto + .internal_static_google_cloud_aiplatform_v1beta1_NasJobOutput_MultiTrialJobOutput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NasJobProto + .internal_static_google_cloud_aiplatform_v1beta1_NasJobOutput_MultiTrialJobOutput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput.class, + com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (searchTrialsBuilder_ == null) { + searchTrials_ = java.util.Collections.emptyList(); + } else { + searchTrials_ = null; + searchTrialsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (trainTrialsBuilder_ == null) { + trainTrials_ = java.util.Collections.emptyList(); + } else { + trainTrials_ = null; + trainTrialsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.NasJobProto + .internal_static_google_cloud_aiplatform_v1beta1_NasJobOutput_MultiTrialJobOutput_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput build() { + com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput buildPartial() { + com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput result = + new com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput result) { + if (searchTrialsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + searchTrials_ = java.util.Collections.unmodifiableList(searchTrials_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.searchTrials_ = searchTrials_; + } else { + result.searchTrials_ = searchTrialsBuilder_.build(); + } + if (trainTrialsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + trainTrials_ = java.util.Collections.unmodifiableList(trainTrials_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.trainTrials_ = trainTrials_; + } else { + result.trainTrials_ = trainTrialsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput 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.NasJobOutput.MultiTrialJobOutput) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput other) { + if (other + == com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput + .getDefaultInstance()) return this; + if (searchTrialsBuilder_ == null) { + if (!other.searchTrials_.isEmpty()) { + if (searchTrials_.isEmpty()) { + searchTrials_ = other.searchTrials_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSearchTrialsIsMutable(); + searchTrials_.addAll(other.searchTrials_); + } + onChanged(); + } + } else { + if (!other.searchTrials_.isEmpty()) { + if (searchTrialsBuilder_.isEmpty()) { + searchTrialsBuilder_.dispose(); + searchTrialsBuilder_ = null; + searchTrials_ = other.searchTrials_; + bitField0_ = (bitField0_ & ~0x00000001); + searchTrialsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getSearchTrialsFieldBuilder() + : null; + } else { + searchTrialsBuilder_.addAllMessages(other.searchTrials_); + } + } + } + if (trainTrialsBuilder_ == null) { + if (!other.trainTrials_.isEmpty()) { + if (trainTrials_.isEmpty()) { + trainTrials_ = other.trainTrials_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureTrainTrialsIsMutable(); + trainTrials_.addAll(other.trainTrials_); + } + onChanged(); + } + } else { + if (!other.trainTrials_.isEmpty()) { + if (trainTrialsBuilder_.isEmpty()) { + trainTrialsBuilder_.dispose(); + trainTrialsBuilder_ = null; + trainTrials_ = other.trainTrials_; + bitField0_ = (bitField0_ & ~0x00000002); + trainTrialsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTrainTrialsFieldBuilder() + : null; + } else { + trainTrialsBuilder_.addAllMessages(other.trainTrials_); + } + } + } + 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.NasTrial m = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.NasTrial.parser(), extensionRegistry); + if (searchTrialsBuilder_ == null) { + ensureSearchTrialsIsMutable(); + searchTrials_.add(m); + } else { + searchTrialsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + com.google.cloud.aiplatform.v1beta1.NasTrial m = + input.readMessage( + com.google.cloud.aiplatform.v1beta1.NasTrial.parser(), extensionRegistry); + if (trainTrialsBuilder_ == null) { + ensureTrainTrialsIsMutable(); + trainTrials_.add(m); + } else { + trainTrialsBuilder_.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 searchTrials_ = + java.util.Collections.emptyList(); + + private void ensureSearchTrialsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + searchTrials_ = + new java.util.ArrayList(searchTrials_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NasTrial, + com.google.cloud.aiplatform.v1beta1.NasTrial.Builder, + com.google.cloud.aiplatform.v1beta1.NasTrialOrBuilder> + searchTrialsBuilder_; + + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of search stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NasTrial search_trials = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getSearchTrialsList() { + if (searchTrialsBuilder_ == null) { + return java.util.Collections.unmodifiableList(searchTrials_); + } else { + return searchTrialsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of search stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NasTrial search_trials = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getSearchTrialsCount() { + if (searchTrialsBuilder_ == null) { + return searchTrials_.size(); + } else { + return searchTrialsBuilder_.getCount(); + } + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of search stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NasTrial search_trials = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1beta1.NasTrial getSearchTrials(int index) { + if (searchTrialsBuilder_ == null) { + return searchTrials_.get(index); + } else { + return searchTrialsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of search stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NasTrial search_trials = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setSearchTrials( + int index, com.google.cloud.aiplatform.v1beta1.NasTrial value) { + if (searchTrialsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSearchTrialsIsMutable(); + searchTrials_.set(index, value); + onChanged(); + } else { + searchTrialsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of search stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NasTrial search_trials = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setSearchTrials( + int index, com.google.cloud.aiplatform.v1beta1.NasTrial.Builder builderForValue) { + if (searchTrialsBuilder_ == null) { + ensureSearchTrialsIsMutable(); + searchTrials_.set(index, builderForValue.build()); + onChanged(); + } else { + searchTrialsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of search stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NasTrial search_trials = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSearchTrials(com.google.cloud.aiplatform.v1beta1.NasTrial value) { + if (searchTrialsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSearchTrialsIsMutable(); + searchTrials_.add(value); + onChanged(); + } else { + searchTrialsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of search stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NasTrial search_trials = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSearchTrials( + int index, com.google.cloud.aiplatform.v1beta1.NasTrial value) { + if (searchTrialsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSearchTrialsIsMutable(); + searchTrials_.add(index, value); + onChanged(); + } else { + searchTrialsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of search stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NasTrial search_trials = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSearchTrials( + com.google.cloud.aiplatform.v1beta1.NasTrial.Builder builderForValue) { + if (searchTrialsBuilder_ == null) { + ensureSearchTrialsIsMutable(); + searchTrials_.add(builderForValue.build()); + onChanged(); + } else { + searchTrialsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of search stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NasTrial search_trials = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addSearchTrials( + int index, com.google.cloud.aiplatform.v1beta1.NasTrial.Builder builderForValue) { + if (searchTrialsBuilder_ == null) { + ensureSearchTrialsIsMutable(); + searchTrials_.add(index, builderForValue.build()); + onChanged(); + } else { + searchTrialsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of search stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NasTrial search_trials = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllSearchTrials( + java.lang.Iterable values) { + if (searchTrialsBuilder_ == null) { + ensureSearchTrialsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, searchTrials_); + onChanged(); + } else { + searchTrialsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of search stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NasTrial search_trials = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearSearchTrials() { + if (searchTrialsBuilder_ == null) { + searchTrials_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + searchTrialsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of search stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NasTrial search_trials = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeSearchTrials(int index) { + if (searchTrialsBuilder_ == null) { + ensureSearchTrialsIsMutable(); + searchTrials_.remove(index); + onChanged(); + } else { + searchTrialsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of search stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NasTrial search_trials = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1beta1.NasTrial.Builder getSearchTrialsBuilder( + int index) { + return getSearchTrialsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of search stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NasTrial search_trials = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1beta1.NasTrialOrBuilder getSearchTrialsOrBuilder( + int index) { + if (searchTrialsBuilder_ == null) { + return searchTrials_.get(index); + } else { + return searchTrialsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of search stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NasTrial search_trials = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getSearchTrialsOrBuilderList() { + if (searchTrialsBuilder_ != null) { + return searchTrialsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(searchTrials_); + } + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of search stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NasTrial search_trials = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1beta1.NasTrial.Builder addSearchTrialsBuilder() { + return getSearchTrialsFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1beta1.NasTrial.getDefaultInstance()); + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of search stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NasTrial search_trials = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1beta1.NasTrial.Builder addSearchTrialsBuilder( + int index) { + return getSearchTrialsFieldBuilder() + .addBuilder(index, com.google.cloud.aiplatform.v1beta1.NasTrial.getDefaultInstance()); + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of search stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NasTrial search_trials = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getSearchTrialsBuilderList() { + return getSearchTrialsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NasTrial, + com.google.cloud.aiplatform.v1beta1.NasTrial.Builder, + com.google.cloud.aiplatform.v1beta1.NasTrialOrBuilder> + getSearchTrialsFieldBuilder() { + if (searchTrialsBuilder_ == null) { + searchTrialsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NasTrial, + com.google.cloud.aiplatform.v1beta1.NasTrial.Builder, + com.google.cloud.aiplatform.v1beta1.NasTrialOrBuilder>( + searchTrials_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + searchTrials_ = null; + } + return searchTrialsBuilder_; + } + + private java.util.List trainTrials_ = + java.util.Collections.emptyList(); + + private void ensureTrainTrialsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + trainTrials_ = + new java.util.ArrayList(trainTrials_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NasTrial, + com.google.cloud.aiplatform.v1beta1.NasTrial.Builder, + com.google.cloud.aiplatform.v1beta1.NasTrialOrBuilder> + trainTrialsBuilder_; + + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of train stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NasTrial train_trials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getTrainTrialsList() { + if (trainTrialsBuilder_ == null) { + return java.util.Collections.unmodifiableList(trainTrials_); + } else { + return trainTrialsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of train stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NasTrial train_trials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getTrainTrialsCount() { + if (trainTrialsBuilder_ == null) { + return trainTrials_.size(); + } else { + return trainTrialsBuilder_.getCount(); + } + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of train stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NasTrial train_trials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1beta1.NasTrial getTrainTrials(int index) { + if (trainTrialsBuilder_ == null) { + return trainTrials_.get(index); + } else { + return trainTrialsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of train stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NasTrial train_trials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setTrainTrials(int index, com.google.cloud.aiplatform.v1beta1.NasTrial value) { + if (trainTrialsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTrainTrialsIsMutable(); + trainTrials_.set(index, value); + onChanged(); + } else { + trainTrialsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of train stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NasTrial train_trials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setTrainTrials( + int index, com.google.cloud.aiplatform.v1beta1.NasTrial.Builder builderForValue) { + if (trainTrialsBuilder_ == null) { + ensureTrainTrialsIsMutable(); + trainTrials_.set(index, builderForValue.build()); + onChanged(); + } else { + trainTrialsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of train stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NasTrial train_trials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addTrainTrials(com.google.cloud.aiplatform.v1beta1.NasTrial value) { + if (trainTrialsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTrainTrialsIsMutable(); + trainTrials_.add(value); + onChanged(); + } else { + trainTrialsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of train stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NasTrial train_trials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addTrainTrials(int index, com.google.cloud.aiplatform.v1beta1.NasTrial value) { + if (trainTrialsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTrainTrialsIsMutable(); + trainTrials_.add(index, value); + onChanged(); + } else { + trainTrialsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of train stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NasTrial train_trials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addTrainTrials( + com.google.cloud.aiplatform.v1beta1.NasTrial.Builder builderForValue) { + if (trainTrialsBuilder_ == null) { + ensureTrainTrialsIsMutable(); + trainTrials_.add(builderForValue.build()); + onChanged(); + } else { + trainTrialsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of train stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NasTrial train_trials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addTrainTrials( + int index, com.google.cloud.aiplatform.v1beta1.NasTrial.Builder builderForValue) { + if (trainTrialsBuilder_ == null) { + ensureTrainTrialsIsMutable(); + trainTrials_.add(index, builderForValue.build()); + onChanged(); + } else { + trainTrialsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of train stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NasTrial train_trials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllTrainTrials( + java.lang.Iterable values) { + if (trainTrialsBuilder_ == null) { + ensureTrainTrialsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, trainTrials_); + onChanged(); + } else { + trainTrialsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of train stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NasTrial train_trials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearTrainTrials() { + if (trainTrialsBuilder_ == null) { + trainTrials_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + trainTrialsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of train stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NasTrial train_trials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeTrainTrials(int index) { + if (trainTrialsBuilder_ == null) { + ensureTrainTrialsIsMutable(); + trainTrials_.remove(index); + onChanged(); + } else { + trainTrialsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of train stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NasTrial train_trials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1beta1.NasTrial.Builder getTrainTrialsBuilder(int index) { + return getTrainTrialsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of train stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NasTrial train_trials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1beta1.NasTrialOrBuilder getTrainTrialsOrBuilder( + int index) { + if (trainTrialsBuilder_ == null) { + return trainTrials_.get(index); + } else { + return trainTrialsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of train stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NasTrial train_trials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getTrainTrialsOrBuilderList() { + if (trainTrialsBuilder_ != null) { + return trainTrialsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(trainTrials_); + } + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of train stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NasTrial train_trials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1beta1.NasTrial.Builder addTrainTrialsBuilder() { + return getTrainTrialsFieldBuilder() + .addBuilder(com.google.cloud.aiplatform.v1beta1.NasTrial.getDefaultInstance()); + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of train stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NasTrial train_trials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1beta1.NasTrial.Builder addTrainTrialsBuilder(int index) { + return getTrainTrialsFieldBuilder() + .addBuilder(index, com.google.cloud.aiplatform.v1beta1.NasTrial.getDefaultInstance()); + } + /** + * + * + *
+       * Output only. List of NasTrials that were started as part of train stage.
+       * 
+ * + * + * repeated .google.cloud.aiplatform.v1beta1.NasTrial train_trials = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getTrainTrialsBuilderList() { + return getTrainTrialsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NasTrial, + com.google.cloud.aiplatform.v1beta1.NasTrial.Builder, + com.google.cloud.aiplatform.v1beta1.NasTrialOrBuilder> + getTrainTrialsFieldBuilder() { + if (trainTrialsBuilder_ == null) { + trainTrialsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NasTrial, + com.google.cloud.aiplatform.v1beta1.NasTrial.Builder, + com.google.cloud.aiplatform.v1beta1.NasTrialOrBuilder>( + trainTrials_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + trainTrials_ = null; + } + return trainTrialsBuilder_; + } + + @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.NasJobOutput.MultiTrialJobOutput) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput) + private static final com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput(); + } + + public static com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MultiTrialJobOutput 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.NasJobOutput.MultiTrialJobOutput + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int outputCase_ = 0; + private java.lang.Object output_; + + public enum OutputCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + MULTI_TRIAL_JOB_OUTPUT(1), + OUTPUT_NOT_SET(0); + private final int value; + + private OutputCase(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 OutputCase valueOf(int value) { + return forNumber(value); + } + + public static OutputCase forNumber(int value) { + switch (value) { + case 1: + return MULTI_TRIAL_JOB_OUTPUT; + case 0: + return OUTPUT_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public OutputCase getOutputCase() { + return OutputCase.forNumber(outputCase_); + } + + public static final int MULTI_TRIAL_JOB_OUTPUT_FIELD_NUMBER = 1; + /** + * + * + *
+   * Output only. The output of this multi-trial Neural Architecture Search
+   * (NAS) job.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput multi_trial_job_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the multiTrialJobOutput field is set. + */ + @java.lang.Override + public boolean hasMultiTrialJobOutput() { + return outputCase_ == 1; + } + /** + * + * + *
+   * Output only. The output of this multi-trial Neural Architecture Search
+   * (NAS) job.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput multi_trial_job_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The multiTrialJobOutput. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput + getMultiTrialJobOutput() { + if (outputCase_ == 1) { + return (com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput) output_; + } + return com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput + .getDefaultInstance(); + } + /** + * + * + *
+   * Output only. The output of this multi-trial Neural Architecture Search
+   * (NAS) job.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput multi_trial_job_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutputOrBuilder + getMultiTrialJobOutputOrBuilder() { + if (outputCase_ == 1) { + return (com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput) output_; + } + return com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput + .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 (outputCase_ == 1) { + output.writeMessage( + 1, (com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput) output_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (outputCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput) output_); + } + 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.NasJobOutput)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.NasJobOutput other = + (com.google.cloud.aiplatform.v1beta1.NasJobOutput) obj; + + if (!getOutputCase().equals(other.getOutputCase())) return false; + switch (outputCase_) { + case 1: + if (!getMultiTrialJobOutput().equals(other.getMultiTrialJobOutput())) 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 (outputCase_) { + case 1: + hash = (37 * hash) + MULTI_TRIAL_JOB_OUTPUT_FIELD_NUMBER; + hash = (53 * hash) + getMultiTrialJobOutput().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.NasJobOutput parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.NasJobOutput 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.NasJobOutput parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.NasJobOutput 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.NasJobOutput parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.NasJobOutput 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.NasJobOutput parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.NasJobOutput 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.NasJobOutput parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.NasJobOutput 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.NasJobOutput 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.NasJobOutput 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.NasJobOutput 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 uCAIP NasJob output.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.NasJobOutput} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.NasJobOutput) + com.google.cloud.aiplatform.v1beta1.NasJobOutputOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NasJobProto + .internal_static_google_cloud_aiplatform_v1beta1_NasJobOutput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NasJobProto + .internal_static_google_cloud_aiplatform_v1beta1_NasJobOutput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.NasJobOutput.class, + com.google.cloud.aiplatform.v1beta1.NasJobOutput.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.NasJobOutput.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (multiTrialJobOutputBuilder_ != null) { + multiTrialJobOutputBuilder_.clear(); + } + outputCase_ = 0; + output_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.NasJobProto + .internal_static_google_cloud_aiplatform_v1beta1_NasJobOutput_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasJobOutput getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.NasJobOutput.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasJobOutput build() { + com.google.cloud.aiplatform.v1beta1.NasJobOutput result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasJobOutput buildPartial() { + com.google.cloud.aiplatform.v1beta1.NasJobOutput result = + new com.google.cloud.aiplatform.v1beta1.NasJobOutput(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.NasJobOutput result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.aiplatform.v1beta1.NasJobOutput result) { + result.outputCase_ = outputCase_; + result.output_ = this.output_; + if (outputCase_ == 1 && multiTrialJobOutputBuilder_ != null) { + result.output_ = multiTrialJobOutputBuilder_.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.NasJobOutput) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.NasJobOutput) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.NasJobOutput other) { + if (other == com.google.cloud.aiplatform.v1beta1.NasJobOutput.getDefaultInstance()) + return this; + switch (other.getOutputCase()) { + case MULTI_TRIAL_JOB_OUTPUT: + { + mergeMultiTrialJobOutput(other.getMultiTrialJobOutput()); + break; + } + case OUTPUT_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( + getMultiTrialJobOutputFieldBuilder().getBuilder(), extensionRegistry); + outputCase_ = 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 outputCase_ = 0; + private java.lang.Object output_; + + public OutputCase getOutputCase() { + return OutputCase.forNumber(outputCase_); + } + + public Builder clearOutput() { + outputCase_ = 0; + output_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput, + com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput.Builder, + com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutputOrBuilder> + multiTrialJobOutputBuilder_; + /** + * + * + *
+     * Output only. The output of this multi-trial Neural Architecture Search
+     * (NAS) job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput multi_trial_job_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the multiTrialJobOutput field is set. + */ + @java.lang.Override + public boolean hasMultiTrialJobOutput() { + return outputCase_ == 1; + } + /** + * + * + *
+     * Output only. The output of this multi-trial Neural Architecture Search
+     * (NAS) job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput multi_trial_job_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The multiTrialJobOutput. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput + getMultiTrialJobOutput() { + if (multiTrialJobOutputBuilder_ == null) { + if (outputCase_ == 1) { + return (com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput) output_; + } + return com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput + .getDefaultInstance(); + } else { + if (outputCase_ == 1) { + return multiTrialJobOutputBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Output only. The output of this multi-trial Neural Architecture Search
+     * (NAS) job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput multi_trial_job_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setMultiTrialJobOutput( + com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput value) { + if (multiTrialJobOutputBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + output_ = value; + onChanged(); + } else { + multiTrialJobOutputBuilder_.setMessage(value); + } + outputCase_ = 1; + return this; + } + /** + * + * + *
+     * Output only. The output of this multi-trial Neural Architecture Search
+     * (NAS) job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput multi_trial_job_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setMultiTrialJobOutput( + com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput.Builder + builderForValue) { + if (multiTrialJobOutputBuilder_ == null) { + output_ = builderForValue.build(); + onChanged(); + } else { + multiTrialJobOutputBuilder_.setMessage(builderForValue.build()); + } + outputCase_ = 1; + return this; + } + /** + * + * + *
+     * Output only. The output of this multi-trial Neural Architecture Search
+     * (NAS) job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput multi_trial_job_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeMultiTrialJobOutput( + com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput value) { + if (multiTrialJobOutputBuilder_ == null) { + if (outputCase_ == 1 + && output_ + != com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput + .getDefaultInstance()) { + output_ = + com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput.newBuilder( + (com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput) + output_) + .mergeFrom(value) + .buildPartial(); + } else { + output_ = value; + } + onChanged(); + } else { + if (outputCase_ == 1) { + multiTrialJobOutputBuilder_.mergeFrom(value); + } else { + multiTrialJobOutputBuilder_.setMessage(value); + } + } + outputCase_ = 1; + return this; + } + /** + * + * + *
+     * Output only. The output of this multi-trial Neural Architecture Search
+     * (NAS) job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput multi_trial_job_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearMultiTrialJobOutput() { + if (multiTrialJobOutputBuilder_ == null) { + if (outputCase_ == 1) { + outputCase_ = 0; + output_ = null; + onChanged(); + } + } else { + if (outputCase_ == 1) { + outputCase_ = 0; + output_ = null; + } + multiTrialJobOutputBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. The output of this multi-trial Neural Architecture Search
+     * (NAS) job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput multi_trial_job_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput.Builder + getMultiTrialJobOutputBuilder() { + return getMultiTrialJobOutputFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The output of this multi-trial Neural Architecture Search
+     * (NAS) job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput multi_trial_job_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutputOrBuilder + getMultiTrialJobOutputOrBuilder() { + if ((outputCase_ == 1) && (multiTrialJobOutputBuilder_ != null)) { + return multiTrialJobOutputBuilder_.getMessageOrBuilder(); + } else { + if (outputCase_ == 1) { + return (com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput) output_; + } + return com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Output only. The output of this multi-trial Neural Architecture Search
+     * (NAS) job.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput multi_trial_job_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput, + com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput.Builder, + com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutputOrBuilder> + getMultiTrialJobOutputFieldBuilder() { + if (multiTrialJobOutputBuilder_ == null) { + if (!(outputCase_ == 1)) { + output_ = + com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput + .getDefaultInstance(); + } + multiTrialJobOutputBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput, + com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput.Builder, + com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutputOrBuilder>( + (com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput) output_, + getParentForChildren(), + isClean()); + output_ = null; + } + outputCase_ = 1; + onChanged(); + return multiTrialJobOutputBuilder_; + } + + @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.NasJobOutput) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.NasJobOutput) + private static final com.google.cloud.aiplatform.v1beta1.NasJobOutput DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.NasJobOutput(); + } + + public static com.google.cloud.aiplatform.v1beta1.NasJobOutput getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NasJobOutput 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.NasJobOutput getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NasJobOutputOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NasJobOutputOrBuilder.java new file mode 100644 index 000000000000..04b7037030f2 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NasJobOutputOrBuilder.java @@ -0,0 +1,72 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/nas_job.proto + +package com.google.cloud.aiplatform.v1beta1; + +public interface NasJobOutputOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.NasJobOutput) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The output of this multi-trial Neural Architecture Search
+   * (NAS) job.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput multi_trial_job_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the multiTrialJobOutput field is set. + */ + boolean hasMultiTrialJobOutput(); + /** + * + * + *
+   * Output only. The output of this multi-trial Neural Architecture Search
+   * (NAS) job.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput multi_trial_job_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The multiTrialJobOutput. + */ + com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput getMultiTrialJobOutput(); + /** + * + * + *
+   * Output only. The output of this multi-trial Neural Architecture Search
+   * (NAS) job.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutput multi_trial_job_output = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1beta1.NasJobOutput.MultiTrialJobOutputOrBuilder + getMultiTrialJobOutputOrBuilder(); + + public com.google.cloud.aiplatform.v1beta1.NasJobOutput.OutputCase getOutputCase(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NasJobProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NasJobProto.java new file mode 100644 index 000000000000..cb3afa62a548 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NasJobProto.java @@ -0,0 +1,321 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/nas_job.proto + +package com.google.cloud.aiplatform.v1beta1; + +public final class NasJobProto { + private NasJobProto() {} + + 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_NasJob_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_NasJob_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_NasJob_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_NasJob_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_NasTrialDetail_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_NasTrialDetail_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_NasJobSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_NasJobSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_NasJobSpec_MultiTrialAlgorithmSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_NasJobSpec_MultiTrialAlgorithmSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_NasJobSpec_MultiTrialAlgorithmSpec_MetricSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_NasJobSpec_MultiTrialAlgorithmSpec_MetricSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_NasJobSpec_MultiTrialAlgorithmSpec_SearchTrialSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_NasJobSpec_MultiTrialAlgorithmSpec_SearchTrialSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_NasJobSpec_MultiTrialAlgorithmSpec_TrainTrialSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_NasJobSpec_MultiTrialAlgorithmSpec_TrainTrialSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_NasJobOutput_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_NasJobOutput_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_NasJobOutput_MultiTrialJobOutput_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_NasJobOutput_MultiTrialJobOutput_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_NasTrial_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_NasTrial_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/nas_jo" + + "b.proto\022\037google.cloud.aiplatform.v1beta1" + + "\032\037google/api/field_behavior.proto\032\031googl" + + "e/api/resource.proto\0320google/cloud/aipla" + + "tform/v1beta1/custom_job.proto\0325google/c" + + "loud/aiplatform/v1beta1/encryption_spec." + + "proto\032/google/cloud/aiplatform/v1beta1/j" + + "ob_state.proto\032+google/cloud/aiplatform/" + + "v1beta1/study.proto\032\037google/protobuf/tim" + + "estamp.proto\032\027google/rpc/status.proto\"\324\006" + + "\n\006NasJob\022\021\n\004name\030\001 \001(\tB\003\340A\003\022\031\n\014display_n" + + "ame\030\002 \001(\tB\003\340A\002\022F\n\014nas_job_spec\030\004 \001(\0132+.g" + + "oogle.cloud.aiplatform.v1beta1.NasJobSpe" + + "cB\003\340A\002\022J\n\016nas_job_output\030\005 \001(\0132-.google." + + "cloud.aiplatform.v1beta1.NasJobOutputB\003\340" + + "A\003\022=\n\005state\030\006 \001(\0162).google.cloud.aiplatf" + + "orm.v1beta1.JobStateB\003\340A\003\0224\n\013create_time" + + "\030\007 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022" + + "3\n\nstart_time\030\010 \001(\0132\032.google.protobuf.Ti" + + "mestampB\003\340A\003\0221\n\010end_time\030\t \001(\0132\032.google." + + "protobuf.TimestampB\003\340A\003\0224\n\013update_time\030\n" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022&\n" + + "\005error\030\013 \001(\0132\022.google.rpc.StatusB\003\340A\003\022C\n" + + "\006labels\030\014 \003(\01323.google.cloud.aiplatform." + + "v1beta1.NasJob.LabelsEntry\022H\n\017encryption" + + "_spec\030\r \001(\0132/.google.cloud.aiplatform.v1" + + "beta1.EncryptionSpec\022-\n enable_restricte" + + "d_image_training\030\016 \001(\010B\003\340A\001\032-\n\013LabelsEnt" + + "ry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:`\352A]\n" + + " aiplatform.googleapis.com/NasJob\0229proje" + + "cts/{project}/locations/{location}/nasJo" + + "bs/{nas_job}\"\307\002\n\016NasTrialDetail\022\021\n\004name\030" + + "\001 \001(\tB\003\340A\003\022\022\n\nparameters\030\002 \001(\t\022?\n\014search" + + "_trial\030\003 \001(\0132).google.cloud.aiplatform.v" + + "1beta1.NasTrial\022>\n\013train_trial\030\004 \001(\0132).g" + + "oogle.cloud.aiplatform.v1beta1.NasTrial:" + + "\214\001\352A\210\001\n(aiplatform.googleapis.com/NasTri" + + "alDetail\022\\projects/{project}/locations/{" + + "location}/nasJobs/{nas_job}/nasTrialDeta" + + "ils/{nas_trial_detail}\"\315\n\n\nNasJobSpec\022i\n" + + "\032multi_trial_algorithm_spec\030\002 \001(\0132C.goog" + + "le.cloud.aiplatform.v1beta1.NasJobSpec.M" + + "ultiTrialAlgorithmSpecH\000\022\031\n\021resume_nas_j" + + "ob_id\030\003 \001(\t\022\031\n\021search_space_spec\030\001 \001(\t\032\207" + + "\t\n\027MultiTrialAlgorithmSpec\022v\n\025multi_tria" + + "l_algorithm\030\001 \001(\0162W.google.cloud.aiplatf" + + "orm.v1beta1.NasJobSpec.MultiTrialAlgorit" + + "hmSpec.MultiTrialAlgorithm\022^\n\006metric\030\002 \001" + + "(\0132N.google.cloud.aiplatform.v1beta1.Nas" + + "JobSpec.MultiTrialAlgorithmSpec.MetricSp" + + "ec\022s\n\021search_trial_spec\030\003 \001(\0132S.google.c" + + "loud.aiplatform.v1beta1.NasJobSpec.Multi" + + "TrialAlgorithmSpec.SearchTrialSpecB\003\340A\002\022" + + "l\n\020train_trial_spec\030\004 \001(\0132R.google.cloud" + + ".aiplatform.v1beta1.NasJobSpec.MultiTria" + + "lAlgorithmSpec.TrainTrialSpec\032\323\001\n\nMetric" + + "Spec\022\026\n\tmetric_id\030\001 \001(\tB\003\340A\002\022j\n\004goal\030\002 \001" + + "(\0162W.google.cloud.aiplatform.v1beta1.Nas" + + "JobSpec.MultiTrialAlgorithmSpec.MetricSp" + + "ec.GoalTypeB\003\340A\002\"A\n\010GoalType\022\031\n\025GOAL_TYP" + + "E_UNSPECIFIED\020\000\022\014\n\010MAXIMIZE\020\001\022\014\n\010MINIMIZ" + + "E\020\002\032\312\001\n\017SearchTrialSpec\022R\n\025search_trial_" + + "job_spec\030\001 \001(\0132..google.cloud.aiplatform" + + ".v1beta1.CustomJobSpecB\003\340A\002\022\034\n\017max_trial" + + "_count\030\002 \001(\005B\003\340A\002\022%\n\030max_parallel_trial_" + + "count\030\003 \001(\005B\003\340A\002\022\036\n\026max_failed_trial_cou" + + "nt\030\004 \001(\005\032\242\001\n\016TrainTrialSpec\022Q\n\024train_tri" + + "al_job_spec\030\001 \001(\0132..google.cloud.aiplatf" + + "orm.v1beta1.CustomJobSpecB\003\340A\002\022%\n\030max_pa" + + "rallel_trial_count\030\002 \001(\005B\003\340A\002\022\026\n\tfrequen" + + "cy\030\003 \001(\005B\003\340A\002\"i\n\023MultiTrialAlgorithm\022%\n!" + + "MULTI_TRIAL_ALGORITHM_UNSPECIFIED\020\000\022\032\n\026R" + + "EINFORCEMENT_LEARNING\020\001\022\017\n\013GRID_SEARCH\020\002" + + "B\024\n\022nas_algorithm_spec\"\247\002\n\014NasJobOutput\022" + + "h\n\026multi_trial_job_output\030\001 \001(\0132A.google" + + ".cloud.aiplatform.v1beta1.NasJobOutput.M" + + "ultiTrialJobOutputB\003\340A\003H\000\032\242\001\n\023MultiTrial" + + "JobOutput\022E\n\rsearch_trials\030\001 \003(\0132).googl" + + "e.cloud.aiplatform.v1beta1.NasTrialB\003\340A\003" + + "\022D\n\014train_trials\030\002 \003(\0132).google.cloud.ai" + + "platform.v1beta1.NasTrialB\003\340A\003B\010\n\006output" + + "\"\376\002\n\010NasTrial\022\017\n\002id\030\001 \001(\tB\003\340A\003\022C\n\005state\030" + + "\002 \001(\0162/.google.cloud.aiplatform.v1beta1." + + "NasTrial.StateB\003\340A\003\022L\n\021final_measurement" + + "\030\003 \001(\0132,.google.cloud.aiplatform.v1beta1" + + ".MeasurementB\003\340A\003\0223\n\nstart_time\030\004 \001(\0132\032." + + "google.protobuf.TimestampB\003\340A\003\0221\n\010end_ti" + + "me\030\005 \001(\0132\032.google.protobuf.TimestampB\003\340A" + + "\003\"f\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\r\n\tREQ" + + "UESTED\020\001\022\n\n\006ACTIVE\020\002\022\014\n\010STOPPING\020\003\022\r\n\tSU" + + "CCEEDED\020\004\022\016\n\nINFEASIBLE\020\005B\342\001\n#com.google" + + ".cloud.aiplatform.v1beta1B\013NasJobProtoP\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::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.CustomJobProto.getDescriptor(), + com.google.cloud.aiplatform.v1beta1.EncryptionSpecProto.getDescriptor(), + com.google.cloud.aiplatform.v1beta1.JobStateProto.getDescriptor(), + com.google.cloud.aiplatform.v1beta1.StudyProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.rpc.StatusProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1beta1_NasJob_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1beta1_NasJob_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_NasJob_descriptor, + new java.lang.String[] { + "Name", + "DisplayName", + "NasJobSpec", + "NasJobOutput", + "State", + "CreateTime", + "StartTime", + "EndTime", + "UpdateTime", + "Error", + "Labels", + "EncryptionSpec", + "EnableRestrictedImageTraining", + }); + internal_static_google_cloud_aiplatform_v1beta1_NasJob_LabelsEntry_descriptor = + internal_static_google_cloud_aiplatform_v1beta1_NasJob_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_aiplatform_v1beta1_NasJob_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_NasJob_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_aiplatform_v1beta1_NasTrialDetail_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_aiplatform_v1beta1_NasTrialDetail_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_NasTrialDetail_descriptor, + new java.lang.String[] { + "Name", "Parameters", "SearchTrial", "TrainTrial", + }); + internal_static_google_cloud_aiplatform_v1beta1_NasJobSpec_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_aiplatform_v1beta1_NasJobSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_NasJobSpec_descriptor, + new java.lang.String[] { + "MultiTrialAlgorithmSpec", "ResumeNasJobId", "SearchSpaceSpec", "NasAlgorithmSpec", + }); + internal_static_google_cloud_aiplatform_v1beta1_NasJobSpec_MultiTrialAlgorithmSpec_descriptor = + internal_static_google_cloud_aiplatform_v1beta1_NasJobSpec_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_aiplatform_v1beta1_NasJobSpec_MultiTrialAlgorithmSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_NasJobSpec_MultiTrialAlgorithmSpec_descriptor, + new java.lang.String[] { + "MultiTrialAlgorithm", "Metric", "SearchTrialSpec", "TrainTrialSpec", + }); + internal_static_google_cloud_aiplatform_v1beta1_NasJobSpec_MultiTrialAlgorithmSpec_MetricSpec_descriptor = + internal_static_google_cloud_aiplatform_v1beta1_NasJobSpec_MultiTrialAlgorithmSpec_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_aiplatform_v1beta1_NasJobSpec_MultiTrialAlgorithmSpec_MetricSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_NasJobSpec_MultiTrialAlgorithmSpec_MetricSpec_descriptor, + new java.lang.String[] { + "MetricId", "Goal", + }); + internal_static_google_cloud_aiplatform_v1beta1_NasJobSpec_MultiTrialAlgorithmSpec_SearchTrialSpec_descriptor = + internal_static_google_cloud_aiplatform_v1beta1_NasJobSpec_MultiTrialAlgorithmSpec_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_aiplatform_v1beta1_NasJobSpec_MultiTrialAlgorithmSpec_SearchTrialSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_NasJobSpec_MultiTrialAlgorithmSpec_SearchTrialSpec_descriptor, + new java.lang.String[] { + "SearchTrialJobSpec", "MaxTrialCount", "MaxParallelTrialCount", "MaxFailedTrialCount", + }); + internal_static_google_cloud_aiplatform_v1beta1_NasJobSpec_MultiTrialAlgorithmSpec_TrainTrialSpec_descriptor = + internal_static_google_cloud_aiplatform_v1beta1_NasJobSpec_MultiTrialAlgorithmSpec_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_aiplatform_v1beta1_NasJobSpec_MultiTrialAlgorithmSpec_TrainTrialSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_NasJobSpec_MultiTrialAlgorithmSpec_TrainTrialSpec_descriptor, + new java.lang.String[] { + "TrainTrialJobSpec", "MaxParallelTrialCount", "Frequency", + }); + internal_static_google_cloud_aiplatform_v1beta1_NasJobOutput_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_aiplatform_v1beta1_NasJobOutput_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_NasJobOutput_descriptor, + new java.lang.String[] { + "MultiTrialJobOutput", "Output", + }); + internal_static_google_cloud_aiplatform_v1beta1_NasJobOutput_MultiTrialJobOutput_descriptor = + internal_static_google_cloud_aiplatform_v1beta1_NasJobOutput_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_aiplatform_v1beta1_NasJobOutput_MultiTrialJobOutput_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_NasJobOutput_MultiTrialJobOutput_descriptor, + new java.lang.String[] { + "SearchTrials", "TrainTrials", + }); + internal_static_google_cloud_aiplatform_v1beta1_NasTrial_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_aiplatform_v1beta1_NasTrial_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_NasTrial_descriptor, + new java.lang.String[] { + "Id", "State", "FinalMeasurement", "StartTime", "EndTime", + }); + 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.CustomJobProto.getDescriptor(); + com.google.cloud.aiplatform.v1beta1.EncryptionSpecProto.getDescriptor(); + com.google.cloud.aiplatform.v1beta1.JobStateProto.getDescriptor(); + com.google.cloud.aiplatform.v1beta1.StudyProto.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-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NasJobSpec.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NasJobSpec.java new file mode 100644 index 000000000000..578c6dcf0b23 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NasJobSpec.java @@ -0,0 +1,6592 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/nas_job.proto + +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Represents the spec of a NasJob.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.NasJobSpec} + */ +public final class NasJobSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.NasJobSpec) + NasJobSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use NasJobSpec.newBuilder() to construct. + private NasJobSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NasJobSpec() { + resumeNasJobId_ = ""; + searchSpaceSpec_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NasJobSpec(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NasJobProto + .internal_static_google_cloud_aiplatform_v1beta1_NasJobSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NasJobProto + .internal_static_google_cloud_aiplatform_v1beta1_NasJobSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.NasJobSpec.class, + com.google.cloud.aiplatform.v1beta1.NasJobSpec.Builder.class); + } + + public interface MultiTrialAlgorithmSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The multi-trial Neural Architecture Search (NAS) algorithm
+     * type. Defaults to `REINFORCEMENT_LEARNING`.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MultiTrialAlgorithm multi_trial_algorithm = 1; + * + * + * @return The enum numeric value on the wire for multiTrialAlgorithm. + */ + int getMultiTrialAlgorithmValue(); + /** + * + * + *
+     * The multi-trial Neural Architecture Search (NAS) algorithm
+     * type. Defaults to `REINFORCEMENT_LEARNING`.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MultiTrialAlgorithm multi_trial_algorithm = 1; + * + * + * @return The multiTrialAlgorithm. + */ + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MultiTrialAlgorithm + getMultiTrialAlgorithm(); + + /** + * + * + *
+     * Metric specs for the NAS job.
+     * Validation for this field is done at `multi_trial_algorithm_spec` field.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec metric = 2; + * + * + * @return Whether the metric field is set. + */ + boolean hasMetric(); + /** + * + * + *
+     * Metric specs for the NAS job.
+     * Validation for this field is done at `multi_trial_algorithm_spec` field.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec metric = 2; + * + * + * @return The metric. + */ + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec getMetric(); + /** + * + * + *
+     * Metric specs for the NAS job.
+     * Validation for this field is done at `multi_trial_algorithm_spec` field.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec metric = 2; + * + */ + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpecOrBuilder + getMetricOrBuilder(); + + /** + * + * + *
+     * Required. Spec for search trials.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec search_trial_spec = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the searchTrialSpec field is set. + */ + boolean hasSearchTrialSpec(); + /** + * + * + *
+     * Required. Spec for search trials.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec search_trial_spec = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The searchTrialSpec. + */ + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec + getSearchTrialSpec(); + /** + * + * + *
+     * Required. Spec for search trials.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec search_trial_spec = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpecOrBuilder + getSearchTrialSpecOrBuilder(); + + /** + * + * + *
+     * Spec for train trials. Top N [TrainTrialSpec.max_parallel_trial_count]
+     * search trials will be trained for every M
+     * [TrainTrialSpec.frequency] trials searched.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec train_trial_spec = 4; + * + * + * @return Whether the trainTrialSpec field is set. + */ + boolean hasTrainTrialSpec(); + /** + * + * + *
+     * Spec for train trials. Top N [TrainTrialSpec.max_parallel_trial_count]
+     * search trials will be trained for every M
+     * [TrainTrialSpec.frequency] trials searched.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec train_trial_spec = 4; + * + * + * @return The trainTrialSpec. + */ + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + getTrainTrialSpec(); + /** + * + * + *
+     * Spec for train trials. Top N [TrainTrialSpec.max_parallel_trial_count]
+     * search trials will be trained for every M
+     * [TrainTrialSpec.frequency] trials searched.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec train_trial_spec = 4; + * + */ + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpecOrBuilder + getTrainTrialSpecOrBuilder(); + } + /** + * + * + *
+   * The spec of multi-trial Neural Architecture Search (NAS).
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec} + */ + public static final class MultiTrialAlgorithmSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec) + MultiTrialAlgorithmSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use MultiTrialAlgorithmSpec.newBuilder() to construct. + private MultiTrialAlgorithmSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MultiTrialAlgorithmSpec() { + multiTrialAlgorithm_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MultiTrialAlgorithmSpec(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NasJobProto + .internal_static_google_cloud_aiplatform_v1beta1_NasJobSpec_MultiTrialAlgorithmSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NasJobProto + .internal_static_google_cloud_aiplatform_v1beta1_NasJobSpec_MultiTrialAlgorithmSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.class, + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.Builder.class); + } + + /** + * + * + *
+     * The available types of multi-trial algorithms.
+     * 
+ * + * Protobuf enum {@code + * google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MultiTrialAlgorithm} + */ + public enum MultiTrialAlgorithm implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Defaults to `REINFORCEMENT_LEARNING`.
+       * 
+ * + * MULTI_TRIAL_ALGORITHM_UNSPECIFIED = 0; + */ + MULTI_TRIAL_ALGORITHM_UNSPECIFIED(0), + /** + * + * + *
+       * The Reinforcement Learning Algorithm for Multi-trial Neural
+       * Architecture Search (NAS).
+       * 
+ * + * REINFORCEMENT_LEARNING = 1; + */ + REINFORCEMENT_LEARNING(1), + /** + * + * + *
+       * The Grid Search Algorithm for Multi-trial Neural
+       * Architecture Search (NAS).
+       * 
+ * + * GRID_SEARCH = 2; + */ + GRID_SEARCH(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Defaults to `REINFORCEMENT_LEARNING`.
+       * 
+ * + * MULTI_TRIAL_ALGORITHM_UNSPECIFIED = 0; + */ + public static final int MULTI_TRIAL_ALGORITHM_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * The Reinforcement Learning Algorithm for Multi-trial Neural
+       * Architecture Search (NAS).
+       * 
+ * + * REINFORCEMENT_LEARNING = 1; + */ + public static final int REINFORCEMENT_LEARNING_VALUE = 1; + /** + * + * + *
+       * The Grid Search Algorithm for Multi-trial Neural
+       * Architecture Search (NAS).
+       * 
+ * + * GRID_SEARCH = 2; + */ + public static final int GRID_SEARCH_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 MultiTrialAlgorithm 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 MultiTrialAlgorithm forNumber(int value) { + switch (value) { + case 0: + return MULTI_TRIAL_ALGORITHM_UNSPECIFIED; + case 1: + return REINFORCEMENT_LEARNING; + case 2: + return GRID_SEARCH; + 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 MultiTrialAlgorithm findValueByNumber(int number) { + return MultiTrialAlgorithm.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.NasJobSpec.MultiTrialAlgorithmSpec + .getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final MultiTrialAlgorithm[] VALUES = values(); + + public static MultiTrialAlgorithm 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 MultiTrialAlgorithm(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MultiTrialAlgorithm) + } + + public interface MetricSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Required. The ID of the metric. Must not contain whitespaces.
+       * 
+ * + * string metric_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The metricId. + */ + java.lang.String getMetricId(); + /** + * + * + *
+       * Required. The ID of the metric. Must not contain whitespaces.
+       * 
+ * + * string metric_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for metricId. + */ + com.google.protobuf.ByteString getMetricIdBytes(); + + /** + * + * + *
+       * Required. The optimization goal of the metric.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec.GoalType goal = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for goal. + */ + int getGoalValue(); + /** + * + * + *
+       * Required. The optimization goal of the metric.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec.GoalType goal = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The goal. + */ + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec.GoalType + getGoal(); + } + /** + * + * + *
+     * Represents a metric to optimize.
+     * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec} + */ + public static final class MetricSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec) + MetricSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use MetricSpec.newBuilder() to construct. + private MetricSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MetricSpec() { + metricId_ = ""; + goal_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MetricSpec(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NasJobProto + .internal_static_google_cloud_aiplatform_v1beta1_NasJobSpec_MultiTrialAlgorithmSpec_MetricSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NasJobProto + .internal_static_google_cloud_aiplatform_v1beta1_NasJobSpec_MultiTrialAlgorithmSpec_MetricSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + .class, + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + .Builder.class); + } + + /** + * + * + *
+       * The available types of optimization goals.
+       * 
+ * + * Protobuf enum {@code + * google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec.GoalType} + */ + public enum GoalType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+         * Goal Type will default to maximize.
+         * 
+ * + * GOAL_TYPE_UNSPECIFIED = 0; + */ + GOAL_TYPE_UNSPECIFIED(0), + /** + * + * + *
+         * Maximize the goal metric.
+         * 
+ * + * MAXIMIZE = 1; + */ + MAXIMIZE(1), + /** + * + * + *
+         * Minimize the goal metric.
+         * 
+ * + * MINIMIZE = 2; + */ + MINIMIZE(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+         * Goal Type will default to maximize.
+         * 
+ * + * GOAL_TYPE_UNSPECIFIED = 0; + */ + public static final int GOAL_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+         * Maximize the goal metric.
+         * 
+ * + * MAXIMIZE = 1; + */ + public static final int MAXIMIZE_VALUE = 1; + /** + * + * + *
+         * Minimize the goal metric.
+         * 
+ * + * MINIMIZE = 2; + */ + public static final int MINIMIZE_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 GoalType 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 GoalType forNumber(int value) { + switch (value) { + case 0: + return GOAL_TYPE_UNSPECIFIED; + case 1: + return MAXIMIZE; + case 2: + return MINIMIZE; + 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 GoalType findValueByNumber(int number) { + return GoalType.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.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + .getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final GoalType[] VALUES = values(); + + public static GoalType 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 GoalType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec.GoalType) + } + + public static final int METRIC_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object metricId_ = ""; + /** + * + * + *
+       * Required. The ID of the metric. Must not contain whitespaces.
+       * 
+ * + * string metric_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The metricId. + */ + @java.lang.Override + public java.lang.String getMetricId() { + java.lang.Object ref = metricId_; + 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(); + metricId_ = s; + return s; + } + } + /** + * + * + *
+       * Required. The ID of the metric. Must not contain whitespaces.
+       * 
+ * + * string metric_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for metricId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMetricIdBytes() { + java.lang.Object ref = metricId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + metricId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GOAL_FIELD_NUMBER = 2; + private int goal_ = 0; + /** + * + * + *
+       * Required. The optimization goal of the metric.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec.GoalType goal = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for goal. + */ + @java.lang.Override + public int getGoalValue() { + return goal_; + } + /** + * + * + *
+       * Required. The optimization goal of the metric.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec.GoalType goal = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The goal. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + .GoalType + getGoal() { + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec.GoalType + result = + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + .GoalType.forNumber(goal_); + return result == null + ? com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + .GoalType.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(metricId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, metricId_); + } + if (goal_ + != com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + .GoalType.GOAL_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, goal_); + } + 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(metricId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, metricId_); + } + if (goal_ + != com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + .GoalType.GOAL_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, goal_); + } + 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.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec other = + (com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec) obj; + + if (!getMetricId().equals(other.getMetricId())) return false; + if (goal_ != other.goal_) 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) + METRIC_ID_FIELD_NUMBER; + hash = (53 * hash) + getMetricId().hashCode(); + hash = (37 * hash) + GOAL_FIELD_NUMBER; + hash = (53 * hash) + goal_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .MetricSpec + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .MetricSpec + 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.NasJobSpec.MultiTrialAlgorithmSpec + .MetricSpec + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .MetricSpec + 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.NasJobSpec.MultiTrialAlgorithmSpec + .MetricSpec + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .MetricSpec + 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.NasJobSpec.MultiTrialAlgorithmSpec + .MetricSpec + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .MetricSpec + 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.NasJobSpec.MultiTrialAlgorithmSpec + .MetricSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .MetricSpec + 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.NasJobSpec.MultiTrialAlgorithmSpec + .MetricSpec + 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.NasJobSpec.MultiTrialAlgorithmSpec + .MetricSpec + 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.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + 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 metric to optimize.
+       * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec) + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .MetricSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NasJobProto + .internal_static_google_cloud_aiplatform_v1beta1_NasJobSpec_MultiTrialAlgorithmSpec_MetricSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NasJobProto + .internal_static_google_cloud_aiplatform_v1beta1_NasJobSpec_MultiTrialAlgorithmSpec_MetricSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + .class, + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + .Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + metricId_ = ""; + goal_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.NasJobProto + .internal_static_google_cloud_aiplatform_v1beta1_NasJobSpec_MultiTrialAlgorithmSpec_MetricSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + build() { + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + buildPartial() { + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec result = + new com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.metricId_ = metricId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.goal_ = goal_; + } + } + + @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.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + .getDefaultInstance()) return this; + if (!other.getMetricId().isEmpty()) { + metricId_ = other.metricId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.goal_ != 0) { + setGoalValue(other.getGoalValue()); + } + 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: + { + metricId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + goal_ = input.readEnum(); + 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 metricId_ = ""; + /** + * + * + *
+         * Required. The ID of the metric. Must not contain whitespaces.
+         * 
+ * + * string metric_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The metricId. + */ + public java.lang.String getMetricId() { + java.lang.Object ref = metricId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + metricId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Required. The ID of the metric. Must not contain whitespaces.
+         * 
+ * + * string metric_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for metricId. + */ + public com.google.protobuf.ByteString getMetricIdBytes() { + java.lang.Object ref = metricId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + metricId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Required. The ID of the metric. Must not contain whitespaces.
+         * 
+ * + * string metric_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The metricId to set. + * @return This builder for chaining. + */ + public Builder setMetricId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + metricId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The ID of the metric. Must not contain whitespaces.
+         * 
+ * + * string metric_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearMetricId() { + metricId_ = getDefaultInstance().getMetricId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The ID of the metric. Must not contain whitespaces.
+         * 
+ * + * string metric_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for metricId to set. + * @return This builder for chaining. + */ + public Builder setMetricIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + metricId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int goal_ = 0; + /** + * + * + *
+         * Required. The optimization goal of the metric.
+         * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec.GoalType goal = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for goal. + */ + @java.lang.Override + public int getGoalValue() { + return goal_; + } + /** + * + * + *
+         * Required. The optimization goal of the metric.
+         * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec.GoalType goal = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for goal to set. + * @return This builder for chaining. + */ + public Builder setGoalValue(int value) { + goal_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The optimization goal of the metric.
+         * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec.GoalType goal = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The goal. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + .GoalType + getGoal() { + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec.GoalType + result = + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + .GoalType.forNumber(goal_); + return result == null + ? com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + .GoalType.UNRECOGNIZED + : result; + } + /** + * + * + *
+         * Required. The optimization goal of the metric.
+         * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec.GoalType goal = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The goal to set. + * @return This builder for chaining. + */ + public Builder setGoal( + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + .GoalType + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + goal_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The optimization goal of the metric.
+         * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec.GoalType goal = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearGoal() { + bitField0_ = (bitField0_ & ~0x00000002); + goal_ = 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.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec) + private static final com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .MetricSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec(); + } + + public static com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .MetricSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MetricSpec 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.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SearchTrialSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Required. The spec of a search trial job. The same spec applies to
+       * all search trials.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.CustomJobSpec search_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the searchTrialJobSpec field is set. + */ + boolean hasSearchTrialJobSpec(); + /** + * + * + *
+       * Required. The spec of a search trial job. The same spec applies to
+       * all search trials.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.CustomJobSpec search_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The searchTrialJobSpec. + */ + com.google.cloud.aiplatform.v1beta1.CustomJobSpec getSearchTrialJobSpec(); + /** + * + * + *
+       * Required. The spec of a search trial job. The same spec applies to
+       * all search trials.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.CustomJobSpec search_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1beta1.CustomJobSpecOrBuilder getSearchTrialJobSpecOrBuilder(); + + /** + * + * + *
+       * Required. The maximum number of Neural Architecture Search (NAS) trials
+       * to run.
+       * 
+ * + * int32 max_trial_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The maxTrialCount. + */ + int getMaxTrialCount(); + + /** + * + * + *
+       * Required. The maximum number of trials to run in parallel.
+       * 
+ * + * int32 max_parallel_trial_count = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The maxParallelTrialCount. + */ + int getMaxParallelTrialCount(); + + /** + * + * + *
+       * The number of failed trials that need to be seen before failing
+       * the NasJob.
+       * If set to 0, Vertex AI decides how many trials must fail
+       * before the whole job fails.
+       * 
+ * + * int32 max_failed_trial_count = 4; + * + * @return The maxFailedTrialCount. + */ + int getMaxFailedTrialCount(); + } + /** + * + * + *
+     * Represent spec for search trials.
+     * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec} + */ + public static final class SearchTrialSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec) + SearchTrialSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use SearchTrialSpec.newBuilder() to construct. + private SearchTrialSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SearchTrialSpec() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SearchTrialSpec(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NasJobProto + .internal_static_google_cloud_aiplatform_v1beta1_NasJobSpec_MultiTrialAlgorithmSpec_SearchTrialSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NasJobProto + .internal_static_google_cloud_aiplatform_v1beta1_NasJobSpec_MultiTrialAlgorithmSpec_SearchTrialSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpec.class, + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpec.Builder.class); + } + + public static final int SEARCH_TRIAL_JOB_SPEC_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1beta1.CustomJobSpec searchTrialJobSpec_; + /** + * + * + *
+       * Required. The spec of a search trial job. The same spec applies to
+       * all search trials.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.CustomJobSpec search_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the searchTrialJobSpec field is set. + */ + @java.lang.Override + public boolean hasSearchTrialJobSpec() { + return searchTrialJobSpec_ != null; + } + /** + * + * + *
+       * Required. The spec of a search trial job. The same spec applies to
+       * all search trials.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.CustomJobSpec search_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The searchTrialJobSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.CustomJobSpec getSearchTrialJobSpec() { + return searchTrialJobSpec_ == null + ? com.google.cloud.aiplatform.v1beta1.CustomJobSpec.getDefaultInstance() + : searchTrialJobSpec_; + } + /** + * + * + *
+       * Required. The spec of a search trial job. The same spec applies to
+       * all search trials.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.CustomJobSpec search_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.CustomJobSpecOrBuilder + getSearchTrialJobSpecOrBuilder() { + return searchTrialJobSpec_ == null + ? com.google.cloud.aiplatform.v1beta1.CustomJobSpec.getDefaultInstance() + : searchTrialJobSpec_; + } + + public static final int MAX_TRIAL_COUNT_FIELD_NUMBER = 2; + private int maxTrialCount_ = 0; + /** + * + * + *
+       * Required. The maximum number of Neural Architecture Search (NAS) trials
+       * to run.
+       * 
+ * + * int32 max_trial_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The maxTrialCount. + */ + @java.lang.Override + public int getMaxTrialCount() { + return maxTrialCount_; + } + + public static final int MAX_PARALLEL_TRIAL_COUNT_FIELD_NUMBER = 3; + private int maxParallelTrialCount_ = 0; + /** + * + * + *
+       * Required. The maximum number of trials to run in parallel.
+       * 
+ * + * int32 max_parallel_trial_count = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The maxParallelTrialCount. + */ + @java.lang.Override + public int getMaxParallelTrialCount() { + return maxParallelTrialCount_; + } + + public static final int MAX_FAILED_TRIAL_COUNT_FIELD_NUMBER = 4; + private int maxFailedTrialCount_ = 0; + /** + * + * + *
+       * The number of failed trials that need to be seen before failing
+       * the NasJob.
+       * If set to 0, Vertex AI decides how many trials must fail
+       * before the whole job fails.
+       * 
+ * + * int32 max_failed_trial_count = 4; + * + * @return The maxFailedTrialCount. + */ + @java.lang.Override + public int getMaxFailedTrialCount() { + return maxFailedTrialCount_; + } + + 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 (searchTrialJobSpec_ != null) { + output.writeMessage(1, getSearchTrialJobSpec()); + } + if (maxTrialCount_ != 0) { + output.writeInt32(2, maxTrialCount_); + } + if (maxParallelTrialCount_ != 0) { + output.writeInt32(3, maxParallelTrialCount_); + } + if (maxFailedTrialCount_ != 0) { + output.writeInt32(4, maxFailedTrialCount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (searchTrialJobSpec_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSearchTrialJobSpec()); + } + if (maxTrialCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, maxTrialCount_); + } + if (maxParallelTrialCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, maxParallelTrialCount_); + } + if (maxFailedTrialCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, maxFailedTrialCount_); + } + 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.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpec)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec + other = + (com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpec) + obj; + + if (hasSearchTrialJobSpec() != other.hasSearchTrialJobSpec()) return false; + if (hasSearchTrialJobSpec()) { + if (!getSearchTrialJobSpec().equals(other.getSearchTrialJobSpec())) return false; + } + if (getMaxTrialCount() != other.getMaxTrialCount()) return false; + if (getMaxParallelTrialCount() != other.getMaxParallelTrialCount()) return false; + if (getMaxFailedTrialCount() != other.getMaxFailedTrialCount()) 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 (hasSearchTrialJobSpec()) { + hash = (37 * hash) + SEARCH_TRIAL_JOB_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getSearchTrialJobSpec().hashCode(); + } + hash = (37 * hash) + MAX_TRIAL_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getMaxTrialCount(); + hash = (37 * hash) + MAX_PARALLEL_TRIAL_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getMaxParallelTrialCount(); + hash = (37 * hash) + MAX_FAILED_TRIAL_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getMaxFailedTrialCount(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpec + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpec + 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.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpec + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpec + 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.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpec + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpec + 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.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpec + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpec + 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.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpec + 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.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpec + 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.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpec + 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.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec + 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; + } + /** + * + * + *
+       * Represent spec for search trials.
+       * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec) + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NasJobProto + .internal_static_google_cloud_aiplatform_v1beta1_NasJobSpec_MultiTrialAlgorithmSpec_SearchTrialSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NasJobProto + .internal_static_google_cloud_aiplatform_v1beta1_NasJobSpec_MultiTrialAlgorithmSpec_SearchTrialSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpec.class, + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpec.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + searchTrialJobSpec_ = null; + if (searchTrialJobSpecBuilder_ != null) { + searchTrialJobSpecBuilder_.dispose(); + searchTrialJobSpecBuilder_ = null; + } + maxTrialCount_ = 0; + maxParallelTrialCount_ = 0; + maxFailedTrialCount_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.NasJobProto + .internal_static_google_cloud_aiplatform_v1beta1_NasJobSpec_MultiTrialAlgorithmSpec_SearchTrialSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpec + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpec + build() { + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpec + buildPartial() { + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec + result = + new com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.searchTrialJobSpec_ = + searchTrialJobSpecBuilder_ == null + ? searchTrialJobSpec_ + : searchTrialJobSpecBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.maxTrialCount_ = maxTrialCount_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.maxParallelTrialCount_ = maxParallelTrialCount_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.maxFailedTrialCount_ = maxFailedTrialCount_; + } + } + + @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.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpec) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpec) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpec.getDefaultInstance()) return this; + if (other.hasSearchTrialJobSpec()) { + mergeSearchTrialJobSpec(other.getSearchTrialJobSpec()); + } + if (other.getMaxTrialCount() != 0) { + setMaxTrialCount(other.getMaxTrialCount()); + } + if (other.getMaxParallelTrialCount() != 0) { + setMaxParallelTrialCount(other.getMaxParallelTrialCount()); + } + if (other.getMaxFailedTrialCount() != 0) { + setMaxFailedTrialCount(other.getMaxFailedTrialCount()); + } + 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( + getSearchTrialJobSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + maxTrialCount_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + maxParallelTrialCount_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + maxFailedTrialCount_ = 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 com.google.cloud.aiplatform.v1beta1.CustomJobSpec searchTrialJobSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.CustomJobSpec, + com.google.cloud.aiplatform.v1beta1.CustomJobSpec.Builder, + com.google.cloud.aiplatform.v1beta1.CustomJobSpecOrBuilder> + searchTrialJobSpecBuilder_; + /** + * + * + *
+         * Required. The spec of a search trial job. The same spec applies to
+         * all search trials.
+         * 
+ * + * + * .google.cloud.aiplatform.v1beta1.CustomJobSpec search_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the searchTrialJobSpec field is set. + */ + public boolean hasSearchTrialJobSpec() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+         * Required. The spec of a search trial job. The same spec applies to
+         * all search trials.
+         * 
+ * + * + * .google.cloud.aiplatform.v1beta1.CustomJobSpec search_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The searchTrialJobSpec. + */ + public com.google.cloud.aiplatform.v1beta1.CustomJobSpec getSearchTrialJobSpec() { + if (searchTrialJobSpecBuilder_ == null) { + return searchTrialJobSpec_ == null + ? com.google.cloud.aiplatform.v1beta1.CustomJobSpec.getDefaultInstance() + : searchTrialJobSpec_; + } else { + return searchTrialJobSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+         * Required. The spec of a search trial job. The same spec applies to
+         * all search trials.
+         * 
+ * + * + * .google.cloud.aiplatform.v1beta1.CustomJobSpec search_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSearchTrialJobSpec( + com.google.cloud.aiplatform.v1beta1.CustomJobSpec value) { + if (searchTrialJobSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + searchTrialJobSpec_ = value; + } else { + searchTrialJobSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The spec of a search trial job. The same spec applies to
+         * all search trials.
+         * 
+ * + * + * .google.cloud.aiplatform.v1beta1.CustomJobSpec search_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSearchTrialJobSpec( + com.google.cloud.aiplatform.v1beta1.CustomJobSpec.Builder builderForValue) { + if (searchTrialJobSpecBuilder_ == null) { + searchTrialJobSpec_ = builderForValue.build(); + } else { + searchTrialJobSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The spec of a search trial job. The same spec applies to
+         * all search trials.
+         * 
+ * + * + * .google.cloud.aiplatform.v1beta1.CustomJobSpec search_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeSearchTrialJobSpec( + com.google.cloud.aiplatform.v1beta1.CustomJobSpec value) { + if (searchTrialJobSpecBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && searchTrialJobSpec_ != null + && searchTrialJobSpec_ + != com.google.cloud.aiplatform.v1beta1.CustomJobSpec.getDefaultInstance()) { + getSearchTrialJobSpecBuilder().mergeFrom(value); + } else { + searchTrialJobSpec_ = value; + } + } else { + searchTrialJobSpecBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The spec of a search trial job. The same spec applies to
+         * all search trials.
+         * 
+ * + * + * .google.cloud.aiplatform.v1beta1.CustomJobSpec search_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearSearchTrialJobSpec() { + bitField0_ = (bitField0_ & ~0x00000001); + searchTrialJobSpec_ = null; + if (searchTrialJobSpecBuilder_ != null) { + searchTrialJobSpecBuilder_.dispose(); + searchTrialJobSpecBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The spec of a search trial job. The same spec applies to
+         * all search trials.
+         * 
+ * + * + * .google.cloud.aiplatform.v1beta1.CustomJobSpec search_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1beta1.CustomJobSpec.Builder + getSearchTrialJobSpecBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getSearchTrialJobSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * Required. The spec of a search trial job. The same spec applies to
+         * all search trials.
+         * 
+ * + * + * .google.cloud.aiplatform.v1beta1.CustomJobSpec search_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1beta1.CustomJobSpecOrBuilder + getSearchTrialJobSpecOrBuilder() { + if (searchTrialJobSpecBuilder_ != null) { + return searchTrialJobSpecBuilder_.getMessageOrBuilder(); + } else { + return searchTrialJobSpec_ == null + ? com.google.cloud.aiplatform.v1beta1.CustomJobSpec.getDefaultInstance() + : searchTrialJobSpec_; + } + } + /** + * + * + *
+         * Required. The spec of a search trial job. The same spec applies to
+         * all search trials.
+         * 
+ * + * + * .google.cloud.aiplatform.v1beta1.CustomJobSpec search_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.CustomJobSpec, + com.google.cloud.aiplatform.v1beta1.CustomJobSpec.Builder, + com.google.cloud.aiplatform.v1beta1.CustomJobSpecOrBuilder> + getSearchTrialJobSpecFieldBuilder() { + if (searchTrialJobSpecBuilder_ == null) { + searchTrialJobSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.CustomJobSpec, + com.google.cloud.aiplatform.v1beta1.CustomJobSpec.Builder, + com.google.cloud.aiplatform.v1beta1.CustomJobSpecOrBuilder>( + getSearchTrialJobSpec(), getParentForChildren(), isClean()); + searchTrialJobSpec_ = null; + } + return searchTrialJobSpecBuilder_; + } + + private int maxTrialCount_; + /** + * + * + *
+         * Required. The maximum number of Neural Architecture Search (NAS) trials
+         * to run.
+         * 
+ * + * int32 max_trial_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The maxTrialCount. + */ + @java.lang.Override + public int getMaxTrialCount() { + return maxTrialCount_; + } + /** + * + * + *
+         * Required. The maximum number of Neural Architecture Search (NAS) trials
+         * to run.
+         * 
+ * + * int32 max_trial_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The maxTrialCount to set. + * @return This builder for chaining. + */ + public Builder setMaxTrialCount(int value) { + + maxTrialCount_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The maximum number of Neural Architecture Search (NAS) trials
+         * to run.
+         * 
+ * + * int32 max_trial_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearMaxTrialCount() { + bitField0_ = (bitField0_ & ~0x00000002); + maxTrialCount_ = 0; + onChanged(); + return this; + } + + private int maxParallelTrialCount_; + /** + * + * + *
+         * Required. The maximum number of trials to run in parallel.
+         * 
+ * + * int32 max_parallel_trial_count = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The maxParallelTrialCount. + */ + @java.lang.Override + public int getMaxParallelTrialCount() { + return maxParallelTrialCount_; + } + /** + * + * + *
+         * Required. The maximum number of trials to run in parallel.
+         * 
+ * + * int32 max_parallel_trial_count = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The maxParallelTrialCount to set. + * @return This builder for chaining. + */ + public Builder setMaxParallelTrialCount(int value) { + + maxParallelTrialCount_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The maximum number of trials to run in parallel.
+         * 
+ * + * int32 max_parallel_trial_count = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearMaxParallelTrialCount() { + bitField0_ = (bitField0_ & ~0x00000004); + maxParallelTrialCount_ = 0; + onChanged(); + return this; + } + + private int maxFailedTrialCount_; + /** + * + * + *
+         * The number of failed trials that need to be seen before failing
+         * the NasJob.
+         * If set to 0, Vertex AI decides how many trials must fail
+         * before the whole job fails.
+         * 
+ * + * int32 max_failed_trial_count = 4; + * + * @return The maxFailedTrialCount. + */ + @java.lang.Override + public int getMaxFailedTrialCount() { + return maxFailedTrialCount_; + } + /** + * + * + *
+         * The number of failed trials that need to be seen before failing
+         * the NasJob.
+         * If set to 0, Vertex AI decides how many trials must fail
+         * before the whole job fails.
+         * 
+ * + * int32 max_failed_trial_count = 4; + * + * @param value The maxFailedTrialCount to set. + * @return This builder for chaining. + */ + public Builder setMaxFailedTrialCount(int value) { + + maxFailedTrialCount_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+         * The number of failed trials that need to be seen before failing
+         * the NasJob.
+         * If set to 0, Vertex AI decides how many trials must fail
+         * before the whole job fails.
+         * 
+ * + * int32 max_failed_trial_count = 4; + * + * @return This builder for chaining. + */ + public Builder clearMaxFailedTrialCount() { + bitField0_ = (bitField0_ & ~0x00000008); + maxFailedTrialCount_ = 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.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec) + private static final com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpec(); + } + + public static com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchTrialSpec 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.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface TrainTrialSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Required. The spec of a train trial job. The same spec applies to
+       * all train trials.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.CustomJobSpec train_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the trainTrialJobSpec field is set. + */ + boolean hasTrainTrialJobSpec(); + /** + * + * + *
+       * Required. The spec of a train trial job. The same spec applies to
+       * all train trials.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.CustomJobSpec train_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The trainTrialJobSpec. + */ + com.google.cloud.aiplatform.v1beta1.CustomJobSpec getTrainTrialJobSpec(); + /** + * + * + *
+       * Required. The spec of a train trial job. The same spec applies to
+       * all train trials.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.CustomJobSpec train_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.aiplatform.v1beta1.CustomJobSpecOrBuilder getTrainTrialJobSpecOrBuilder(); + + /** + * + * + *
+       * Required. The maximum number of trials to run in parallel.
+       * 
+ * + * int32 max_parallel_trial_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The maxParallelTrialCount. + */ + int getMaxParallelTrialCount(); + + /** + * + * + *
+       * Required. Frequency of search trials to start train stage. Top N
+       * [TrainTrialSpec.max_parallel_trial_count]
+       * search trials will be trained for every M
+       * [TrainTrialSpec.frequency] trials searched.
+       * 
+ * + * int32 frequency = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The frequency. + */ + int getFrequency(); + } + /** + * + * + *
+     * Represent spec for train trials.
+     * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec} + */ + public static final class TrainTrialSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec) + TrainTrialSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use TrainTrialSpec.newBuilder() to construct. + private TrainTrialSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TrainTrialSpec() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TrainTrialSpec(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NasJobProto + .internal_static_google_cloud_aiplatform_v1beta1_NasJobSpec_MultiTrialAlgorithmSpec_TrainTrialSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NasJobProto + .internal_static_google_cloud_aiplatform_v1beta1_NasJobSpec_MultiTrialAlgorithmSpec_TrainTrialSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .TrainTrialSpec.class, + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .TrainTrialSpec.Builder.class); + } + + public static final int TRAIN_TRIAL_JOB_SPEC_FIELD_NUMBER = 1; + private com.google.cloud.aiplatform.v1beta1.CustomJobSpec trainTrialJobSpec_; + /** + * + * + *
+       * Required. The spec of a train trial job. The same spec applies to
+       * all train trials.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.CustomJobSpec train_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the trainTrialJobSpec field is set. + */ + @java.lang.Override + public boolean hasTrainTrialJobSpec() { + return trainTrialJobSpec_ != null; + } + /** + * + * + *
+       * Required. The spec of a train trial job. The same spec applies to
+       * all train trials.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.CustomJobSpec train_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The trainTrialJobSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.CustomJobSpec getTrainTrialJobSpec() { + return trainTrialJobSpec_ == null + ? com.google.cloud.aiplatform.v1beta1.CustomJobSpec.getDefaultInstance() + : trainTrialJobSpec_; + } + /** + * + * + *
+       * Required. The spec of a train trial job. The same spec applies to
+       * all train trials.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.CustomJobSpec train_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.CustomJobSpecOrBuilder + getTrainTrialJobSpecOrBuilder() { + return trainTrialJobSpec_ == null + ? com.google.cloud.aiplatform.v1beta1.CustomJobSpec.getDefaultInstance() + : trainTrialJobSpec_; + } + + public static final int MAX_PARALLEL_TRIAL_COUNT_FIELD_NUMBER = 2; + private int maxParallelTrialCount_ = 0; + /** + * + * + *
+       * Required. The maximum number of trials to run in parallel.
+       * 
+ * + * int32 max_parallel_trial_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The maxParallelTrialCount. + */ + @java.lang.Override + public int getMaxParallelTrialCount() { + return maxParallelTrialCount_; + } + + public static final int FREQUENCY_FIELD_NUMBER = 3; + private int frequency_ = 0; + /** + * + * + *
+       * Required. Frequency of search trials to start train stage. Top N
+       * [TrainTrialSpec.max_parallel_trial_count]
+       * search trials will be trained for every M
+       * [TrainTrialSpec.frequency] trials searched.
+       * 
+ * + * int32 frequency = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The frequency. + */ + @java.lang.Override + public int getFrequency() { + return frequency_; + } + + 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 (trainTrialJobSpec_ != null) { + output.writeMessage(1, getTrainTrialJobSpec()); + } + if (maxParallelTrialCount_ != 0) { + output.writeInt32(2, maxParallelTrialCount_); + } + if (frequency_ != 0) { + output.writeInt32(3, frequency_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (trainTrialJobSpec_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTrainTrialJobSpec()); + } + if (maxParallelTrialCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, maxParallelTrialCount_); + } + if (frequency_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, frequency_); + } + 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.NasJobSpec.MultiTrialAlgorithmSpec + .TrainTrialSpec)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + other = + (com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .TrainTrialSpec) + obj; + + if (hasTrainTrialJobSpec() != other.hasTrainTrialJobSpec()) return false; + if (hasTrainTrialJobSpec()) { + if (!getTrainTrialJobSpec().equals(other.getTrainTrialJobSpec())) return false; + } + if (getMaxParallelTrialCount() != other.getMaxParallelTrialCount()) return false; + if (getFrequency() != other.getFrequency()) 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 (hasTrainTrialJobSpec()) { + hash = (37 * hash) + TRAIN_TRIAL_JOB_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getTrainTrialJobSpec().hashCode(); + } + hash = (37 * hash) + MAX_PARALLEL_TRIAL_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getMaxParallelTrialCount(); + hash = (37 * hash) + FREQUENCY_FIELD_NUMBER; + hash = (53 * hash) + getFrequency(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .TrainTrialSpec + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .TrainTrialSpec + 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.NasJobSpec.MultiTrialAlgorithmSpec + .TrainTrialSpec + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .TrainTrialSpec + 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.NasJobSpec.MultiTrialAlgorithmSpec + .TrainTrialSpec + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .TrainTrialSpec + 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.NasJobSpec.MultiTrialAlgorithmSpec + .TrainTrialSpec + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .TrainTrialSpec + 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.NasJobSpec.MultiTrialAlgorithmSpec + .TrainTrialSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .TrainTrialSpec + 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.NasJobSpec.MultiTrialAlgorithmSpec + .TrainTrialSpec + 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.NasJobSpec.MultiTrialAlgorithmSpec + .TrainTrialSpec + 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.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + 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; + } + /** + * + * + *
+       * Represent spec for train trials.
+       * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec) + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .TrainTrialSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NasJobProto + .internal_static_google_cloud_aiplatform_v1beta1_NasJobSpec_MultiTrialAlgorithmSpec_TrainTrialSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NasJobProto + .internal_static_google_cloud_aiplatform_v1beta1_NasJobSpec_MultiTrialAlgorithmSpec_TrainTrialSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .TrainTrialSpec.class, + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .TrainTrialSpec.Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + trainTrialJobSpec_ = null; + if (trainTrialJobSpecBuilder_ != null) { + trainTrialJobSpecBuilder_.dispose(); + trainTrialJobSpecBuilder_ = null; + } + maxParallelTrialCount_ = 0; + frequency_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.NasJobProto + .internal_static_google_cloud_aiplatform_v1beta1_NasJobSpec_MultiTrialAlgorithmSpec_TrainTrialSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .TrainTrialSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + build() { + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + buildPartial() { + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + result = + new com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .TrainTrialSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.trainTrialJobSpec_ = + trainTrialJobSpecBuilder_ == null + ? trainTrialJobSpec_ + : trainTrialJobSpecBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.maxParallelTrialCount_ = maxParallelTrialCount_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.frequency_ = frequency_; + } + } + + @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.NasJobSpec.MultiTrialAlgorithmSpec + .TrainTrialSpec) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .TrainTrialSpec) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + other) { + if (other + == com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .TrainTrialSpec.getDefaultInstance()) return this; + if (other.hasTrainTrialJobSpec()) { + mergeTrainTrialJobSpec(other.getTrainTrialJobSpec()); + } + if (other.getMaxParallelTrialCount() != 0) { + setMaxParallelTrialCount(other.getMaxParallelTrialCount()); + } + if (other.getFrequency() != 0) { + setFrequency(other.getFrequency()); + } + 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( + getTrainTrialJobSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + maxParallelTrialCount_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + frequency_ = 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 com.google.cloud.aiplatform.v1beta1.CustomJobSpec trainTrialJobSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.CustomJobSpec, + com.google.cloud.aiplatform.v1beta1.CustomJobSpec.Builder, + com.google.cloud.aiplatform.v1beta1.CustomJobSpecOrBuilder> + trainTrialJobSpecBuilder_; + /** + * + * + *
+         * Required. The spec of a train trial job. The same spec applies to
+         * all train trials.
+         * 
+ * + * + * .google.cloud.aiplatform.v1beta1.CustomJobSpec train_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the trainTrialJobSpec field is set. + */ + public boolean hasTrainTrialJobSpec() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+         * Required. The spec of a train trial job. The same spec applies to
+         * all train trials.
+         * 
+ * + * + * .google.cloud.aiplatform.v1beta1.CustomJobSpec train_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The trainTrialJobSpec. + */ + public com.google.cloud.aiplatform.v1beta1.CustomJobSpec getTrainTrialJobSpec() { + if (trainTrialJobSpecBuilder_ == null) { + return trainTrialJobSpec_ == null + ? com.google.cloud.aiplatform.v1beta1.CustomJobSpec.getDefaultInstance() + : trainTrialJobSpec_; + } else { + return trainTrialJobSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+         * Required. The spec of a train trial job. The same spec applies to
+         * all train trials.
+         * 
+ * + * + * .google.cloud.aiplatform.v1beta1.CustomJobSpec train_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTrainTrialJobSpec( + com.google.cloud.aiplatform.v1beta1.CustomJobSpec value) { + if (trainTrialJobSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + trainTrialJobSpec_ = value; + } else { + trainTrialJobSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The spec of a train trial job. The same spec applies to
+         * all train trials.
+         * 
+ * + * + * .google.cloud.aiplatform.v1beta1.CustomJobSpec train_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTrainTrialJobSpec( + com.google.cloud.aiplatform.v1beta1.CustomJobSpec.Builder builderForValue) { + if (trainTrialJobSpecBuilder_ == null) { + trainTrialJobSpec_ = builderForValue.build(); + } else { + trainTrialJobSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The spec of a train trial job. The same spec applies to
+         * all train trials.
+         * 
+ * + * + * .google.cloud.aiplatform.v1beta1.CustomJobSpec train_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeTrainTrialJobSpec( + com.google.cloud.aiplatform.v1beta1.CustomJobSpec value) { + if (trainTrialJobSpecBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && trainTrialJobSpec_ != null + && trainTrialJobSpec_ + != com.google.cloud.aiplatform.v1beta1.CustomJobSpec.getDefaultInstance()) { + getTrainTrialJobSpecBuilder().mergeFrom(value); + } else { + trainTrialJobSpec_ = value; + } + } else { + trainTrialJobSpecBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The spec of a train trial job. The same spec applies to
+         * all train trials.
+         * 
+ * + * + * .google.cloud.aiplatform.v1beta1.CustomJobSpec train_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearTrainTrialJobSpec() { + bitField0_ = (bitField0_ & ~0x00000001); + trainTrialJobSpec_ = null; + if (trainTrialJobSpecBuilder_ != null) { + trainTrialJobSpecBuilder_.dispose(); + trainTrialJobSpecBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The spec of a train trial job. The same spec applies to
+         * all train trials.
+         * 
+ * + * + * .google.cloud.aiplatform.v1beta1.CustomJobSpec train_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1beta1.CustomJobSpec.Builder + getTrainTrialJobSpecBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getTrainTrialJobSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+         * Required. The spec of a train trial job. The same spec applies to
+         * all train trials.
+         * 
+ * + * + * .google.cloud.aiplatform.v1beta1.CustomJobSpec train_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1beta1.CustomJobSpecOrBuilder + getTrainTrialJobSpecOrBuilder() { + if (trainTrialJobSpecBuilder_ != null) { + return trainTrialJobSpecBuilder_.getMessageOrBuilder(); + } else { + return trainTrialJobSpec_ == null + ? com.google.cloud.aiplatform.v1beta1.CustomJobSpec.getDefaultInstance() + : trainTrialJobSpec_; + } + } + /** + * + * + *
+         * Required. The spec of a train trial job. The same spec applies to
+         * all train trials.
+         * 
+ * + * + * .google.cloud.aiplatform.v1beta1.CustomJobSpec train_trial_job_spec = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.CustomJobSpec, + com.google.cloud.aiplatform.v1beta1.CustomJobSpec.Builder, + com.google.cloud.aiplatform.v1beta1.CustomJobSpecOrBuilder> + getTrainTrialJobSpecFieldBuilder() { + if (trainTrialJobSpecBuilder_ == null) { + trainTrialJobSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.CustomJobSpec, + com.google.cloud.aiplatform.v1beta1.CustomJobSpec.Builder, + com.google.cloud.aiplatform.v1beta1.CustomJobSpecOrBuilder>( + getTrainTrialJobSpec(), getParentForChildren(), isClean()); + trainTrialJobSpec_ = null; + } + return trainTrialJobSpecBuilder_; + } + + private int maxParallelTrialCount_; + /** + * + * + *
+         * Required. The maximum number of trials to run in parallel.
+         * 
+ * + * int32 max_parallel_trial_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The maxParallelTrialCount. + */ + @java.lang.Override + public int getMaxParallelTrialCount() { + return maxParallelTrialCount_; + } + /** + * + * + *
+         * Required. The maximum number of trials to run in parallel.
+         * 
+ * + * int32 max_parallel_trial_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The maxParallelTrialCount to set. + * @return This builder for chaining. + */ + public Builder setMaxParallelTrialCount(int value) { + + maxParallelTrialCount_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Required. The maximum number of trials to run in parallel.
+         * 
+ * + * int32 max_parallel_trial_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearMaxParallelTrialCount() { + bitField0_ = (bitField0_ & ~0x00000002); + maxParallelTrialCount_ = 0; + onChanged(); + return this; + } + + private int frequency_; + /** + * + * + *
+         * Required. Frequency of search trials to start train stage. Top N
+         * [TrainTrialSpec.max_parallel_trial_count]
+         * search trials will be trained for every M
+         * [TrainTrialSpec.frequency] trials searched.
+         * 
+ * + * int32 frequency = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The frequency. + */ + @java.lang.Override + public int getFrequency() { + return frequency_; + } + /** + * + * + *
+         * Required. Frequency of search trials to start train stage. Top N
+         * [TrainTrialSpec.max_parallel_trial_count]
+         * search trials will be trained for every M
+         * [TrainTrialSpec.frequency] trials searched.
+         * 
+ * + * int32 frequency = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The frequency to set. + * @return This builder for chaining. + */ + public Builder setFrequency(int value) { + + frequency_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+         * Required. Frequency of search trials to start train stage. Top N
+         * [TrainTrialSpec.max_parallel_trial_count]
+         * search trials will be trained for every M
+         * [TrainTrialSpec.frequency] trials searched.
+         * 
+ * + * int32 frequency = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearFrequency() { + bitField0_ = (bitField0_ & ~0x00000004); + frequency_ = 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.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec) + private static final com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .TrainTrialSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .TrainTrialSpec(); + } + + public static com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .TrainTrialSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TrainTrialSpec 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.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int MULTI_TRIAL_ALGORITHM_FIELD_NUMBER = 1; + private int multiTrialAlgorithm_ = 0; + /** + * + * + *
+     * The multi-trial Neural Architecture Search (NAS) algorithm
+     * type. Defaults to `REINFORCEMENT_LEARNING`.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MultiTrialAlgorithm multi_trial_algorithm = 1; + * + * + * @return The enum numeric value on the wire for multiTrialAlgorithm. + */ + @java.lang.Override + public int getMultiTrialAlgorithmValue() { + return multiTrialAlgorithm_; + } + /** + * + * + *
+     * The multi-trial Neural Architecture Search (NAS) algorithm
+     * type. Defaults to `REINFORCEMENT_LEARNING`.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MultiTrialAlgorithm multi_trial_algorithm = 1; + * + * + * @return The multiTrialAlgorithm. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .MultiTrialAlgorithm + getMultiTrialAlgorithm() { + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MultiTrialAlgorithm + result = + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .MultiTrialAlgorithm.forNumber(multiTrialAlgorithm_); + return result == null + ? com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .MultiTrialAlgorithm.UNRECOGNIZED + : result; + } + + public static final int METRIC_FIELD_NUMBER = 2; + private com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + metric_; + /** + * + * + *
+     * Metric specs for the NAS job.
+     * Validation for this field is done at `multi_trial_algorithm_spec` field.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec metric = 2; + * + * + * @return Whether the metric field is set. + */ + @java.lang.Override + public boolean hasMetric() { + return metric_ != null; + } + /** + * + * + *
+     * Metric specs for the NAS job.
+     * Validation for this field is done at `multi_trial_algorithm_spec` field.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec metric = 2; + * + * + * @return The metric. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + getMetric() { + return metric_ == null + ? com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + .getDefaultInstance() + : metric_; + } + /** + * + * + *
+     * Metric specs for the NAS job.
+     * Validation for this field is done at `multi_trial_algorithm_spec` field.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec metric = 2; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .MetricSpecOrBuilder + getMetricOrBuilder() { + return metric_ == null + ? com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + .getDefaultInstance() + : metric_; + } + + public static final int SEARCH_TRIAL_SPEC_FIELD_NUMBER = 3; + private com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec + searchTrialSpec_; + /** + * + * + *
+     * Required. Spec for search trials.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec search_trial_spec = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the searchTrialSpec field is set. + */ + @java.lang.Override + public boolean hasSearchTrialSpec() { + return searchTrialSpec_ != null; + } + /** + * + * + *
+     * Required. Spec for search trials.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec search_trial_spec = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The searchTrialSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec + getSearchTrialSpec() { + return searchTrialSpec_ == null + ? com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec + .getDefaultInstance() + : searchTrialSpec_; + } + /** + * + * + *
+     * Required. Spec for search trials.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec search_trial_spec = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpecOrBuilder + getSearchTrialSpecOrBuilder() { + return searchTrialSpec_ == null + ? com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec + .getDefaultInstance() + : searchTrialSpec_; + } + + public static final int TRAIN_TRIAL_SPEC_FIELD_NUMBER = 4; + private com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + trainTrialSpec_; + /** + * + * + *
+     * Spec for train trials. Top N [TrainTrialSpec.max_parallel_trial_count]
+     * search trials will be trained for every M
+     * [TrainTrialSpec.frequency] trials searched.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec train_trial_spec = 4; + * + * + * @return Whether the trainTrialSpec field is set. + */ + @java.lang.Override + public boolean hasTrainTrialSpec() { + return trainTrialSpec_ != null; + } + /** + * + * + *
+     * Spec for train trials. Top N [TrainTrialSpec.max_parallel_trial_count]
+     * search trials will be trained for every M
+     * [TrainTrialSpec.frequency] trials searched.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec train_trial_spec = 4; + * + * + * @return The trainTrialSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + getTrainTrialSpec() { + return trainTrialSpec_ == null + ? com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + .getDefaultInstance() + : trainTrialSpec_; + } + /** + * + * + *
+     * Spec for train trials. Top N [TrainTrialSpec.max_parallel_trial_count]
+     * search trials will be trained for every M
+     * [TrainTrialSpec.frequency] trials searched.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec train_trial_spec = 4; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .TrainTrialSpecOrBuilder + getTrainTrialSpecOrBuilder() { + return trainTrialSpec_ == null + ? com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + .getDefaultInstance() + : trainTrialSpec_; + } + + 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 (multiTrialAlgorithm_ + != com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .MultiTrialAlgorithm.MULTI_TRIAL_ALGORITHM_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, multiTrialAlgorithm_); + } + if (metric_ != null) { + output.writeMessage(2, getMetric()); + } + if (searchTrialSpec_ != null) { + output.writeMessage(3, getSearchTrialSpec()); + } + if (trainTrialSpec_ != null) { + output.writeMessage(4, getTrainTrialSpec()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (multiTrialAlgorithm_ + != com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .MultiTrialAlgorithm.MULTI_TRIAL_ALGORITHM_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, multiTrialAlgorithm_); + } + if (metric_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getMetric()); + } + if (searchTrialSpec_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getSearchTrialSpec()); + } + if (trainTrialSpec_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getTrainTrialSpec()); + } + 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.NasJobSpec.MultiTrialAlgorithmSpec)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec other = + (com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec) obj; + + if (multiTrialAlgorithm_ != other.multiTrialAlgorithm_) return false; + if (hasMetric() != other.hasMetric()) return false; + if (hasMetric()) { + if (!getMetric().equals(other.getMetric())) return false; + } + if (hasSearchTrialSpec() != other.hasSearchTrialSpec()) return false; + if (hasSearchTrialSpec()) { + if (!getSearchTrialSpec().equals(other.getSearchTrialSpec())) return false; + } + if (hasTrainTrialSpec() != other.hasTrainTrialSpec()) return false; + if (hasTrainTrialSpec()) { + if (!getTrainTrialSpec().equals(other.getTrainTrialSpec())) 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) + MULTI_TRIAL_ALGORITHM_FIELD_NUMBER; + hash = (53 * hash) + multiTrialAlgorithm_; + if (hasMetric()) { + hash = (37 * hash) + METRIC_FIELD_NUMBER; + hash = (53 * hash) + getMetric().hashCode(); + } + if (hasSearchTrialSpec()) { + hash = (37 * hash) + SEARCH_TRIAL_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getSearchTrialSpec().hashCode(); + } + if (hasTrainTrialSpec()) { + hash = (37 * hash) + TRAIN_TRIAL_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getTrainTrialSpec().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec 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.NasJobSpec.MultiTrialAlgorithmSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec 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.NasJobSpec.MultiTrialAlgorithmSpec parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec 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.NasJobSpec.MultiTrialAlgorithmSpec parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec 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.NasJobSpec.MultiTrialAlgorithmSpec + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + 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.NasJobSpec.MultiTrialAlgorithmSpec 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.NasJobSpec.MultiTrialAlgorithmSpec 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.NasJobSpec.MultiTrialAlgorithmSpec 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 spec of multi-trial Neural Architecture Search (NAS).
+     * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec) + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NasJobProto + .internal_static_google_cloud_aiplatform_v1beta1_NasJobSpec_MultiTrialAlgorithmSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NasJobProto + .internal_static_google_cloud_aiplatform_v1beta1_NasJobSpec_MultiTrialAlgorithmSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.class, + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.Builder + .class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + multiTrialAlgorithm_ = 0; + metric_ = null; + if (metricBuilder_ != null) { + metricBuilder_.dispose(); + metricBuilder_ = null; + } + searchTrialSpec_ = null; + if (searchTrialSpecBuilder_ != null) { + searchTrialSpecBuilder_.dispose(); + searchTrialSpecBuilder_ = null; + } + trainTrialSpec_ = null; + if (trainTrialSpecBuilder_ != null) { + trainTrialSpecBuilder_.dispose(); + trainTrialSpecBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.NasJobProto + .internal_static_google_cloud_aiplatform_v1beta1_NasJobSpec_MultiTrialAlgorithmSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec build() { + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec buildPartial() { + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec result = + new com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.multiTrialAlgorithm_ = multiTrialAlgorithm_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.metric_ = metricBuilder_ == null ? metric_ : metricBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.searchTrialSpec_ = + searchTrialSpecBuilder_ == null ? searchTrialSpec_ : searchTrialSpecBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.trainTrialSpec_ = + trainTrialSpecBuilder_ == null ? trainTrialSpec_ : trainTrialSpecBuilder_.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.NasJobSpec.MultiTrialAlgorithmSpec) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec other) { + if (other + == com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .getDefaultInstance()) return this; + if (other.multiTrialAlgorithm_ != 0) { + setMultiTrialAlgorithmValue(other.getMultiTrialAlgorithmValue()); + } + if (other.hasMetric()) { + mergeMetric(other.getMetric()); + } + if (other.hasSearchTrialSpec()) { + mergeSearchTrialSpec(other.getSearchTrialSpec()); + } + if (other.hasTrainTrialSpec()) { + mergeTrainTrialSpec(other.getTrainTrialSpec()); + } + 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: + { + multiTrialAlgorithm_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + input.readMessage(getMetricFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + getSearchTrialSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage( + getTrainTrialSpecFieldBuilder().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 int multiTrialAlgorithm_ = 0; + /** + * + * + *
+       * The multi-trial Neural Architecture Search (NAS) algorithm
+       * type. Defaults to `REINFORCEMENT_LEARNING`.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MultiTrialAlgorithm multi_trial_algorithm = 1; + * + * + * @return The enum numeric value on the wire for multiTrialAlgorithm. + */ + @java.lang.Override + public int getMultiTrialAlgorithmValue() { + return multiTrialAlgorithm_; + } + /** + * + * + *
+       * The multi-trial Neural Architecture Search (NAS) algorithm
+       * type. Defaults to `REINFORCEMENT_LEARNING`.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MultiTrialAlgorithm multi_trial_algorithm = 1; + * + * + * @param value The enum numeric value on the wire for multiTrialAlgorithm to set. + * @return This builder for chaining. + */ + public Builder setMultiTrialAlgorithmValue(int value) { + multiTrialAlgorithm_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The multi-trial Neural Architecture Search (NAS) algorithm
+       * type. Defaults to `REINFORCEMENT_LEARNING`.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MultiTrialAlgorithm multi_trial_algorithm = 1; + * + * + * @return The multiTrialAlgorithm. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .MultiTrialAlgorithm + getMultiTrialAlgorithm() { + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MultiTrialAlgorithm + result = + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .MultiTrialAlgorithm.forNumber(multiTrialAlgorithm_); + return result == null + ? com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .MultiTrialAlgorithm.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * The multi-trial Neural Architecture Search (NAS) algorithm
+       * type. Defaults to `REINFORCEMENT_LEARNING`.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MultiTrialAlgorithm multi_trial_algorithm = 1; + * + * + * @param value The multiTrialAlgorithm to set. + * @return This builder for chaining. + */ + public Builder setMultiTrialAlgorithm( + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MultiTrialAlgorithm + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + multiTrialAlgorithm_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * The multi-trial Neural Architecture Search (NAS) algorithm
+       * type. Defaults to `REINFORCEMENT_LEARNING`.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MultiTrialAlgorithm multi_trial_algorithm = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearMultiTrialAlgorithm() { + bitField0_ = (bitField0_ & ~0x00000001); + multiTrialAlgorithm_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + metric_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec, + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + .Builder, + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .MetricSpecOrBuilder> + metricBuilder_; + /** + * + * + *
+       * Metric specs for the NAS job.
+       * Validation for this field is done at `multi_trial_algorithm_spec` field.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec metric = 2; + * + * + * @return Whether the metric field is set. + */ + public boolean hasMetric() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+       * Metric specs for the NAS job.
+       * Validation for this field is done at `multi_trial_algorithm_spec` field.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec metric = 2; + * + * + * @return The metric. + */ + public com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + getMetric() { + if (metricBuilder_ == null) { + return metric_ == null + ? com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + .getDefaultInstance() + : metric_; + } else { + return metricBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Metric specs for the NAS job.
+       * Validation for this field is done at `multi_trial_algorithm_spec` field.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec metric = 2; + * + */ + public Builder setMetric( + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec value) { + if (metricBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metric_ = value; + } else { + metricBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Metric specs for the NAS job.
+       * Validation for this field is done at `multi_trial_algorithm_spec` field.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec metric = 2; + * + */ + public Builder setMetric( + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec.Builder + builderForValue) { + if (metricBuilder_ == null) { + metric_ = builderForValue.build(); + } else { + metricBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Metric specs for the NAS job.
+       * Validation for this field is done at `multi_trial_algorithm_spec` field.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec metric = 2; + * + */ + public Builder mergeMetric( + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec value) { + if (metricBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && metric_ != null + && metric_ + != com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .MetricSpec.getDefaultInstance()) { + getMetricBuilder().mergeFrom(value); + } else { + metric_ = value; + } + } else { + metricBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Metric specs for the NAS job.
+       * Validation for this field is done at `multi_trial_algorithm_spec` field.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec metric = 2; + * + */ + public Builder clearMetric() { + bitField0_ = (bitField0_ & ~0x00000002); + metric_ = null; + if (metricBuilder_ != null) { + metricBuilder_.dispose(); + metricBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Metric specs for the NAS job.
+       * Validation for this field is done at `multi_trial_algorithm_spec` field.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec metric = 2; + * + */ + public com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + .Builder + getMetricBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getMetricFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Metric specs for the NAS job.
+       * Validation for this field is done at `multi_trial_algorithm_spec` field.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec metric = 2; + * + */ + public com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .MetricSpecOrBuilder + getMetricOrBuilder() { + if (metricBuilder_ != null) { + return metricBuilder_.getMessageOrBuilder(); + } else { + return metric_ == null + ? com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + .getDefaultInstance() + : metric_; + } + } + /** + * + * + *
+       * Metric specs for the NAS job.
+       * Validation for this field is done at `multi_trial_algorithm_spec` field.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec metric = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec, + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + .Builder, + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .MetricSpecOrBuilder> + getMetricFieldBuilder() { + if (metricBuilder_ == null) { + metricBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec, + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec + .Builder, + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .MetricSpecOrBuilder>(getMetric(), getParentForChildren(), isClean()); + metric_ = null; + } + return metricBuilder_; + } + + private com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec + searchTrialSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpec, + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec + .Builder, + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpecOrBuilder> + searchTrialSpecBuilder_; + /** + * + * + *
+       * Required. Spec for search trials.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec search_trial_spec = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the searchTrialSpec field is set. + */ + public boolean hasSearchTrialSpec() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+       * Required. Spec for search trials.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec search_trial_spec = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The searchTrialSpec. + */ + public com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec + getSearchTrialSpec() { + if (searchTrialSpecBuilder_ == null) { + return searchTrialSpec_ == null + ? com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpec.getDefaultInstance() + : searchTrialSpec_; + } else { + return searchTrialSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Required. Spec for search trials.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec search_trial_spec = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSearchTrialSpec( + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec + value) { + if (searchTrialSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + searchTrialSpec_ = value; + } else { + searchTrialSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Spec for search trials.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec search_trial_spec = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setSearchTrialSpec( + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec + .Builder + builderForValue) { + if (searchTrialSpecBuilder_ == null) { + searchTrialSpec_ = builderForValue.build(); + } else { + searchTrialSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Spec for search trials.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec search_trial_spec = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeSearchTrialSpec( + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec + value) { + if (searchTrialSpecBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && searchTrialSpec_ != null + && searchTrialSpec_ + != com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpec.getDefaultInstance()) { + getSearchTrialSpecBuilder().mergeFrom(value); + } else { + searchTrialSpec_ = value; + } + } else { + searchTrialSpecBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Spec for search trials.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec search_trial_spec = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearSearchTrialSpec() { + bitField0_ = (bitField0_ & ~0x00000004); + searchTrialSpec_ = null; + if (searchTrialSpecBuilder_ != null) { + searchTrialSpecBuilder_.dispose(); + searchTrialSpecBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Spec for search trials.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec search_trial_spec = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec + .Builder + getSearchTrialSpecBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getSearchTrialSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Required. Spec for search trials.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec search_trial_spec = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpecOrBuilder + getSearchTrialSpecOrBuilder() { + if (searchTrialSpecBuilder_ != null) { + return searchTrialSpecBuilder_.getMessageOrBuilder(); + } else { + return searchTrialSpec_ == null + ? com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpec.getDefaultInstance() + : searchTrialSpec_; + } + } + /** + * + * + *
+       * Required. Spec for search trials.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec search_trial_spec = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpec, + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec + .Builder, + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpecOrBuilder> + getSearchTrialSpecFieldBuilder() { + if (searchTrialSpecBuilder_ == null) { + searchTrialSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpec, + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpec.Builder, + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .SearchTrialSpecOrBuilder>( + getSearchTrialSpec(), getParentForChildren(), isClean()); + searchTrialSpec_ = null; + } + return searchTrialSpecBuilder_; + } + + private com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + trainTrialSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec, + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + .Builder, + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .TrainTrialSpecOrBuilder> + trainTrialSpecBuilder_; + /** + * + * + *
+       * Spec for train trials. Top N [TrainTrialSpec.max_parallel_trial_count]
+       * search trials will be trained for every M
+       * [TrainTrialSpec.frequency] trials searched.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec train_trial_spec = 4; + * + * + * @return Whether the trainTrialSpec field is set. + */ + public boolean hasTrainTrialSpec() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+       * Spec for train trials. Top N [TrainTrialSpec.max_parallel_trial_count]
+       * search trials will be trained for every M
+       * [TrainTrialSpec.frequency] trials searched.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec train_trial_spec = 4; + * + * + * @return The trainTrialSpec. + */ + public com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + getTrainTrialSpec() { + if (trainTrialSpecBuilder_ == null) { + return trainTrialSpec_ == null + ? com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .TrainTrialSpec.getDefaultInstance() + : trainTrialSpec_; + } else { + return trainTrialSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Spec for train trials. Top N [TrainTrialSpec.max_parallel_trial_count]
+       * search trials will be trained for every M
+       * [TrainTrialSpec.frequency] trials searched.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec train_trial_spec = 4; + * + */ + public Builder setTrainTrialSpec( + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + value) { + if (trainTrialSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + trainTrialSpec_ = value; + } else { + trainTrialSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Spec for train trials. Top N [TrainTrialSpec.max_parallel_trial_count]
+       * search trials will be trained for every M
+       * [TrainTrialSpec.frequency] trials searched.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec train_trial_spec = 4; + * + */ + public Builder setTrainTrialSpec( + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + .Builder + builderForValue) { + if (trainTrialSpecBuilder_ == null) { + trainTrialSpec_ = builderForValue.build(); + } else { + trainTrialSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Spec for train trials. Top N [TrainTrialSpec.max_parallel_trial_count]
+       * search trials will be trained for every M
+       * [TrainTrialSpec.frequency] trials searched.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec train_trial_spec = 4; + * + */ + public Builder mergeTrainTrialSpec( + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + value) { + if (trainTrialSpecBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && trainTrialSpec_ != null + && trainTrialSpec_ + != com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .TrainTrialSpec.getDefaultInstance()) { + getTrainTrialSpecBuilder().mergeFrom(value); + } else { + trainTrialSpec_ = value; + } + } else { + trainTrialSpecBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+       * Spec for train trials. Top N [TrainTrialSpec.max_parallel_trial_count]
+       * search trials will be trained for every M
+       * [TrainTrialSpec.frequency] trials searched.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec train_trial_spec = 4; + * + */ + public Builder clearTrainTrialSpec() { + bitField0_ = (bitField0_ & ~0x00000008); + trainTrialSpec_ = null; + if (trainTrialSpecBuilder_ != null) { + trainTrialSpecBuilder_.dispose(); + trainTrialSpecBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Spec for train trials. Top N [TrainTrialSpec.max_parallel_trial_count]
+       * search trials will be trained for every M
+       * [TrainTrialSpec.frequency] trials searched.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec train_trial_spec = 4; + * + */ + public com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + .Builder + getTrainTrialSpecBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getTrainTrialSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Spec for train trials. Top N [TrainTrialSpec.max_parallel_trial_count]
+       * search trials will be trained for every M
+       * [TrainTrialSpec.frequency] trials searched.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec train_trial_spec = 4; + * + */ + public com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .TrainTrialSpecOrBuilder + getTrainTrialSpecOrBuilder() { + if (trainTrialSpecBuilder_ != null) { + return trainTrialSpecBuilder_.getMessageOrBuilder(); + } else { + return trainTrialSpec_ == null + ? com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .TrainTrialSpec.getDefaultInstance() + : trainTrialSpec_; + } + } + /** + * + * + *
+       * Spec for train trials. Top N [TrainTrialSpec.max_parallel_trial_count]
+       * search trials will be trained for every M
+       * [TrainTrialSpec.frequency] trials searched.
+       * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec train_trial_spec = 4; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec, + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec + .Builder, + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .TrainTrialSpecOrBuilder> + getTrainTrialSpecFieldBuilder() { + if (trainTrialSpecBuilder_ == null) { + trainTrialSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .TrainTrialSpec, + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .TrainTrialSpec.Builder, + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .TrainTrialSpecOrBuilder>( + getTrainTrialSpec(), getParentForChildren(), isClean()); + trainTrialSpec_ = null; + } + return trainTrialSpecBuilder_; + } + + @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.NasJobSpec.MultiTrialAlgorithmSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec) + private static final com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec(); + } + + public static com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MultiTrialAlgorithmSpec 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.NasJobSpec.MultiTrialAlgorithmSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int nasAlgorithmSpecCase_ = 0; + private java.lang.Object nasAlgorithmSpec_; + + public enum NasAlgorithmSpecCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + MULTI_TRIAL_ALGORITHM_SPEC(2), + NASALGORITHMSPEC_NOT_SET(0); + private final int value; + + private NasAlgorithmSpecCase(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 NasAlgorithmSpecCase valueOf(int value) { + return forNumber(value); + } + + public static NasAlgorithmSpecCase forNumber(int value) { + switch (value) { + case 2: + return MULTI_TRIAL_ALGORITHM_SPEC; + case 0: + return NASALGORITHMSPEC_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public NasAlgorithmSpecCase getNasAlgorithmSpecCase() { + return NasAlgorithmSpecCase.forNumber(nasAlgorithmSpecCase_); + } + + public static final int MULTI_TRIAL_ALGORITHM_SPEC_FIELD_NUMBER = 2; + /** + * + * + *
+   * The spec of multi-trial algorithms.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec multi_trial_algorithm_spec = 2; + * + * + * @return Whether the multiTrialAlgorithmSpec field is set. + */ + @java.lang.Override + public boolean hasMultiTrialAlgorithmSpec() { + return nasAlgorithmSpecCase_ == 2; + } + /** + * + * + *
+   * The spec of multi-trial algorithms.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec multi_trial_algorithm_spec = 2; + * + * + * @return The multiTrialAlgorithmSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + getMultiTrialAlgorithmSpec() { + if (nasAlgorithmSpecCase_ == 2) { + return (com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec) + nasAlgorithmSpec_; + } + return com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .getDefaultInstance(); + } + /** + * + * + *
+   * The spec of multi-trial algorithms.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec multi_trial_algorithm_spec = 2; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpecOrBuilder + getMultiTrialAlgorithmSpecOrBuilder() { + if (nasAlgorithmSpecCase_ == 2) { + return (com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec) + nasAlgorithmSpec_; + } + return com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .getDefaultInstance(); + } + + public static final int RESUME_NAS_JOB_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object resumeNasJobId_ = ""; + /** + * + * + *
+   * The ID of the existing NasJob in the same Project and Location
+   * which will be used to resume search. search_space_spec and
+   * nas_algorithm_spec are obtained from previous NasJob hence should not
+   * provide them again for this NasJob.
+   * 
+ * + * string resume_nas_job_id = 3; + * + * @return The resumeNasJobId. + */ + @java.lang.Override + public java.lang.String getResumeNasJobId() { + java.lang.Object ref = resumeNasJobId_; + 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(); + resumeNasJobId_ = s; + return s; + } + } + /** + * + * + *
+   * The ID of the existing NasJob in the same Project and Location
+   * which will be used to resume search. search_space_spec and
+   * nas_algorithm_spec are obtained from previous NasJob hence should not
+   * provide them again for this NasJob.
+   * 
+ * + * string resume_nas_job_id = 3; + * + * @return The bytes for resumeNasJobId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResumeNasJobIdBytes() { + java.lang.Object ref = resumeNasJobId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resumeNasJobId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SEARCH_SPACE_SPEC_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object searchSpaceSpec_ = ""; + /** + * + * + *
+   * It defines the search space for Neural Architecture Search (NAS).
+   * 
+ * + * string search_space_spec = 1; + * + * @return The searchSpaceSpec. + */ + @java.lang.Override + public java.lang.String getSearchSpaceSpec() { + java.lang.Object ref = searchSpaceSpec_; + 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(); + searchSpaceSpec_ = s; + return s; + } + } + /** + * + * + *
+   * It defines the search space for Neural Architecture Search (NAS).
+   * 
+ * + * string search_space_spec = 1; + * + * @return The bytes for searchSpaceSpec. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSearchSpaceSpecBytes() { + java.lang.Object ref = searchSpaceSpec_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + searchSpaceSpec_ = 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(searchSpaceSpec_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, searchSpaceSpec_); + } + if (nasAlgorithmSpecCase_ == 2) { + output.writeMessage( + 2, + (com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec) + nasAlgorithmSpec_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resumeNasJobId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, resumeNasJobId_); + } + 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(searchSpaceSpec_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, searchSpaceSpec_); + } + if (nasAlgorithmSpecCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, + (com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec) + nasAlgorithmSpec_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resumeNasJobId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, resumeNasJobId_); + } + 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.NasJobSpec)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.NasJobSpec other = + (com.google.cloud.aiplatform.v1beta1.NasJobSpec) obj; + + if (!getResumeNasJobId().equals(other.getResumeNasJobId())) return false; + if (!getSearchSpaceSpec().equals(other.getSearchSpaceSpec())) return false; + if (!getNasAlgorithmSpecCase().equals(other.getNasAlgorithmSpecCase())) return false; + switch (nasAlgorithmSpecCase_) { + case 2: + if (!getMultiTrialAlgorithmSpec().equals(other.getMultiTrialAlgorithmSpec())) 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) + RESUME_NAS_JOB_ID_FIELD_NUMBER; + hash = (53 * hash) + getResumeNasJobId().hashCode(); + hash = (37 * hash) + SEARCH_SPACE_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getSearchSpaceSpec().hashCode(); + switch (nasAlgorithmSpecCase_) { + case 2: + hash = (37 * hash) + MULTI_TRIAL_ALGORITHM_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getMultiTrialAlgorithmSpec().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.NasJobSpec parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.NasJobSpec 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.NasJobSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.NasJobSpec 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.NasJobSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.NasJobSpec 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.NasJobSpec parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.NasJobSpec 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.NasJobSpec parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.NasJobSpec 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.NasJobSpec 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.NasJobSpec 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.NasJobSpec 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 NasJob.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.NasJobSpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.NasJobSpec) + com.google.cloud.aiplatform.v1beta1.NasJobSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NasJobProto + .internal_static_google_cloud_aiplatform_v1beta1_NasJobSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NasJobProto + .internal_static_google_cloud_aiplatform_v1beta1_NasJobSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.NasJobSpec.class, + com.google.cloud.aiplatform.v1beta1.NasJobSpec.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.NasJobSpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (multiTrialAlgorithmSpecBuilder_ != null) { + multiTrialAlgorithmSpecBuilder_.clear(); + } + resumeNasJobId_ = ""; + searchSpaceSpec_ = ""; + nasAlgorithmSpecCase_ = 0; + nasAlgorithmSpec_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.NasJobProto + .internal_static_google_cloud_aiplatform_v1beta1_NasJobSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasJobSpec getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.NasJobSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasJobSpec build() { + com.google.cloud.aiplatform.v1beta1.NasJobSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasJobSpec buildPartial() { + com.google.cloud.aiplatform.v1beta1.NasJobSpec result = + new com.google.cloud.aiplatform.v1beta1.NasJobSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.NasJobSpec result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.resumeNasJobId_ = resumeNasJobId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.searchSpaceSpec_ = searchSpaceSpec_; + } + } + + private void buildPartialOneofs(com.google.cloud.aiplatform.v1beta1.NasJobSpec result) { + result.nasAlgorithmSpecCase_ = nasAlgorithmSpecCase_; + result.nasAlgorithmSpec_ = this.nasAlgorithmSpec_; + if (nasAlgorithmSpecCase_ == 2 && multiTrialAlgorithmSpecBuilder_ != null) { + result.nasAlgorithmSpec_ = multiTrialAlgorithmSpecBuilder_.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.NasJobSpec) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.NasJobSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.NasJobSpec other) { + if (other == com.google.cloud.aiplatform.v1beta1.NasJobSpec.getDefaultInstance()) return this; + if (!other.getResumeNasJobId().isEmpty()) { + resumeNasJobId_ = other.resumeNasJobId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getSearchSpaceSpec().isEmpty()) { + searchSpaceSpec_ = other.searchSpaceSpec_; + bitField0_ |= 0x00000004; + onChanged(); + } + switch (other.getNasAlgorithmSpecCase()) { + case MULTI_TRIAL_ALGORITHM_SPEC: + { + mergeMultiTrialAlgorithmSpec(other.getMultiTrialAlgorithmSpec()); + break; + } + case NASALGORITHMSPEC_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: + { + searchSpaceSpec_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 10 + case 18: + { + input.readMessage( + getMultiTrialAlgorithmSpecFieldBuilder().getBuilder(), extensionRegistry); + nasAlgorithmSpecCase_ = 2; + break; + } // case 18 + case 26: + { + resumeNasJobId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + 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 nasAlgorithmSpecCase_ = 0; + private java.lang.Object nasAlgorithmSpec_; + + public NasAlgorithmSpecCase getNasAlgorithmSpecCase() { + return NasAlgorithmSpecCase.forNumber(nasAlgorithmSpecCase_); + } + + public Builder clearNasAlgorithmSpec() { + nasAlgorithmSpecCase_ = 0; + nasAlgorithmSpec_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec, + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.Builder, + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpecOrBuilder> + multiTrialAlgorithmSpecBuilder_; + /** + * + * + *
+     * The spec of multi-trial algorithms.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec multi_trial_algorithm_spec = 2; + * + * + * @return Whether the multiTrialAlgorithmSpec field is set. + */ + @java.lang.Override + public boolean hasMultiTrialAlgorithmSpec() { + return nasAlgorithmSpecCase_ == 2; + } + /** + * + * + *
+     * The spec of multi-trial algorithms.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec multi_trial_algorithm_spec = 2; + * + * + * @return The multiTrialAlgorithmSpec. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + getMultiTrialAlgorithmSpec() { + if (multiTrialAlgorithmSpecBuilder_ == null) { + if (nasAlgorithmSpecCase_ == 2) { + return (com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec) + nasAlgorithmSpec_; + } + return com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .getDefaultInstance(); + } else { + if (nasAlgorithmSpecCase_ == 2) { + return multiTrialAlgorithmSpecBuilder_.getMessage(); + } + return com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .getDefaultInstance(); + } + } + /** + * + * + *
+     * The spec of multi-trial algorithms.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec multi_trial_algorithm_spec = 2; + * + */ + public Builder setMultiTrialAlgorithmSpec( + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec value) { + if (multiTrialAlgorithmSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + nasAlgorithmSpec_ = value; + onChanged(); + } else { + multiTrialAlgorithmSpecBuilder_.setMessage(value); + } + nasAlgorithmSpecCase_ = 2; + return this; + } + /** + * + * + *
+     * The spec of multi-trial algorithms.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec multi_trial_algorithm_spec = 2; + * + */ + public Builder setMultiTrialAlgorithmSpec( + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.Builder + builderForValue) { + if (multiTrialAlgorithmSpecBuilder_ == null) { + nasAlgorithmSpec_ = builderForValue.build(); + onChanged(); + } else { + multiTrialAlgorithmSpecBuilder_.setMessage(builderForValue.build()); + } + nasAlgorithmSpecCase_ = 2; + return this; + } + /** + * + * + *
+     * The spec of multi-trial algorithms.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec multi_trial_algorithm_spec = 2; + * + */ + public Builder mergeMultiTrialAlgorithmSpec( + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec value) { + if (multiTrialAlgorithmSpecBuilder_ == null) { + if (nasAlgorithmSpecCase_ == 2 + && nasAlgorithmSpec_ + != com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .getDefaultInstance()) { + nasAlgorithmSpec_ = + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.newBuilder( + (com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec) + nasAlgorithmSpec_) + .mergeFrom(value) + .buildPartial(); + } else { + nasAlgorithmSpec_ = value; + } + onChanged(); + } else { + if (nasAlgorithmSpecCase_ == 2) { + multiTrialAlgorithmSpecBuilder_.mergeFrom(value); + } else { + multiTrialAlgorithmSpecBuilder_.setMessage(value); + } + } + nasAlgorithmSpecCase_ = 2; + return this; + } + /** + * + * + *
+     * The spec of multi-trial algorithms.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec multi_trial_algorithm_spec = 2; + * + */ + public Builder clearMultiTrialAlgorithmSpec() { + if (multiTrialAlgorithmSpecBuilder_ == null) { + if (nasAlgorithmSpecCase_ == 2) { + nasAlgorithmSpecCase_ = 0; + nasAlgorithmSpec_ = null; + onChanged(); + } + } else { + if (nasAlgorithmSpecCase_ == 2) { + nasAlgorithmSpecCase_ = 0; + nasAlgorithmSpec_ = null; + } + multiTrialAlgorithmSpecBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The spec of multi-trial algorithms.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec multi_trial_algorithm_spec = 2; + * + */ + public com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.Builder + getMultiTrialAlgorithmSpecBuilder() { + return getMultiTrialAlgorithmSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The spec of multi-trial algorithms.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec multi_trial_algorithm_spec = 2; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpecOrBuilder + getMultiTrialAlgorithmSpecOrBuilder() { + if ((nasAlgorithmSpecCase_ == 2) && (multiTrialAlgorithmSpecBuilder_ != null)) { + return multiTrialAlgorithmSpecBuilder_.getMessageOrBuilder(); + } else { + if (nasAlgorithmSpecCase_ == 2) { + return (com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec) + nasAlgorithmSpec_; + } + return com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .getDefaultInstance(); + } + } + /** + * + * + *
+     * The spec of multi-trial algorithms.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec multi_trial_algorithm_spec = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec, + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.Builder, + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpecOrBuilder> + getMultiTrialAlgorithmSpecFieldBuilder() { + if (multiTrialAlgorithmSpecBuilder_ == null) { + if (!(nasAlgorithmSpecCase_ == 2)) { + nasAlgorithmSpec_ = + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + .getDefaultInstance(); + } + multiTrialAlgorithmSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec, + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec.Builder, + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpecOrBuilder>( + (com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec) + nasAlgorithmSpec_, + getParentForChildren(), + isClean()); + nasAlgorithmSpec_ = null; + } + nasAlgorithmSpecCase_ = 2; + onChanged(); + return multiTrialAlgorithmSpecBuilder_; + } + + private java.lang.Object resumeNasJobId_ = ""; + /** + * + * + *
+     * The ID of the existing NasJob in the same Project and Location
+     * which will be used to resume search. search_space_spec and
+     * nas_algorithm_spec are obtained from previous NasJob hence should not
+     * provide them again for this NasJob.
+     * 
+ * + * string resume_nas_job_id = 3; + * + * @return The resumeNasJobId. + */ + public java.lang.String getResumeNasJobId() { + java.lang.Object ref = resumeNasJobId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resumeNasJobId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The ID of the existing NasJob in the same Project and Location
+     * which will be used to resume search. search_space_spec and
+     * nas_algorithm_spec are obtained from previous NasJob hence should not
+     * provide them again for this NasJob.
+     * 
+ * + * string resume_nas_job_id = 3; + * + * @return The bytes for resumeNasJobId. + */ + public com.google.protobuf.ByteString getResumeNasJobIdBytes() { + java.lang.Object ref = resumeNasJobId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resumeNasJobId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The ID of the existing NasJob in the same Project and Location
+     * which will be used to resume search. search_space_spec and
+     * nas_algorithm_spec are obtained from previous NasJob hence should not
+     * provide them again for this NasJob.
+     * 
+ * + * string resume_nas_job_id = 3; + * + * @param value The resumeNasJobId to set. + * @return This builder for chaining. + */ + public Builder setResumeNasJobId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + resumeNasJobId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The ID of the existing NasJob in the same Project and Location
+     * which will be used to resume search. search_space_spec and
+     * nas_algorithm_spec are obtained from previous NasJob hence should not
+     * provide them again for this NasJob.
+     * 
+ * + * string resume_nas_job_id = 3; + * + * @return This builder for chaining. + */ + public Builder clearResumeNasJobId() { + resumeNasJobId_ = getDefaultInstance().getResumeNasJobId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The ID of the existing NasJob in the same Project and Location
+     * which will be used to resume search. search_space_spec and
+     * nas_algorithm_spec are obtained from previous NasJob hence should not
+     * provide them again for this NasJob.
+     * 
+ * + * string resume_nas_job_id = 3; + * + * @param value The bytes for resumeNasJobId to set. + * @return This builder for chaining. + */ + public Builder setResumeNasJobIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + resumeNasJobId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object searchSpaceSpec_ = ""; + /** + * + * + *
+     * It defines the search space for Neural Architecture Search (NAS).
+     * 
+ * + * string search_space_spec = 1; + * + * @return The searchSpaceSpec. + */ + public java.lang.String getSearchSpaceSpec() { + java.lang.Object ref = searchSpaceSpec_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + searchSpaceSpec_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * It defines the search space for Neural Architecture Search (NAS).
+     * 
+ * + * string search_space_spec = 1; + * + * @return The bytes for searchSpaceSpec. + */ + public com.google.protobuf.ByteString getSearchSpaceSpecBytes() { + java.lang.Object ref = searchSpaceSpec_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + searchSpaceSpec_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * It defines the search space for Neural Architecture Search (NAS).
+     * 
+ * + * string search_space_spec = 1; + * + * @param value The searchSpaceSpec to set. + * @return This builder for chaining. + */ + public Builder setSearchSpaceSpec(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + searchSpaceSpec_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * It defines the search space for Neural Architecture Search (NAS).
+     * 
+ * + * string search_space_spec = 1; + * + * @return This builder for chaining. + */ + public Builder clearSearchSpaceSpec() { + searchSpaceSpec_ = getDefaultInstance().getSearchSpaceSpec(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * It defines the search space for Neural Architecture Search (NAS).
+     * 
+ * + * string search_space_spec = 1; + * + * @param value The bytes for searchSpaceSpec to set. + * @return This builder for chaining. + */ + public Builder setSearchSpaceSpecBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + searchSpaceSpec_ = 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.NasJobSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.NasJobSpec) + private static final com.google.cloud.aiplatform.v1beta1.NasJobSpec DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.NasJobSpec(); + } + + public static com.google.cloud.aiplatform.v1beta1.NasJobSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NasJobSpec 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.NasJobSpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NasJobSpecOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NasJobSpecOrBuilder.java new file mode 100644 index 000000000000..03912d8c80bf --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NasJobSpecOrBuilder.java @@ -0,0 +1,127 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/nas_job.proto + +package com.google.cloud.aiplatform.v1beta1; + +public interface NasJobSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.NasJobSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The spec of multi-trial algorithms.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec multi_trial_algorithm_spec = 2; + * + * + * @return Whether the multiTrialAlgorithmSpec field is set. + */ + boolean hasMultiTrialAlgorithmSpec(); + /** + * + * + *
+   * The spec of multi-trial algorithms.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec multi_trial_algorithm_spec = 2; + * + * + * @return The multiTrialAlgorithmSpec. + */ + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec + getMultiTrialAlgorithmSpec(); + /** + * + * + *
+   * The spec of multi-trial algorithms.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpec multi_trial_algorithm_spec = 2; + * + */ + com.google.cloud.aiplatform.v1beta1.NasJobSpec.MultiTrialAlgorithmSpecOrBuilder + getMultiTrialAlgorithmSpecOrBuilder(); + + /** + * + * + *
+   * The ID of the existing NasJob in the same Project and Location
+   * which will be used to resume search. search_space_spec and
+   * nas_algorithm_spec are obtained from previous NasJob hence should not
+   * provide them again for this NasJob.
+   * 
+ * + * string resume_nas_job_id = 3; + * + * @return The resumeNasJobId. + */ + java.lang.String getResumeNasJobId(); + /** + * + * + *
+   * The ID of the existing NasJob in the same Project and Location
+   * which will be used to resume search. search_space_spec and
+   * nas_algorithm_spec are obtained from previous NasJob hence should not
+   * provide them again for this NasJob.
+   * 
+ * + * string resume_nas_job_id = 3; + * + * @return The bytes for resumeNasJobId. + */ + com.google.protobuf.ByteString getResumeNasJobIdBytes(); + + /** + * + * + *
+   * It defines the search space for Neural Architecture Search (NAS).
+   * 
+ * + * string search_space_spec = 1; + * + * @return The searchSpaceSpec. + */ + java.lang.String getSearchSpaceSpec(); + /** + * + * + *
+   * It defines the search space for Neural Architecture Search (NAS).
+   * 
+ * + * string search_space_spec = 1; + * + * @return The bytes for searchSpaceSpec. + */ + com.google.protobuf.ByteString getSearchSpaceSpecBytes(); + + public com.google.cloud.aiplatform.v1beta1.NasJobSpec.NasAlgorithmSpecCase + getNasAlgorithmSpecCase(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NasTrial.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NasTrial.java new file mode 100644 index 000000000000..28f9af9176fa --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NasTrial.java @@ -0,0 +1,1865 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/nas_job.proto + +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Represents a uCAIP NasJob trial.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.NasTrial} + */ +public final class NasTrial extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.NasTrial) + NasTrialOrBuilder { + private static final long serialVersionUID = 0L; + // Use NasTrial.newBuilder() to construct. + private NasTrial(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NasTrial() { + id_ = ""; + state_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NasTrial(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NasJobProto + .internal_static_google_cloud_aiplatform_v1beta1_NasTrial_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NasJobProto + .internal_static_google_cloud_aiplatform_v1beta1_NasTrial_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.NasTrial.class, + com.google.cloud.aiplatform.v1beta1.NasTrial.Builder.class); + } + + /** + * + * + *
+   * Describes a NasTrial state.
+   * 
+ * + * Protobuf enum {@code google.cloud.aiplatform.v1beta1.NasTrial.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The NasTrial state is unspecified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+     * Indicates that a specific NasTrial has been requested, but it has not yet
+     * been suggested by the service.
+     * 
+ * + * REQUESTED = 1; + */ + REQUESTED(1), + /** + * + * + *
+     * Indicates that the NasTrial has been suggested.
+     * 
+ * + * ACTIVE = 2; + */ + ACTIVE(2), + /** + * + * + *
+     * Indicates that the NasTrial should stop according to the service.
+     * 
+ * + * STOPPING = 3; + */ + STOPPING(3), + /** + * + * + *
+     * Indicates that the NasTrial is completed successfully.
+     * 
+ * + * SUCCEEDED = 4; + */ + SUCCEEDED(4), + /** + * + * + *
+     * Indicates that the NasTrial should not be attempted again.
+     * The service will set a NasTrial to INFEASIBLE when it's done but missing
+     * the final_measurement.
+     * 
+ * + * INFEASIBLE = 5; + */ + INFEASIBLE(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The NasTrial state is unspecified.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Indicates that a specific NasTrial has been requested, but it has not yet
+     * been suggested by the service.
+     * 
+ * + * REQUESTED = 1; + */ + public static final int REQUESTED_VALUE = 1; + /** + * + * + *
+     * Indicates that the NasTrial has been suggested.
+     * 
+ * + * ACTIVE = 2; + */ + public static final int ACTIVE_VALUE = 2; + /** + * + * + *
+     * Indicates that the NasTrial should stop according to the service.
+     * 
+ * + * STOPPING = 3; + */ + public static final int STOPPING_VALUE = 3; + /** + * + * + *
+     * Indicates that the NasTrial is completed successfully.
+     * 
+ * + * SUCCEEDED = 4; + */ + public static final int SUCCEEDED_VALUE = 4; + /** + * + * + *
+     * Indicates that the NasTrial should not be attempted again.
+     * The service will set a NasTrial to INFEASIBLE when it's done but missing
+     * the final_measurement.
+     * 
+ * + * INFEASIBLE = 5; + */ + public static final int INFEASIBLE_VALUE = 5; + + 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 REQUESTED; + case 2: + return ACTIVE; + case 3: + return STOPPING; + case 4: + return SUCCEEDED; + case 5: + return INFEASIBLE; + 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.v1beta1.NasTrial.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.v1beta1.NasTrial.State) + } + + public static final int ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + * + * + *
+   * Output only. The identifier of the NasTrial assigned by the service.
+   * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + /** + * + * + *
+   * Output only. The identifier of the NasTrial assigned by the service.
+   * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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 STATE_FIELD_NUMBER = 2; + private int state_ = 0; + /** + * + * + *
+   * Output only. The detailed state of the NasTrial.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasTrial.State state = 2 [(.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 NasTrial.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasTrial.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasTrial.State getState() { + com.google.cloud.aiplatform.v1beta1.NasTrial.State result = + com.google.cloud.aiplatform.v1beta1.NasTrial.State.forNumber(state_); + return result == null + ? com.google.cloud.aiplatform.v1beta1.NasTrial.State.UNRECOGNIZED + : result; + } + + public static final int FINAL_MEASUREMENT_FIELD_NUMBER = 3; + private com.google.cloud.aiplatform.v1beta1.Measurement finalMeasurement_; + /** + * + * + *
+   * Output only. The final measurement containing the objective value.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Measurement final_measurement = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the finalMeasurement field is set. + */ + @java.lang.Override + public boolean hasFinalMeasurement() { + return finalMeasurement_ != null; + } + /** + * + * + *
+   * Output only. The final measurement containing the objective value.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Measurement final_measurement = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The finalMeasurement. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.Measurement getFinalMeasurement() { + return finalMeasurement_ == null + ? com.google.cloud.aiplatform.v1beta1.Measurement.getDefaultInstance() + : finalMeasurement_; + } + /** + * + * + *
+   * Output only. The final measurement containing the objective value.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Measurement final_measurement = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.MeasurementOrBuilder getFinalMeasurementOrBuilder() { + return finalMeasurement_ == null + ? com.google.cloud.aiplatform.v1beta1.Measurement.getDefaultInstance() + : finalMeasurement_; + } + + public static final int START_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp startTime_; + /** + * + * + *
+   * Output only. Time when the NasTrial was started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return startTime_ != null; + } + /** + * + * + *
+   * Output only. Time when the NasTrial was started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 4 [(.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 NasTrial was started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 4 [(.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 = 5; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+   * Output only. Time when the NasTrial's status changed to `SUCCEEDED` or
+   * `INFEASIBLE`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + * + * + *
+   * Output only. Time when the NasTrial's status changed to `SUCCEEDED` or
+   * `INFEASIBLE`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.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 NasTrial's status changed to `SUCCEEDED` or
+   * `INFEASIBLE`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + 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 (state_ + != com.google.cloud.aiplatform.v1beta1.NasTrial.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(2, state_); + } + if (finalMeasurement_ != null) { + output.writeMessage(3, getFinalMeasurement()); + } + if (startTime_ != null) { + output.writeMessage(4, getStartTime()); + } + if (endTime_ != null) { + output.writeMessage(5, getEndTime()); + } + 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 (state_ + != com.google.cloud.aiplatform.v1beta1.NasTrial.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, state_); + } + if (finalMeasurement_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getFinalMeasurement()); + } + if (startTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getStartTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getEndTime()); + } + 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.NasTrial)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.NasTrial other = + (com.google.cloud.aiplatform.v1beta1.NasTrial) obj; + + if (!getId().equals(other.getId())) return false; + if (state_ != other.state_) return false; + if (hasFinalMeasurement() != other.hasFinalMeasurement()) return false; + if (hasFinalMeasurement()) { + if (!getFinalMeasurement().equals(other.getFinalMeasurement())) 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 (!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) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (hasFinalMeasurement()) { + hash = (37 * hash) + FINAL_MEASUREMENT_FIELD_NUMBER; + hash = (53 * hash) + getFinalMeasurement().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(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.NasTrial parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.NasTrial 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.NasTrial parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.NasTrial 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.NasTrial parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.NasTrial 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.NasTrial parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.NasTrial 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.NasTrial parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.NasTrial 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.NasTrial 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.NasTrial 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.NasTrial 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 uCAIP NasJob trial.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.NasTrial} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.NasTrial) + com.google.cloud.aiplatform.v1beta1.NasTrialOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NasJobProto + .internal_static_google_cloud_aiplatform_v1beta1_NasTrial_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NasJobProto + .internal_static_google_cloud_aiplatform_v1beta1_NasTrial_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.NasTrial.class, + com.google.cloud.aiplatform.v1beta1.NasTrial.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.NasTrial.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + state_ = 0; + finalMeasurement_ = null; + if (finalMeasurementBuilder_ != null) { + finalMeasurementBuilder_.dispose(); + finalMeasurementBuilder_ = null; + } + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.NasJobProto + .internal_static_google_cloud_aiplatform_v1beta1_NasTrial_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasTrial getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.NasTrial.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasTrial build() { + com.google.cloud.aiplatform.v1beta1.NasTrial result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasTrial buildPartial() { + com.google.cloud.aiplatform.v1beta1.NasTrial result = + new com.google.cloud.aiplatform.v1beta1.NasTrial(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.NasTrial result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.finalMeasurement_ = + finalMeasurementBuilder_ == null ? finalMeasurement_ : finalMeasurementBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.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.NasTrial) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.NasTrial) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.NasTrial other) { + if (other == com.google.cloud.aiplatform.v1beta1.NasTrial.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.hasFinalMeasurement()) { + mergeFinalMeasurement(other.getFinalMeasurement()); + } + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + 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 16: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + input.readMessage( + getFinalMeasurementFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage(getEndTimeFieldBuilder().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 id_ = ""; + /** + * + * + *
+     * Output only. The identifier of the NasTrial assigned by the service.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + /** + * + * + *
+     * Output only. The identifier of the NasTrial assigned by the service.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + /** + * + * + *
+     * Output only. The identifier of the NasTrial assigned by the service.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + /** + * + * + *
+     * Output only. The identifier of the NasTrial assigned by the service.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The identifier of the NasTrial assigned by the service.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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 int state_ = 0; + /** + * + * + *
+     * Output only. The detailed state of the NasTrial.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasTrial.State state = 2 [(.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 NasTrial.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasTrial.State state = 2 [(.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_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The detailed state of the NasTrial.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasTrial.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasTrial.State getState() { + com.google.cloud.aiplatform.v1beta1.NasTrial.State result = + com.google.cloud.aiplatform.v1beta1.NasTrial.State.forNumber(state_); + return result == null + ? com.google.cloud.aiplatform.v1beta1.NasTrial.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. The detailed state of the NasTrial.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasTrial.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState(com.google.cloud.aiplatform.v1beta1.NasTrial.State value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The detailed state of the NasTrial.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasTrial.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000002); + state_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1beta1.Measurement finalMeasurement_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.Measurement, + com.google.cloud.aiplatform.v1beta1.Measurement.Builder, + com.google.cloud.aiplatform.v1beta1.MeasurementOrBuilder> + finalMeasurementBuilder_; + /** + * + * + *
+     * Output only. The final measurement containing the objective value.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Measurement final_measurement = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the finalMeasurement field is set. + */ + public boolean hasFinalMeasurement() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Output only. The final measurement containing the objective value.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Measurement final_measurement = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The finalMeasurement. + */ + public com.google.cloud.aiplatform.v1beta1.Measurement getFinalMeasurement() { + if (finalMeasurementBuilder_ == null) { + return finalMeasurement_ == null + ? com.google.cloud.aiplatform.v1beta1.Measurement.getDefaultInstance() + : finalMeasurement_; + } else { + return finalMeasurementBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The final measurement containing the objective value.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Measurement final_measurement = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setFinalMeasurement(com.google.cloud.aiplatform.v1beta1.Measurement value) { + if (finalMeasurementBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + finalMeasurement_ = value; + } else { + finalMeasurementBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The final measurement containing the objective value.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Measurement final_measurement = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setFinalMeasurement( + com.google.cloud.aiplatform.v1beta1.Measurement.Builder builderForValue) { + if (finalMeasurementBuilder_ == null) { + finalMeasurement_ = builderForValue.build(); + } else { + finalMeasurementBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The final measurement containing the objective value.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Measurement final_measurement = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeFinalMeasurement(com.google.cloud.aiplatform.v1beta1.Measurement value) { + if (finalMeasurementBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && finalMeasurement_ != null + && finalMeasurement_ + != com.google.cloud.aiplatform.v1beta1.Measurement.getDefaultInstance()) { + getFinalMeasurementBuilder().mergeFrom(value); + } else { + finalMeasurement_ = value; + } + } else { + finalMeasurementBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The final measurement containing the objective value.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Measurement final_measurement = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearFinalMeasurement() { + bitField0_ = (bitField0_ & ~0x00000004); + finalMeasurement_ = null; + if (finalMeasurementBuilder_ != null) { + finalMeasurementBuilder_.dispose(); + finalMeasurementBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The final measurement containing the objective value.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Measurement final_measurement = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1beta1.Measurement.Builder getFinalMeasurementBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getFinalMeasurementFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The final measurement containing the objective value.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Measurement final_measurement = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.aiplatform.v1beta1.MeasurementOrBuilder getFinalMeasurementOrBuilder() { + if (finalMeasurementBuilder_ != null) { + return finalMeasurementBuilder_.getMessageOrBuilder(); + } else { + return finalMeasurement_ == null + ? com.google.cloud.aiplatform.v1beta1.Measurement.getDefaultInstance() + : finalMeasurement_; + } + } + /** + * + * + *
+     * Output only. The final measurement containing the objective value.
+     * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Measurement final_measurement = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.Measurement, + com.google.cloud.aiplatform.v1beta1.Measurement.Builder, + com.google.cloud.aiplatform.v1beta1.MeasurementOrBuilder> + getFinalMeasurementFieldBuilder() { + if (finalMeasurementBuilder_ == null) { + finalMeasurementBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.Measurement, + com.google.cloud.aiplatform.v1beta1.Measurement.Builder, + com.google.cloud.aiplatform.v1beta1.MeasurementOrBuilder>( + getFinalMeasurement(), getParentForChildren(), isClean()); + finalMeasurement_ = null; + } + return finalMeasurementBuilder_; + } + + 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 NasTrial was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Output only. Time when the NasTrial was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4 [(.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 NasTrial was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4 [(.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_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the NasTrial was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4 [(.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_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the NasTrial was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && startTime_ != null + && startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getStartTimeBuilder().mergeFrom(value); + } else { + startTime_ = value; + } + } else { + startTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the NasTrial was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearStartTime() { + bitField0_ = (bitField0_ & ~0x00000008); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the NasTrial was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when the NasTrial was started.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4 [(.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 NasTrial was started.
+     * 
+ * + * .google.protobuf.Timestamp start_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> + 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 NasTrial's status changed to `SUCCEEDED` or
+     * `INFEASIBLE`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Output only. Time when the NasTrial's status changed to `SUCCEEDED` or
+     * `INFEASIBLE`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.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 NasTrial's status changed to `SUCCEEDED` or
+     * `INFEASIBLE`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.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_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the NasTrial's status changed to `SUCCEEDED` or
+     * `INFEASIBLE`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.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_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the NasTrial's status changed to `SUCCEEDED` or
+     * `INFEASIBLE`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && endTime_ != null + && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the NasTrial's status changed to `SUCCEEDED` or
+     * `INFEASIBLE`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000010); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Time when the NasTrial's status changed to `SUCCEEDED` or
+     * `INFEASIBLE`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Time when the NasTrial's status changed to `SUCCEEDED` or
+     * `INFEASIBLE`.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.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 NasTrial's status changed to `SUCCEEDED` or
+     * `INFEASIBLE`.
+     * 
+ * + * .google.protobuf.Timestamp end_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> + 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_; + } + + @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.NasTrial) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.NasTrial) + private static final com.google.cloud.aiplatform.v1beta1.NasTrial DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.NasTrial(); + } + + public static com.google.cloud.aiplatform.v1beta1.NasTrial getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NasTrial 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.NasTrial getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NasTrialDetail.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NasTrialDetail.java new file mode 100644 index 000000000000..3ec675cbff30 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NasTrialDetail.java @@ -0,0 +1,1392 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/nas_job.proto + +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Represents a NasTrial details along with it's parameters. If there is a
+ * corresponding train NasTrial, the train NasTrial is also returned.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.NasTrialDetail} + */ +public final class NasTrialDetail extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.NasTrialDetail) + NasTrialDetailOrBuilder { + private static final long serialVersionUID = 0L; + // Use NasTrialDetail.newBuilder() to construct. + private NasTrialDetail(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NasTrialDetail() { + name_ = ""; + parameters_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NasTrialDetail(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NasJobProto + .internal_static_google_cloud_aiplatform_v1beta1_NasTrialDetail_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NasJobProto + .internal_static_google_cloud_aiplatform_v1beta1_NasTrialDetail_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.NasTrialDetail.class, + com.google.cloud.aiplatform.v1beta1.NasTrialDetail.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Output only. Resource name of the NasTrialDetail.
+   * 
+ * + * 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. Resource name of the NasTrialDetail.
+   * 
+ * + * 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 PARAMETERS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object parameters_ = ""; + /** + * + * + *
+   * The parameters for the NasJob NasTrial.
+   * 
+ * + * string parameters = 2; + * + * @return The parameters. + */ + @java.lang.Override + public java.lang.String getParameters() { + java.lang.Object ref = parameters_; + 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(); + parameters_ = s; + return s; + } + } + /** + * + * + *
+   * The parameters for the NasJob NasTrial.
+   * 
+ * + * string parameters = 2; + * + * @return The bytes for parameters. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParametersBytes() { + java.lang.Object ref = parameters_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parameters_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SEARCH_TRIAL_FIELD_NUMBER = 3; + private com.google.cloud.aiplatform.v1beta1.NasTrial searchTrial_; + /** + * + * + *
+   * The requested search NasTrial.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.NasTrial search_trial = 3; + * + * @return Whether the searchTrial field is set. + */ + @java.lang.Override + public boolean hasSearchTrial() { + return searchTrial_ != null; + } + /** + * + * + *
+   * The requested search NasTrial.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.NasTrial search_trial = 3; + * + * @return The searchTrial. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasTrial getSearchTrial() { + return searchTrial_ == null + ? com.google.cloud.aiplatform.v1beta1.NasTrial.getDefaultInstance() + : searchTrial_; + } + /** + * + * + *
+   * The requested search NasTrial.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.NasTrial search_trial = 3; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasTrialOrBuilder getSearchTrialOrBuilder() { + return searchTrial_ == null + ? com.google.cloud.aiplatform.v1beta1.NasTrial.getDefaultInstance() + : searchTrial_; + } + + public static final int TRAIN_TRIAL_FIELD_NUMBER = 4; + private com.google.cloud.aiplatform.v1beta1.NasTrial trainTrial_; + /** + * + * + *
+   * The train NasTrial corresponding to
+   * [search_trial][google.cloud.aiplatform.v1beta1.NasTrialDetail.search_trial].
+   * Only populated if
+   * [search_trial][google.cloud.aiplatform.v1beta1.NasTrialDetail.search_trial]
+   * is used for training.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.NasTrial train_trial = 4; + * + * @return Whether the trainTrial field is set. + */ + @java.lang.Override + public boolean hasTrainTrial() { + return trainTrial_ != null; + } + /** + * + * + *
+   * The train NasTrial corresponding to
+   * [search_trial][google.cloud.aiplatform.v1beta1.NasTrialDetail.search_trial].
+   * Only populated if
+   * [search_trial][google.cloud.aiplatform.v1beta1.NasTrialDetail.search_trial]
+   * is used for training.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.NasTrial train_trial = 4; + * + * @return The trainTrial. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasTrial getTrainTrial() { + return trainTrial_ == null + ? com.google.cloud.aiplatform.v1beta1.NasTrial.getDefaultInstance() + : trainTrial_; + } + /** + * + * + *
+   * The train NasTrial corresponding to
+   * [search_trial][google.cloud.aiplatform.v1beta1.NasTrialDetail.search_trial].
+   * Only populated if
+   * [search_trial][google.cloud.aiplatform.v1beta1.NasTrialDetail.search_trial]
+   * is used for training.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.NasTrial train_trial = 4; + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasTrialOrBuilder getTrainTrialOrBuilder() { + return trainTrial_ == null + ? com.google.cloud.aiplatform.v1beta1.NasTrial.getDefaultInstance() + : trainTrial_; + } + + 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(parameters_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, parameters_); + } + if (searchTrial_ != null) { + output.writeMessage(3, getSearchTrial()); + } + if (trainTrial_ != null) { + output.writeMessage(4, getTrainTrial()); + } + 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(parameters_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, parameters_); + } + if (searchTrial_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getSearchTrial()); + } + if (trainTrial_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getTrainTrial()); + } + 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.NasTrialDetail)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.NasTrialDetail other = + (com.google.cloud.aiplatform.v1beta1.NasTrialDetail) obj; + + if (!getName().equals(other.getName())) return false; + if (!getParameters().equals(other.getParameters())) return false; + if (hasSearchTrial() != other.hasSearchTrial()) return false; + if (hasSearchTrial()) { + if (!getSearchTrial().equals(other.getSearchTrial())) return false; + } + if (hasTrainTrial() != other.hasTrainTrial()) return false; + if (hasTrainTrial()) { + if (!getTrainTrial().equals(other.getTrainTrial())) 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) + PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getParameters().hashCode(); + if (hasSearchTrial()) { + hash = (37 * hash) + SEARCH_TRIAL_FIELD_NUMBER; + hash = (53 * hash) + getSearchTrial().hashCode(); + } + if (hasTrainTrial()) { + hash = (37 * hash) + TRAIN_TRIAL_FIELD_NUMBER; + hash = (53 * hash) + getTrainTrial().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.NasTrialDetail parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.NasTrialDetail 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.NasTrialDetail parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.NasTrialDetail 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.NasTrialDetail parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.NasTrialDetail 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.NasTrialDetail parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.NasTrialDetail 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.NasTrialDetail parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.NasTrialDetail 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.NasTrialDetail 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.NasTrialDetail 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.NasTrialDetail 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 NasTrial details along with it's parameters. If there is a
+   * corresponding train NasTrial, the train NasTrial is also returned.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.NasTrialDetail} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.NasTrialDetail) + com.google.cloud.aiplatform.v1beta1.NasTrialDetailOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.NasJobProto + .internal_static_google_cloud_aiplatform_v1beta1_NasTrialDetail_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.NasJobProto + .internal_static_google_cloud_aiplatform_v1beta1_NasTrialDetail_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.NasTrialDetail.class, + com.google.cloud.aiplatform.v1beta1.NasTrialDetail.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.NasTrialDetail.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + parameters_ = ""; + searchTrial_ = null; + if (searchTrialBuilder_ != null) { + searchTrialBuilder_.dispose(); + searchTrialBuilder_ = null; + } + trainTrial_ = null; + if (trainTrialBuilder_ != null) { + trainTrialBuilder_.dispose(); + trainTrialBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.NasJobProto + .internal_static_google_cloud_aiplatform_v1beta1_NasTrialDetail_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasTrialDetail getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.NasTrialDetail.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasTrialDetail build() { + com.google.cloud.aiplatform.v1beta1.NasTrialDetail result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.NasTrialDetail buildPartial() { + com.google.cloud.aiplatform.v1beta1.NasTrialDetail result = + new com.google.cloud.aiplatform.v1beta1.NasTrialDetail(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.aiplatform.v1beta1.NasTrialDetail result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.parameters_ = parameters_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.searchTrial_ = + searchTrialBuilder_ == null ? searchTrial_ : searchTrialBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.trainTrial_ = trainTrialBuilder_ == null ? trainTrial_ : trainTrialBuilder_.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.NasTrialDetail) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.NasTrialDetail) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.NasTrialDetail other) { + if (other == com.google.cloud.aiplatform.v1beta1.NasTrialDetail.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getParameters().isEmpty()) { + parameters_ = other.parameters_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasSearchTrial()) { + mergeSearchTrial(other.getSearchTrial()); + } + if (other.hasTrainTrial()) { + mergeTrainTrial(other.getTrainTrial()); + } + 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: + { + parameters_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getSearchTrialFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(getTrainTrialFieldBuilder().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 name_ = ""; + /** + * + * + *
+     * Output only. Resource name of the NasTrialDetail.
+     * 
+ * + * 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. Resource name of the NasTrialDetail.
+     * 
+ * + * 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. Resource name of the NasTrialDetail.
+     * 
+ * + * 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. Resource name of the NasTrialDetail.
+     * 
+ * + * 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. Resource name of the NasTrialDetail.
+     * 
+ * + * 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 parameters_ = ""; + /** + * + * + *
+     * The parameters for the NasJob NasTrial.
+     * 
+ * + * string parameters = 2; + * + * @return The parameters. + */ + public java.lang.String getParameters() { + java.lang.Object ref = parameters_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parameters_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The parameters for the NasJob NasTrial.
+     * 
+ * + * string parameters = 2; + * + * @return The bytes for parameters. + */ + public com.google.protobuf.ByteString getParametersBytes() { + java.lang.Object ref = parameters_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parameters_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The parameters for the NasJob NasTrial.
+     * 
+ * + * string parameters = 2; + * + * @param value The parameters to set. + * @return This builder for chaining. + */ + public Builder setParameters(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parameters_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The parameters for the NasJob NasTrial.
+     * 
+ * + * string parameters = 2; + * + * @return This builder for chaining. + */ + public Builder clearParameters() { + parameters_ = getDefaultInstance().getParameters(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The parameters for the NasJob NasTrial.
+     * 
+ * + * string parameters = 2; + * + * @param value The bytes for parameters to set. + * @return This builder for chaining. + */ + public Builder setParametersBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parameters_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.aiplatform.v1beta1.NasTrial searchTrial_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NasTrial, + com.google.cloud.aiplatform.v1beta1.NasTrial.Builder, + com.google.cloud.aiplatform.v1beta1.NasTrialOrBuilder> + searchTrialBuilder_; + /** + * + * + *
+     * The requested search NasTrial.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.NasTrial search_trial = 3; + * + * @return Whether the searchTrial field is set. + */ + public boolean hasSearchTrial() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * The requested search NasTrial.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.NasTrial search_trial = 3; + * + * @return The searchTrial. + */ + public com.google.cloud.aiplatform.v1beta1.NasTrial getSearchTrial() { + if (searchTrialBuilder_ == null) { + return searchTrial_ == null + ? com.google.cloud.aiplatform.v1beta1.NasTrial.getDefaultInstance() + : searchTrial_; + } else { + return searchTrialBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The requested search NasTrial.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.NasTrial search_trial = 3; + */ + public Builder setSearchTrial(com.google.cloud.aiplatform.v1beta1.NasTrial value) { + if (searchTrialBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + searchTrial_ = value; + } else { + searchTrialBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The requested search NasTrial.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.NasTrial search_trial = 3; + */ + public Builder setSearchTrial( + com.google.cloud.aiplatform.v1beta1.NasTrial.Builder builderForValue) { + if (searchTrialBuilder_ == null) { + searchTrial_ = builderForValue.build(); + } else { + searchTrialBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The requested search NasTrial.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.NasTrial search_trial = 3; + */ + public Builder mergeSearchTrial(com.google.cloud.aiplatform.v1beta1.NasTrial value) { + if (searchTrialBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && searchTrial_ != null + && searchTrial_ != com.google.cloud.aiplatform.v1beta1.NasTrial.getDefaultInstance()) { + getSearchTrialBuilder().mergeFrom(value); + } else { + searchTrial_ = value; + } + } else { + searchTrialBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The requested search NasTrial.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.NasTrial search_trial = 3; + */ + public Builder clearSearchTrial() { + bitField0_ = (bitField0_ & ~0x00000004); + searchTrial_ = null; + if (searchTrialBuilder_ != null) { + searchTrialBuilder_.dispose(); + searchTrialBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The requested search NasTrial.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.NasTrial search_trial = 3; + */ + public com.google.cloud.aiplatform.v1beta1.NasTrial.Builder getSearchTrialBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getSearchTrialFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The requested search NasTrial.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.NasTrial search_trial = 3; + */ + public com.google.cloud.aiplatform.v1beta1.NasTrialOrBuilder getSearchTrialOrBuilder() { + if (searchTrialBuilder_ != null) { + return searchTrialBuilder_.getMessageOrBuilder(); + } else { + return searchTrial_ == null + ? com.google.cloud.aiplatform.v1beta1.NasTrial.getDefaultInstance() + : searchTrial_; + } + } + /** + * + * + *
+     * The requested search NasTrial.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.NasTrial search_trial = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NasTrial, + com.google.cloud.aiplatform.v1beta1.NasTrial.Builder, + com.google.cloud.aiplatform.v1beta1.NasTrialOrBuilder> + getSearchTrialFieldBuilder() { + if (searchTrialBuilder_ == null) { + searchTrialBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NasTrial, + com.google.cloud.aiplatform.v1beta1.NasTrial.Builder, + com.google.cloud.aiplatform.v1beta1.NasTrialOrBuilder>( + getSearchTrial(), getParentForChildren(), isClean()); + searchTrial_ = null; + } + return searchTrialBuilder_; + } + + private com.google.cloud.aiplatform.v1beta1.NasTrial trainTrial_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NasTrial, + com.google.cloud.aiplatform.v1beta1.NasTrial.Builder, + com.google.cloud.aiplatform.v1beta1.NasTrialOrBuilder> + trainTrialBuilder_; + /** + * + * + *
+     * The train NasTrial corresponding to
+     * [search_trial][google.cloud.aiplatform.v1beta1.NasTrialDetail.search_trial].
+     * Only populated if
+     * [search_trial][google.cloud.aiplatform.v1beta1.NasTrialDetail.search_trial]
+     * is used for training.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.NasTrial train_trial = 4; + * + * @return Whether the trainTrial field is set. + */ + public boolean hasTrainTrial() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * The train NasTrial corresponding to
+     * [search_trial][google.cloud.aiplatform.v1beta1.NasTrialDetail.search_trial].
+     * Only populated if
+     * [search_trial][google.cloud.aiplatform.v1beta1.NasTrialDetail.search_trial]
+     * is used for training.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.NasTrial train_trial = 4; + * + * @return The trainTrial. + */ + public com.google.cloud.aiplatform.v1beta1.NasTrial getTrainTrial() { + if (trainTrialBuilder_ == null) { + return trainTrial_ == null + ? com.google.cloud.aiplatform.v1beta1.NasTrial.getDefaultInstance() + : trainTrial_; + } else { + return trainTrialBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The train NasTrial corresponding to
+     * [search_trial][google.cloud.aiplatform.v1beta1.NasTrialDetail.search_trial].
+     * Only populated if
+     * [search_trial][google.cloud.aiplatform.v1beta1.NasTrialDetail.search_trial]
+     * is used for training.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.NasTrial train_trial = 4; + */ + public Builder setTrainTrial(com.google.cloud.aiplatform.v1beta1.NasTrial value) { + if (trainTrialBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + trainTrial_ = value; + } else { + trainTrialBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The train NasTrial corresponding to
+     * [search_trial][google.cloud.aiplatform.v1beta1.NasTrialDetail.search_trial].
+     * Only populated if
+     * [search_trial][google.cloud.aiplatform.v1beta1.NasTrialDetail.search_trial]
+     * is used for training.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.NasTrial train_trial = 4; + */ + public Builder setTrainTrial( + com.google.cloud.aiplatform.v1beta1.NasTrial.Builder builderForValue) { + if (trainTrialBuilder_ == null) { + trainTrial_ = builderForValue.build(); + } else { + trainTrialBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The train NasTrial corresponding to
+     * [search_trial][google.cloud.aiplatform.v1beta1.NasTrialDetail.search_trial].
+     * Only populated if
+     * [search_trial][google.cloud.aiplatform.v1beta1.NasTrialDetail.search_trial]
+     * is used for training.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.NasTrial train_trial = 4; + */ + public Builder mergeTrainTrial(com.google.cloud.aiplatform.v1beta1.NasTrial value) { + if (trainTrialBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && trainTrial_ != null + && trainTrial_ != com.google.cloud.aiplatform.v1beta1.NasTrial.getDefaultInstance()) { + getTrainTrialBuilder().mergeFrom(value); + } else { + trainTrial_ = value; + } + } else { + trainTrialBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The train NasTrial corresponding to
+     * [search_trial][google.cloud.aiplatform.v1beta1.NasTrialDetail.search_trial].
+     * Only populated if
+     * [search_trial][google.cloud.aiplatform.v1beta1.NasTrialDetail.search_trial]
+     * is used for training.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.NasTrial train_trial = 4; + */ + public Builder clearTrainTrial() { + bitField0_ = (bitField0_ & ~0x00000008); + trainTrial_ = null; + if (trainTrialBuilder_ != null) { + trainTrialBuilder_.dispose(); + trainTrialBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The train NasTrial corresponding to
+     * [search_trial][google.cloud.aiplatform.v1beta1.NasTrialDetail.search_trial].
+     * Only populated if
+     * [search_trial][google.cloud.aiplatform.v1beta1.NasTrialDetail.search_trial]
+     * is used for training.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.NasTrial train_trial = 4; + */ + public com.google.cloud.aiplatform.v1beta1.NasTrial.Builder getTrainTrialBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getTrainTrialFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The train NasTrial corresponding to
+     * [search_trial][google.cloud.aiplatform.v1beta1.NasTrialDetail.search_trial].
+     * Only populated if
+     * [search_trial][google.cloud.aiplatform.v1beta1.NasTrialDetail.search_trial]
+     * is used for training.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.NasTrial train_trial = 4; + */ + public com.google.cloud.aiplatform.v1beta1.NasTrialOrBuilder getTrainTrialOrBuilder() { + if (trainTrialBuilder_ != null) { + return trainTrialBuilder_.getMessageOrBuilder(); + } else { + return trainTrial_ == null + ? com.google.cloud.aiplatform.v1beta1.NasTrial.getDefaultInstance() + : trainTrial_; + } + } + /** + * + * + *
+     * The train NasTrial corresponding to
+     * [search_trial][google.cloud.aiplatform.v1beta1.NasTrialDetail.search_trial].
+     * Only populated if
+     * [search_trial][google.cloud.aiplatform.v1beta1.NasTrialDetail.search_trial]
+     * is used for training.
+     * 
+ * + * .google.cloud.aiplatform.v1beta1.NasTrial train_trial = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NasTrial, + com.google.cloud.aiplatform.v1beta1.NasTrial.Builder, + com.google.cloud.aiplatform.v1beta1.NasTrialOrBuilder> + getTrainTrialFieldBuilder() { + if (trainTrialBuilder_ == null) { + trainTrialBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.NasTrial, + com.google.cloud.aiplatform.v1beta1.NasTrial.Builder, + com.google.cloud.aiplatform.v1beta1.NasTrialOrBuilder>( + getTrainTrial(), getParentForChildren(), isClean()); + trainTrial_ = null; + } + return trainTrialBuilder_; + } + + @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.NasTrialDetail) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.NasTrialDetail) + private static final com.google.cloud.aiplatform.v1beta1.NasTrialDetail DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.NasTrialDetail(); + } + + public static com.google.cloud.aiplatform.v1beta1.NasTrialDetail getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NasTrialDetail 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.NasTrialDetail getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NasTrialDetailName.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NasTrialDetailName.java new file mode 100644 index 000000000000..41e72a479bac --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NasTrialDetailName.java @@ -0,0 +1,269 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY 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 NasTrialDetailName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_NAS_JOB_NAS_TRIAL_DETAIL = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String nasJob; + private final String nasTrialDetail; + + @Deprecated + protected NasTrialDetailName() { + project = null; + location = null; + nasJob = null; + nasTrialDetail = null; + } + + private NasTrialDetailName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + nasJob = Preconditions.checkNotNull(builder.getNasJob()); + nasTrialDetail = Preconditions.checkNotNull(builder.getNasTrialDetail()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getNasJob() { + return nasJob; + } + + public String getNasTrialDetail() { + return nasTrialDetail; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static NasTrialDetailName of( + String project, String location, String nasJob, String nasTrialDetail) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setNasJob(nasJob) + .setNasTrialDetail(nasTrialDetail) + .build(); + } + + public static String format( + String project, String location, String nasJob, String nasTrialDetail) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setNasJob(nasJob) + .setNasTrialDetail(nasTrialDetail) + .build() + .toString(); + } + + public static NasTrialDetailName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_NAS_JOB_NAS_TRIAL_DETAIL.validatedMatch( + formattedString, "NasTrialDetailName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("nas_job"), + matchMap.get("nas_trial_detail")); + } + + 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 (NasTrialDetailName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_NAS_JOB_NAS_TRIAL_DETAIL.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 (nasJob != null) { + fieldMapBuilder.put("nas_job", nasJob); + } + if (nasTrialDetail != null) { + fieldMapBuilder.put("nas_trial_detail", nasTrialDetail); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_NAS_JOB_NAS_TRIAL_DETAIL.instantiate( + "project", + project, + "location", + location, + "nas_job", + nasJob, + "nas_trial_detail", + nasTrialDetail); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + NasTrialDetailName that = ((NasTrialDetailName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.nasJob, that.nasJob) + && Objects.equals(this.nasTrialDetail, that.nasTrialDetail); + } + 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(nasJob); + h *= 1000003; + h ^= Objects.hashCode(nasTrialDetail); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}. + */ + public static class Builder { + private String project; + private String location; + private String nasJob; + private String nasTrialDetail; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getNasJob() { + return nasJob; + } + + public String getNasTrialDetail() { + return nasTrialDetail; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setNasJob(String nasJob) { + this.nasJob = nasJob; + return this; + } + + public Builder setNasTrialDetail(String nasTrialDetail) { + this.nasTrialDetail = nasTrialDetail; + return this; + } + + private Builder(NasTrialDetailName nasTrialDetailName) { + this.project = nasTrialDetailName.project; + this.location = nasTrialDetailName.location; + this.nasJob = nasTrialDetailName.nasJob; + this.nasTrialDetail = nasTrialDetailName.nasTrialDetail; + } + + public NasTrialDetailName build() { + return new NasTrialDetailName(this); + } + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NasTrialDetailOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NasTrialDetailOrBuilder.java new file mode 100644 index 000000000000..24c21855d0e8 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NasTrialDetailOrBuilder.java @@ -0,0 +1,157 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/nas_job.proto + +package com.google.cloud.aiplatform.v1beta1; + +public interface NasTrialDetailOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.NasTrialDetail) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Resource name of the NasTrialDetail.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Resource name of the NasTrialDetail.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * The parameters for the NasJob NasTrial.
+   * 
+ * + * string parameters = 2; + * + * @return The parameters. + */ + java.lang.String getParameters(); + /** + * + * + *
+   * The parameters for the NasJob NasTrial.
+   * 
+ * + * string parameters = 2; + * + * @return The bytes for parameters. + */ + com.google.protobuf.ByteString getParametersBytes(); + + /** + * + * + *
+   * The requested search NasTrial.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.NasTrial search_trial = 3; + * + * @return Whether the searchTrial field is set. + */ + boolean hasSearchTrial(); + /** + * + * + *
+   * The requested search NasTrial.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.NasTrial search_trial = 3; + * + * @return The searchTrial. + */ + com.google.cloud.aiplatform.v1beta1.NasTrial getSearchTrial(); + /** + * + * + *
+   * The requested search NasTrial.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.NasTrial search_trial = 3; + */ + com.google.cloud.aiplatform.v1beta1.NasTrialOrBuilder getSearchTrialOrBuilder(); + + /** + * + * + *
+   * The train NasTrial corresponding to
+   * [search_trial][google.cloud.aiplatform.v1beta1.NasTrialDetail.search_trial].
+   * Only populated if
+   * [search_trial][google.cloud.aiplatform.v1beta1.NasTrialDetail.search_trial]
+   * is used for training.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.NasTrial train_trial = 4; + * + * @return Whether the trainTrial field is set. + */ + boolean hasTrainTrial(); + /** + * + * + *
+   * The train NasTrial corresponding to
+   * [search_trial][google.cloud.aiplatform.v1beta1.NasTrialDetail.search_trial].
+   * Only populated if
+   * [search_trial][google.cloud.aiplatform.v1beta1.NasTrialDetail.search_trial]
+   * is used for training.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.NasTrial train_trial = 4; + * + * @return The trainTrial. + */ + com.google.cloud.aiplatform.v1beta1.NasTrial getTrainTrial(); + /** + * + * + *
+   * The train NasTrial corresponding to
+   * [search_trial][google.cloud.aiplatform.v1beta1.NasTrialDetail.search_trial].
+   * Only populated if
+   * [search_trial][google.cloud.aiplatform.v1beta1.NasTrialDetail.search_trial]
+   * is used for training.
+   * 
+ * + * .google.cloud.aiplatform.v1beta1.NasTrial train_trial = 4; + */ + com.google.cloud.aiplatform.v1beta1.NasTrialOrBuilder getTrainTrialOrBuilder(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NasTrialOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NasTrialOrBuilder.java new file mode 100644 index 000000000000..b7abde1bea66 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/NasTrialOrBuilder.java @@ -0,0 +1,199 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/nas_job.proto + +package com.google.cloud.aiplatform.v1beta1; + +public interface NasTrialOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.NasTrial) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The identifier of the NasTrial assigned by the service.
+   * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+   * Output only. The identifier of the NasTrial assigned by the service.
+   * 
+ * + * string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + + /** + * + * + *
+   * Output only. The detailed state of the NasTrial.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasTrial.State state = 2 [(.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 NasTrial.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.NasTrial.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.aiplatform.v1beta1.NasTrial.State getState(); + + /** + * + * + *
+   * Output only. The final measurement containing the objective value.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Measurement final_measurement = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the finalMeasurement field is set. + */ + boolean hasFinalMeasurement(); + /** + * + * + *
+   * Output only. The final measurement containing the objective value.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Measurement final_measurement = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The finalMeasurement. + */ + com.google.cloud.aiplatform.v1beta1.Measurement getFinalMeasurement(); + /** + * + * + *
+   * Output only. The final measurement containing the objective value.
+   * 
+ * + * + * .google.cloud.aiplatform.v1beta1.Measurement final_measurement = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.aiplatform.v1beta1.MeasurementOrBuilder getFinalMeasurementOrBuilder(); + + /** + * + * + *
+   * Output only. Time when the NasTrial was started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + * + * + *
+   * Output only. Time when the NasTrial was started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + * + * + *
+   * Output only. Time when the NasTrial was started.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time when the NasTrial's status changed to `SUCCEEDED` or
+   * `INFEASIBLE`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+   * Output only. Time when the NasTrial's status changed to `SUCCEEDED` or
+   * `INFEASIBLE`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * Output only. Time when the NasTrial's status changed to `SUCCEEDED` or
+   * `INFEASIBLE`.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Pipeline.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Pipeline.java index eaf76ce16b6d..34c4f666d3a1 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Pipeline.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/Pipeline.java @@ -210,29 +210,30 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ED\020\000\022\013\n\007PENDING\020\001\022\013\n\007RUNNING\020\002\022\r\n\tSUCCEE" + "DED\020\003\022\022\n\016CANCEL_PENDING\020\004\022\016\n\nCANCELLING\020" + "\005\022\r\n\tCANCELLED\020\006\022\n\n\006FAILED\020\007\022\013\n\007SKIPPED\020" - + "\010\022\021\n\rNOT_TRIGGERED\020\t\"\301\004\n\032PipelineTaskExe" + + "\010\022\021\n\rNOT_TRIGGERED\020\t\"\325\004\n\032PipelineTaskExe" + "cutorDetail\022l\n\020container_detail\030\001 \001(\0132K." + "google.cloud.aiplatform.v1beta1.Pipeline" + "TaskExecutorDetail.ContainerDetailB\003\340A\003H" - + "\000\022o\n\021custom_job_detail\030\002 \001(\0132K.google.cl" + + "\000\022m\n\021custom_job_detail\030\002 \001(\0132K.google.cl" + "oud.aiplatform.v1beta1.PipelineTaskExecu" - + "torDetail.CustomJobDetailB\005\030\001\340A\003H\000\032\347\001\n\017C" - + "ontainerDetail\022=\n\010main_job\030\001 \001(\tB+\340A\003\372A%" - + "\n#aiplatform.googleapis.com/CustomJob\022J\n" - + "\025pre_caching_check_job\030\002 \001(\tB+\340A\003\372A%\n#ai" - + "platform.googleapis.com/CustomJob\022\035\n\020fai" - + "led_main_jobs\030\003 \003(\tB\003\340A\003\022*\n\035failed_pre_c" - + "aching_check_jobs\030\004 \003(\tB\003\340A\003\032O\n\017CustomJo" - + "bDetail\0228\n\003job\030\001 \001(\tB+\340A\003\372A%\n#aiplatform" - + ".googleapis.com/CustomJob:\002\030\001B\t\n\007details" - + "B\260\002\n#com.google.cloud.aiplatform.v1beta1" - + "B\010PipelineP\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::V1beta1\352AN\n\036compute.g" - + "oogleapis.com/Network\022,projects/{project" - + "}/global/networks/{network}b\006proto3" + + "torDetail.CustomJobDetailB\003\340A\003H\000\032\347\001\n\017Con" + + "tainerDetail\022=\n\010main_job\030\001 \001(\tB+\340A\003\372A%\n#" + + "aiplatform.googleapis.com/CustomJob\022J\n\025p" + + "re_caching_check_job\030\002 \001(\tB+\340A\003\372A%\n#aipl" + + "atform.googleapis.com/CustomJob\022\035\n\020faile" + + "d_main_jobs\030\003 \003(\tB\003\340A\003\022*\n\035failed_pre_cac" + + "hing_check_jobs\030\004 \003(\tB\003\340A\003\032e\n\017CustomJobD" + + "etail\0228\n\003job\030\001 \001(\tB+\340A\003\372A%\n#aiplatform.g" + + "oogleapis.com/CustomJob\022\030\n\013failed_jobs\030\003" + + " \003(\tB\003\340A\003B\t\n\007detailsB\260\002\n#com.google.clou" + + "d.aiplatform.v1beta1B\010PipelineP\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" + + "1beta1\352AN\n\036compute.googleapis.com/Networ" + + "k\022,projects/{project}/global/networks/{n" + + "etwork}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -441,7 +442,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_PipelineTaskExecutorDetail_CustomJobDetail_descriptor, new java.lang.String[] { - "Job", + "Job", "FailedJobs", }); 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/PipelineTaskExecutorDetail.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PipelineTaskExecutorDetail.java index 98e73217d6e7..cc6cfdfaef14 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PipelineTaskExecutorDetail.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PipelineTaskExecutorDetail.java @@ -1884,7 +1884,6 @@ public com.google.protobuf.Parser getParserForType() { } } - @java.lang.Deprecated public interface CustomJobDetailOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.PipelineTaskExecutorDetail.CustomJobDetail) @@ -1920,6 +1919,65 @@ public interface CustomJobDetailOrBuilder * @return The bytes for job. */ com.google.protobuf.ByteString getJobBytes(); + + /** + * + * + *
+     * Output only. The names of the previously failed
+     * [CustomJob][google.cloud.aiplatform.v1beta1.CustomJob]. The list includes
+     * the all attempts in chronological order.
+     * 
+ * + * repeated string failed_jobs = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the failedJobs. + */ + java.util.List getFailedJobsList(); + /** + * + * + *
+     * Output only. The names of the previously failed
+     * [CustomJob][google.cloud.aiplatform.v1beta1.CustomJob]. The list includes
+     * the all attempts in chronological order.
+     * 
+ * + * repeated string failed_jobs = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of failedJobs. + */ + int getFailedJobsCount(); + /** + * + * + *
+     * Output only. The names of the previously failed
+     * [CustomJob][google.cloud.aiplatform.v1beta1.CustomJob]. The list includes
+     * the all attempts in chronological order.
+     * 
+ * + * repeated string failed_jobs = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The failedJobs at the given index. + */ + java.lang.String getFailedJobs(int index); + /** + * + * + *
+     * Output only. The names of the previously failed
+     * [CustomJob][google.cloud.aiplatform.v1beta1.CustomJob]. The list includes
+     * the all attempts in chronological order.
+     * 
+ * + * repeated string failed_jobs = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the failedJobs at the given index. + */ + com.google.protobuf.ByteString getFailedJobsBytes(int index); } /** * @@ -1931,7 +1989,6 @@ public interface CustomJobDetailOrBuilder * Protobuf type {@code * google.cloud.aiplatform.v1beta1.PipelineTaskExecutorDetail.CustomJobDetail} */ - @java.lang.Deprecated public static final class CustomJobDetail extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.PipelineTaskExecutorDetail.CustomJobDetail) @@ -1944,6 +2001,7 @@ private CustomJobDetail(com.google.protobuf.GeneratedMessageV3.Builder builde private CustomJobDetail() { job_ = ""; + failedJobs_ = com.google.protobuf.LazyStringArrayList.EMPTY; } @java.lang.Override @@ -2030,6 +2088,77 @@ public com.google.protobuf.ByteString getJobBytes() { } } + public static final int FAILED_JOBS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList failedJobs_; + /** + * + * + *
+     * Output only. The names of the previously failed
+     * [CustomJob][google.cloud.aiplatform.v1beta1.CustomJob]. The list includes
+     * the all attempts in chronological order.
+     * 
+ * + * repeated string failed_jobs = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the failedJobs. + */ + public com.google.protobuf.ProtocolStringList getFailedJobsList() { + return failedJobs_; + } + /** + * + * + *
+     * Output only. The names of the previously failed
+     * [CustomJob][google.cloud.aiplatform.v1beta1.CustomJob]. The list includes
+     * the all attempts in chronological order.
+     * 
+ * + * repeated string failed_jobs = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of failedJobs. + */ + public int getFailedJobsCount() { + return failedJobs_.size(); + } + /** + * + * + *
+     * Output only. The names of the previously failed
+     * [CustomJob][google.cloud.aiplatform.v1beta1.CustomJob]. The list includes
+     * the all attempts in chronological order.
+     * 
+ * + * repeated string failed_jobs = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The failedJobs at the given index. + */ + public java.lang.String getFailedJobs(int index) { + return failedJobs_.get(index); + } + /** + * + * + *
+     * Output only. The names of the previously failed
+     * [CustomJob][google.cloud.aiplatform.v1beta1.CustomJob]. The list includes
+     * the all attempts in chronological order.
+     * 
+ * + * repeated string failed_jobs = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the failedJobs at the given index. + */ + public com.google.protobuf.ByteString getFailedJobsBytes(int index) { + return failedJobs_.getByteString(index); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -2047,6 +2176,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(job_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, job_); } + for (int i = 0; i < failedJobs_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, failedJobs_.getRaw(i)); + } getUnknownFields().writeTo(output); } @@ -2059,6 +2191,14 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(job_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, job_); } + { + int dataSize = 0; + for (int i = 0; i < failedJobs_.size(); i++) { + dataSize += computeStringSizeNoTag(failedJobs_.getRaw(i)); + } + size += dataSize; + size += 1 * getFailedJobsList().size(); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -2078,6 +2218,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.aiplatform.v1beta1.PipelineTaskExecutorDetail.CustomJobDetail) obj; if (!getJob().equals(other.getJob())) return false; + if (!getFailedJobsList().equals(other.getFailedJobsList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2091,6 +2232,10 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + JOB_FIELD_NUMBER; hash = (53 * hash) + getJob().hashCode(); + if (getFailedJobsCount() > 0) { + hash = (37 * hash) + FAILED_JOBS_FIELD_NUMBER; + hash = (53 * hash) + getFailedJobsList().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -2244,6 +2389,8 @@ public Builder clear() { super.clear(); bitField0_ = 0; job_ = ""; + failedJobs_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -2277,6 +2424,7 @@ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { com.google.cloud.aiplatform.v1beta1.PipelineTaskExecutorDetail.CustomJobDetail result = new com.google.cloud.aiplatform.v1beta1.PipelineTaskExecutorDetail.CustomJobDetail( this); + buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } @@ -2284,6 +2432,15 @@ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return result; } + private void buildPartialRepeatedFields( + com.google.cloud.aiplatform.v1beta1.PipelineTaskExecutorDetail.CustomJobDetail result) { + if (((bitField0_ & 0x00000002) != 0)) { + failedJobs_ = failedJobs_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.failedJobs_ = failedJobs_; + } + private void buildPartial0( com.google.cloud.aiplatform.v1beta1.PipelineTaskExecutorDetail.CustomJobDetail result) { int from_bitField0_ = bitField0_; @@ -2351,6 +2508,16 @@ public Builder mergeFrom( bitField0_ |= 0x00000001; onChanged(); } + if (!other.failedJobs_.isEmpty()) { + if (failedJobs_.isEmpty()) { + failedJobs_ = other.failedJobs_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureFailedJobsIsMutable(); + failedJobs_.addAll(other.failedJobs_); + } + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -2383,6 +2550,13 @@ public Builder mergeFrom( bitField0_ |= 0x00000001; break; } // case 10 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureFailedJobsIsMutable(); + failedJobs_.add(s); + break; + } // case 26 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -2523,6 +2697,192 @@ public Builder setJobBytes(com.google.protobuf.ByteString value) { return this; } + private com.google.protobuf.LazyStringList failedJobs_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureFailedJobsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + failedJobs_ = new com.google.protobuf.LazyStringArrayList(failedJobs_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+       * Output only. The names of the previously failed
+       * [CustomJob][google.cloud.aiplatform.v1beta1.CustomJob]. The list includes
+       * the all attempts in chronological order.
+       * 
+ * + * repeated string failed_jobs = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return A list containing the failedJobs. + */ + public com.google.protobuf.ProtocolStringList getFailedJobsList() { + return failedJobs_.getUnmodifiableView(); + } + /** + * + * + *
+       * Output only. The names of the previously failed
+       * [CustomJob][google.cloud.aiplatform.v1beta1.CustomJob]. The list includes
+       * the all attempts in chronological order.
+       * 
+ * + * repeated string failed_jobs = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The count of failedJobs. + */ + public int getFailedJobsCount() { + return failedJobs_.size(); + } + /** + * + * + *
+       * Output only. The names of the previously failed
+       * [CustomJob][google.cloud.aiplatform.v1beta1.CustomJob]. The list includes
+       * the all attempts in chronological order.
+       * 
+ * + * repeated string failed_jobs = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the element to return. + * @return The failedJobs at the given index. + */ + public java.lang.String getFailedJobs(int index) { + return failedJobs_.get(index); + } + /** + * + * + *
+       * Output only. The names of the previously failed
+       * [CustomJob][google.cloud.aiplatform.v1beta1.CustomJob]. The list includes
+       * the all attempts in chronological order.
+       * 
+ * + * repeated string failed_jobs = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index of the value to return. + * @return The bytes of the failedJobs at the given index. + */ + public com.google.protobuf.ByteString getFailedJobsBytes(int index) { + return failedJobs_.getByteString(index); + } + /** + * + * + *
+       * Output only. The names of the previously failed
+       * [CustomJob][google.cloud.aiplatform.v1beta1.CustomJob]. The list includes
+       * the all attempts in chronological order.
+       * 
+ * + * repeated string failed_jobs = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param index The index to set the value at. + * @param value The failedJobs to set. + * @return This builder for chaining. + */ + public Builder setFailedJobs(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFailedJobsIsMutable(); + failedJobs_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The names of the previously failed
+       * [CustomJob][google.cloud.aiplatform.v1beta1.CustomJob]. The list includes
+       * the all attempts in chronological order.
+       * 
+ * + * repeated string failed_jobs = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The failedJobs to add. + * @return This builder for chaining. + */ + public Builder addFailedJobs(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFailedJobsIsMutable(); + failedJobs_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The names of the previously failed
+       * [CustomJob][google.cloud.aiplatform.v1beta1.CustomJob]. The list includes
+       * the all attempts in chronological order.
+       * 
+ * + * repeated string failed_jobs = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param values The failedJobs to add. + * @return This builder for chaining. + */ + public Builder addAllFailedJobs(java.lang.Iterable values) { + ensureFailedJobsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, failedJobs_); + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The names of the previously failed
+       * [CustomJob][google.cloud.aiplatform.v1beta1.CustomJob]. The list includes
+       * the all attempts in chronological order.
+       * 
+ * + * repeated string failed_jobs = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearFailedJobs() { + failedJobs_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The names of the previously failed
+       * [CustomJob][google.cloud.aiplatform.v1beta1.CustomJob]. The list includes
+       * the all attempts in chronological order.
+       * 
+ * + * repeated string failed_jobs = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes of the failedJobs to add. + * @return This builder for chaining. + */ + public Builder addFailedJobsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureFailedJobsIsMutable(); + failedJobs_.add(value); + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -2600,7 +2960,6 @@ public enum DetailsCase com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { CONTAINER_DETAIL(1), - @java.lang.Deprecated CUSTOM_JOB_DETAIL(2), DETAILS_NOT_SET(0); private final int value; @@ -2712,15 +3071,12 @@ public boolean hasContainerDetail() { *
* * - * .google.cloud.aiplatform.v1beta1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.aiplatform.v1beta1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * - * @deprecated google.cloud.aiplatform.v1beta1.PipelineTaskExecutorDetail.custom_job_detail is - * deprecated. See google/cloud/aiplatform/v1beta1/pipeline_job.proto;l=402 * @return Whether the customJobDetail field is set. */ @java.lang.Override - @java.lang.Deprecated public boolean hasCustomJobDetail() { return detailsCase_ == 2; } @@ -2732,15 +3088,12 @@ public boolean hasCustomJobDetail() { *
* * - * .google.cloud.aiplatform.v1beta1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.aiplatform.v1beta1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * - * @deprecated google.cloud.aiplatform.v1beta1.PipelineTaskExecutorDetail.custom_job_detail is - * deprecated. See google/cloud/aiplatform/v1beta1/pipeline_job.proto;l=402 * @return The customJobDetail. */ @java.lang.Override - @java.lang.Deprecated public com.google.cloud.aiplatform.v1beta1.PipelineTaskExecutorDetail.CustomJobDetail getCustomJobDetail() { if (detailsCase_ == 2) { @@ -2758,11 +3111,10 @@ public boolean hasCustomJobDetail() { *
* * - * .google.cloud.aiplatform.v1beta1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.aiplatform.v1beta1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override - @java.lang.Deprecated public com.google.cloud.aiplatform.v1beta1.PipelineTaskExecutorDetail.CustomJobDetailOrBuilder getCustomJobDetailOrBuilder() { if (detailsCase_ == 2) { @@ -3468,15 +3820,12 @@ public Builder clearContainerDetail() { * * * - * .google.cloud.aiplatform.v1beta1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.aiplatform.v1beta1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * - * @deprecated google.cloud.aiplatform.v1beta1.PipelineTaskExecutorDetail.custom_job_detail is - * deprecated. See google/cloud/aiplatform/v1beta1/pipeline_job.proto;l=402 * @return Whether the customJobDetail field is set. */ @java.lang.Override - @java.lang.Deprecated public boolean hasCustomJobDetail() { return detailsCase_ == 2; } @@ -3488,15 +3837,12 @@ public boolean hasCustomJobDetail() { * * * - * .google.cloud.aiplatform.v1beta1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.aiplatform.v1beta1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * - * @deprecated google.cloud.aiplatform.v1beta1.PipelineTaskExecutorDetail.custom_job_detail is - * deprecated. See google/cloud/aiplatform/v1beta1/pipeline_job.proto;l=402 * @return The customJobDetail. */ @java.lang.Override - @java.lang.Deprecated public com.google.cloud.aiplatform.v1beta1.PipelineTaskExecutorDetail.CustomJobDetail getCustomJobDetail() { if (customJobDetailBuilder_ == null) { @@ -3522,10 +3868,9 @@ public boolean hasCustomJobDetail() { * * * - * .google.cloud.aiplatform.v1beta1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.aiplatform.v1beta1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - @java.lang.Deprecated public Builder setCustomJobDetail( com.google.cloud.aiplatform.v1beta1.PipelineTaskExecutorDetail.CustomJobDetail value) { if (customJobDetailBuilder_ == null) { @@ -3548,10 +3893,9 @@ public Builder setCustomJobDetail( * * * - * .google.cloud.aiplatform.v1beta1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.aiplatform.v1beta1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - @java.lang.Deprecated public Builder setCustomJobDetail( com.google.cloud.aiplatform.v1beta1.PipelineTaskExecutorDetail.CustomJobDetail.Builder builderForValue) { @@ -3572,10 +3916,9 @@ public Builder setCustomJobDetail( * * * - * .google.cloud.aiplatform.v1beta1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.aiplatform.v1beta1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - @java.lang.Deprecated public Builder mergeCustomJobDetail( com.google.cloud.aiplatform.v1beta1.PipelineTaskExecutorDetail.CustomJobDetail value) { if (customJobDetailBuilder_ == null) { @@ -3613,10 +3956,9 @@ public Builder mergeCustomJobDetail( * * * - * .google.cloud.aiplatform.v1beta1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.aiplatform.v1beta1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - @java.lang.Deprecated public Builder clearCustomJobDetail() { if (customJobDetailBuilder_ == null) { if (detailsCase_ == 2) { @@ -3641,10 +3983,9 @@ public Builder clearCustomJobDetail() { * * * - * .google.cloud.aiplatform.v1beta1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.aiplatform.v1beta1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - @java.lang.Deprecated public com.google.cloud.aiplatform.v1beta1.PipelineTaskExecutorDetail.CustomJobDetail.Builder getCustomJobDetailBuilder() { return getCustomJobDetailFieldBuilder().getBuilder(); @@ -3657,11 +3998,10 @@ public Builder clearCustomJobDetail() { * * * - * .google.cloud.aiplatform.v1beta1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.aiplatform.v1beta1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override - @java.lang.Deprecated public com.google.cloud.aiplatform.v1beta1.PipelineTaskExecutorDetail.CustomJobDetailOrBuilder getCustomJobDetailOrBuilder() { if ((detailsCase_ == 2) && (customJobDetailBuilder_ != null)) { @@ -3683,7 +4023,7 @@ public Builder clearCustomJobDetail() { * * * - * .google.cloud.aiplatform.v1beta1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.aiplatform.v1beta1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ private com.google.protobuf.SingleFieldBuilderV3< diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PipelineTaskExecutorDetailOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PipelineTaskExecutorDetailOrBuilder.java index 5ea4521c5743..eb56e7389d92 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PipelineTaskExecutorDetailOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PipelineTaskExecutorDetailOrBuilder.java @@ -74,14 +74,11 @@ public interface PipelineTaskExecutorDetailOrBuilder * * * - * .google.cloud.aiplatform.v1beta1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.aiplatform.v1beta1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * - * @deprecated google.cloud.aiplatform.v1beta1.PipelineTaskExecutorDetail.custom_job_detail is - * deprecated. See google/cloud/aiplatform/v1beta1/pipeline_job.proto;l=402 * @return Whether the customJobDetail field is set. */ - @java.lang.Deprecated boolean hasCustomJobDetail(); /** * @@ -91,14 +88,11 @@ public interface PipelineTaskExecutorDetailOrBuilder * * * - * .google.cloud.aiplatform.v1beta1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.aiplatform.v1beta1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * - * @deprecated google.cloud.aiplatform.v1beta1.PipelineTaskExecutorDetail.custom_job_detail is - * deprecated. See google/cloud/aiplatform/v1beta1/pipeline_job.proto;l=402 * @return The customJobDetail. */ - @java.lang.Deprecated com.google.cloud.aiplatform.v1beta1.PipelineTaskExecutorDetail.CustomJobDetail getCustomJobDetail(); /** @@ -109,10 +103,9 @@ public interface PipelineTaskExecutorDetailOrBuilder * * * - * .google.cloud.aiplatform.v1beta1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.aiplatform.v1beta1.PipelineTaskExecutorDetail.CustomJobDetail custom_job_detail = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ - @java.lang.Deprecated com.google.cloud.aiplatform.v1beta1.PipelineTaskExecutorDetail.CustomJobDetailOrBuilder getCustomJobDetailOrBuilder(); diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PrivateServiceConnectConfig.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PrivateServiceConnectConfig.java new file mode 100644 index 000000000000..af3447d46726 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PrivateServiceConnectConfig.java @@ -0,0 +1,842 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/service_networking.proto + +package com.google.cloud.aiplatform.v1beta1; + +/** + * + * + *
+ * Represents configuration for private service connect.
+ * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig} + */ +public final class PrivateServiceConnectConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig) + PrivateServiceConnectConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use PrivateServiceConnectConfig.newBuilder() to construct. + private PrivateServiceConnectConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PrivateServiceConnectConfig() { + projectAllowlist_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PrivateServiceConnectConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.ServiceNetworkingProto + .internal_static_google_cloud_aiplatform_v1beta1_PrivateServiceConnectConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.ServiceNetworkingProto + .internal_static_google_cloud_aiplatform_v1beta1_PrivateServiceConnectConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig.class, + com.google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig.Builder.class); + } + + public static final int ENABLE_PRIVATE_SERVICE_CONNECT_FIELD_NUMBER = 1; + private boolean enablePrivateServiceConnect_ = false; + /** + * + * + *
+   * Required. If true, expose the IndexEndpoint via private service connect.
+   * 
+ * + * bool enable_private_service_connect = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The enablePrivateServiceConnect. + */ + @java.lang.Override + public boolean getEnablePrivateServiceConnect() { + return enablePrivateServiceConnect_; + } + + public static final int PROJECT_ALLOWLIST_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList projectAllowlist_; + /** + * + * + *
+   * A list of Projects from which the forwarding rule will target the service
+   * attachment.
+   * 
+ * + * repeated string project_allowlist = 2; + * + * @return A list containing the projectAllowlist. + */ + public com.google.protobuf.ProtocolStringList getProjectAllowlistList() { + return projectAllowlist_; + } + /** + * + * + *
+   * A list of Projects from which the forwarding rule will target the service
+   * attachment.
+   * 
+ * + * repeated string project_allowlist = 2; + * + * @return The count of projectAllowlist. + */ + public int getProjectAllowlistCount() { + return projectAllowlist_.size(); + } + /** + * + * + *
+   * A list of Projects from which the forwarding rule will target the service
+   * attachment.
+   * 
+ * + * repeated string project_allowlist = 2; + * + * @param index The index of the element to return. + * @return The projectAllowlist at the given index. + */ + public java.lang.String getProjectAllowlist(int index) { + return projectAllowlist_.get(index); + } + /** + * + * + *
+   * A list of Projects from which the forwarding rule will target the service
+   * attachment.
+   * 
+ * + * repeated string project_allowlist = 2; + * + * @param index The index of the value to return. + * @return The bytes of the projectAllowlist at the given index. + */ + public com.google.protobuf.ByteString getProjectAllowlistBytes(int index) { + return projectAllowlist_.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 (enablePrivateServiceConnect_ != false) { + output.writeBool(1, enablePrivateServiceConnect_); + } + for (int i = 0; i < projectAllowlist_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, projectAllowlist_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enablePrivateServiceConnect_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(1, enablePrivateServiceConnect_); + } + { + int dataSize = 0; + for (int i = 0; i < projectAllowlist_.size(); i++) { + dataSize += computeStringSizeNoTag(projectAllowlist_.getRaw(i)); + } + size += dataSize; + size += 1 * getProjectAllowlistList().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.PrivateServiceConnectConfig)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig other = + (com.google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig) obj; + + if (getEnablePrivateServiceConnect() != other.getEnablePrivateServiceConnect()) return false; + if (!getProjectAllowlistList().equals(other.getProjectAllowlistList())) 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_PRIVATE_SERVICE_CONNECT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnablePrivateServiceConnect()); + if (getProjectAllowlistCount() > 0) { + hash = (37 * hash) + PROJECT_ALLOWLIST_FIELD_NUMBER; + hash = (53 * hash) + getProjectAllowlistList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig 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.PrivateServiceConnectConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig 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.PrivateServiceConnectConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig 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.PrivateServiceConnectConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig 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.PrivateServiceConnectConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig 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.PrivateServiceConnectConfig 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.PrivateServiceConnectConfig 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.PrivateServiceConnectConfig 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 configuration for private service connect.
+   * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig) + com.google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.ServiceNetworkingProto + .internal_static_google_cloud_aiplatform_v1beta1_PrivateServiceConnectConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.ServiceNetworkingProto + .internal_static_google_cloud_aiplatform_v1beta1_PrivateServiceConnectConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig.class, + com.google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig.Builder.class); + } + + // Construct using com.google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + enablePrivateServiceConnect_ = false; + projectAllowlist_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.ServiceNetworkingProto + .internal_static_google_cloud_aiplatform_v1beta1_PrivateServiceConnectConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig build() { + com.google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig buildPartial() { + com.google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig result = + new com.google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig result) { + if (((bitField0_ & 0x00000002) != 0)) { + projectAllowlist_ = projectAllowlist_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.projectAllowlist_ = projectAllowlist_; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.enablePrivateServiceConnect_ = enablePrivateServiceConnect_; + } + } + + @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.PrivateServiceConnectConfig) { + return mergeFrom((com.google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig other) { + if (other + == com.google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig.getDefaultInstance()) + return this; + if (other.getEnablePrivateServiceConnect() != false) { + setEnablePrivateServiceConnect(other.getEnablePrivateServiceConnect()); + } + if (!other.projectAllowlist_.isEmpty()) { + if (projectAllowlist_.isEmpty()) { + projectAllowlist_ = other.projectAllowlist_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureProjectAllowlistIsMutable(); + projectAllowlist_.addAll(other.projectAllowlist_); + } + 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: + { + enablePrivateServiceConnect_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureProjectAllowlistIsMutable(); + projectAllowlist_.add(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 bitField0_; + + private boolean enablePrivateServiceConnect_; + /** + * + * + *
+     * Required. If true, expose the IndexEndpoint via private service connect.
+     * 
+ * + * bool enable_private_service_connect = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enablePrivateServiceConnect. + */ + @java.lang.Override + public boolean getEnablePrivateServiceConnect() { + return enablePrivateServiceConnect_; + } + /** + * + * + *
+     * Required. If true, expose the IndexEndpoint via private service connect.
+     * 
+ * + * bool enable_private_service_connect = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enablePrivateServiceConnect to set. + * @return This builder for chaining. + */ + public Builder setEnablePrivateServiceConnect(boolean value) { + + enablePrivateServiceConnect_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. If true, expose the IndexEndpoint via private service connect.
+     * 
+ * + * bool enable_private_service_connect = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearEnablePrivateServiceConnect() { + bitField0_ = (bitField0_ & ~0x00000001); + enablePrivateServiceConnect_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList projectAllowlist_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureProjectAllowlistIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + projectAllowlist_ = new com.google.protobuf.LazyStringArrayList(projectAllowlist_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * A list of Projects from which the forwarding rule will target the service
+     * attachment.
+     * 
+ * + * repeated string project_allowlist = 2; + * + * @return A list containing the projectAllowlist. + */ + public com.google.protobuf.ProtocolStringList getProjectAllowlistList() { + return projectAllowlist_.getUnmodifiableView(); + } + /** + * + * + *
+     * A list of Projects from which the forwarding rule will target the service
+     * attachment.
+     * 
+ * + * repeated string project_allowlist = 2; + * + * @return The count of projectAllowlist. + */ + public int getProjectAllowlistCount() { + return projectAllowlist_.size(); + } + /** + * + * + *
+     * A list of Projects from which the forwarding rule will target the service
+     * attachment.
+     * 
+ * + * repeated string project_allowlist = 2; + * + * @param index The index of the element to return. + * @return The projectAllowlist at the given index. + */ + public java.lang.String getProjectAllowlist(int index) { + return projectAllowlist_.get(index); + } + /** + * + * + *
+     * A list of Projects from which the forwarding rule will target the service
+     * attachment.
+     * 
+ * + * repeated string project_allowlist = 2; + * + * @param index The index of the value to return. + * @return The bytes of the projectAllowlist at the given index. + */ + public com.google.protobuf.ByteString getProjectAllowlistBytes(int index) { + return projectAllowlist_.getByteString(index); + } + /** + * + * + *
+     * A list of Projects from which the forwarding rule will target the service
+     * attachment.
+     * 
+ * + * repeated string project_allowlist = 2; + * + * @param index The index to set the value at. + * @param value The projectAllowlist to set. + * @return This builder for chaining. + */ + public Builder setProjectAllowlist(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureProjectAllowlistIsMutable(); + projectAllowlist_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of Projects from which the forwarding rule will target the service
+     * attachment.
+     * 
+ * + * repeated string project_allowlist = 2; + * + * @param value The projectAllowlist to add. + * @return This builder for chaining. + */ + public Builder addProjectAllowlist(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureProjectAllowlistIsMutable(); + projectAllowlist_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of Projects from which the forwarding rule will target the service
+     * attachment.
+     * 
+ * + * repeated string project_allowlist = 2; + * + * @param values The projectAllowlist to add. + * @return This builder for chaining. + */ + public Builder addAllProjectAllowlist(java.lang.Iterable values) { + ensureProjectAllowlistIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, projectAllowlist_); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of Projects from which the forwarding rule will target the service
+     * attachment.
+     * 
+ * + * repeated string project_allowlist = 2; + * + * @return This builder for chaining. + */ + public Builder clearProjectAllowlist() { + projectAllowlist_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of Projects from which the forwarding rule will target the service
+     * attachment.
+     * 
+ * + * repeated string project_allowlist = 2; + * + * @param value The bytes of the projectAllowlist to add. + * @return This builder for chaining. + */ + public Builder addProjectAllowlistBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureProjectAllowlistIsMutable(); + projectAllowlist_.add(value); + 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.PrivateServiceConnectConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig) + private static final com.google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig(); + } + + public static com.google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PrivateServiceConnectConfig 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.PrivateServiceConnectConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PrivateServiceConnectConfigOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PrivateServiceConnectConfigOrBuilder.java new file mode 100644 index 000000000000..f8e5f7fff91f --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/PrivateServiceConnectConfigOrBuilder.java @@ -0,0 +1,93 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/service_networking.proto + +package com.google.cloud.aiplatform.v1beta1; + +public interface PrivateServiceConnectConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. If true, expose the IndexEndpoint via private service connect.
+   * 
+ * + * bool enable_private_service_connect = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The enablePrivateServiceConnect. + */ + boolean getEnablePrivateServiceConnect(); + + /** + * + * + *
+   * A list of Projects from which the forwarding rule will target the service
+   * attachment.
+   * 
+ * + * repeated string project_allowlist = 2; + * + * @return A list containing the projectAllowlist. + */ + java.util.List getProjectAllowlistList(); + /** + * + * + *
+   * A list of Projects from which the forwarding rule will target the service
+   * attachment.
+   * 
+ * + * repeated string project_allowlist = 2; + * + * @return The count of projectAllowlist. + */ + int getProjectAllowlistCount(); + /** + * + * + *
+   * A list of Projects from which the forwarding rule will target the service
+   * attachment.
+   * 
+ * + * repeated string project_allowlist = 2; + * + * @param index The index of the element to return. + * @return The projectAllowlist at the given index. + */ + java.lang.String getProjectAllowlist(int index); + /** + * + * + *
+   * A list of Projects from which the forwarding rule will target the service
+   * attachment.
+   * 
+ * + * repeated string project_allowlist = 2; + * + * @param index The index of the value to return. + * @return The bytes of the projectAllowlist at the given index. + */ + com.google.protobuf.ByteString getProjectAllowlistBytes(int index); +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ServiceNetworkingProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ServiceNetworkingProto.java new file mode 100644 index 000000000000..07e7c40e6ba5 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/ServiceNetworkingProto.java @@ -0,0 +1,79 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the 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/service_networking.proto + +package com.google.cloud.aiplatform.v1beta1; + +public final class ServiceNetworkingProto { + private ServiceNetworkingProto() {} + + 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_PrivateServiceConnectConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_PrivateServiceConnectConfig_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/servic" + + "e_networking.proto\022\037google.cloud.aiplatf" + + "orm.v1beta1\032\037google/api/field_behavior.p" + + "roto\"e\n\033PrivateServiceConnectConfig\022+\n\036e" + + "nable_private_service_connect\030\001 \001(\010B\003\340A\002" + + "\022\031\n\021project_allowlist\030\002 \003(\tB\355\001\n#com.goog" + + "le.cloud.aiplatform.v1beta1B\026ServiceNetw" + + "orkingProtoP\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( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + }); + internal_static_google_cloud_aiplatform_v1beta1_PrivateServiceConnectConfig_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_aiplatform_v1beta1_PrivateServiceConnectConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_PrivateServiceConnectConfig_descriptor, + new java.lang.String[] { + "EnablePrivateServiceConnect", "ProjectAllowlist", + }); + 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/StudyProto.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/StudyProto.java index 36e55a7cbab1..294b18bd95ae 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/StudyProto.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/StudyProto.java @@ -51,6 +51,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_aiplatform_v1beta1_StudySpec_MetricSpec_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_aiplatform_v1beta1_StudySpec_MetricSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_aiplatform_v1beta1_StudySpec_MetricSpec_SafetyMetricConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_aiplatform_v1beta1_StudySpec_MetricSpec_SafetyMetricConfig_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_aiplatform_v1beta1_StudySpec_ParameterSpec_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -166,7 +170,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "FEASIBLE\020\005:l\352Ai\n\037aiplatform.googleapis.c" + "om/Trial\022Fprojects/{project}/locations/{" + "location}/studies/{study}/trials/{trial}" - + "\"\247\037\n\tStudySpec\022o\n\031decay_curve_stopping_s" + + "\"\244!\n\tStudySpec\022o\n\031decay_curve_stopping_s" + "pec\030\004 \001(\0132J.google.cloud.aiplatform.v1be" + "ta1.StudySpec.DecayCurveAutomatedStoppin" + "gSpecH\000\022p\n\036median_automated_stopping_spe" @@ -190,94 +194,101 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "1.StudySpec.MeasurementSelectionType\022c\n\030" + "transfer_learning_config\030\n \001(\0132A.google." + "cloud.aiplatform.v1beta1.StudySpec.Trans" - + "ferLearningConfig\032\272\001\n\nMetricSpec\022\026\n\tmetr" + + "ferLearningConfig\032\267\003\n\nMetricSpec\022\026\n\tmetr" + "ic_id\030\001 \001(\tB\003\340A\002\022Q\n\004goal\030\002 \001(\0162>.google." + "cloud.aiplatform.v1beta1.StudySpec.Metri" - + "cSpec.GoalTypeB\003\340A\002\"A\n\010GoalType\022\031\n\025GOAL_" - + "TYPE_UNSPECIFIED\020\000\022\014\n\010MAXIMIZE\020\001\022\014\n\010MINI" - + "MIZE\020\002\032\200\017\n\rParameterSpec\022e\n\021double_value" - + "_spec\030\002 \001(\0132H.google.cloud.aiplatform.v1" - + "beta1.StudySpec.ParameterSpec.DoubleValu" - + "eSpecH\000\022g\n\022integer_value_spec\030\003 \001(\0132I.go" - + "ogle.cloud.aiplatform.v1beta1.StudySpec." - + "ParameterSpec.IntegerValueSpecH\000\022o\n\026cate" - + "gorical_value_spec\030\004 \001(\0132M.google.cloud." + + "cSpec.GoalTypeB\003\340A\002\022d\n\rsafety_config\030\003 \001" + + "(\0132H.google.cloud.aiplatform.v1beta1.Stu" + + "dySpec.MetricSpec.SafetyMetricConfigH\000\210\001" + + "\001\032\202\001\n\022SafetyMetricConfig\022\030\n\020safety_thres" + + "hold\030\001 \001(\001\022-\n desired_min_safe_trials_fr" + + "action\030\002 \001(\001H\000\210\001\001B#\n!_desired_min_safe_t" + + "rials_fraction\"A\n\010GoalType\022\031\n\025GOAL_TYPE_" + + "UNSPECIFIED\020\000\022\014\n\010MAXIMIZE\020\001\022\014\n\010MINIMIZE\020" + + "\002B\020\n\016_safety_config\032\200\017\n\rParameterSpec\022e\n" + + "\021double_value_spec\030\002 \001(\0132H.google.cloud." + "aiplatform.v1beta1.StudySpec.ParameterSp" - + "ec.CategoricalValueSpecH\000\022i\n\023discrete_va" - + "lue_spec\030\005 \001(\0132J.google.cloud.aiplatform" - + ".v1beta1.StudySpec.ParameterSpec.Discret" - + "eValueSpecH\000\022\031\n\014parameter_id\030\001 \001(\tB\003\340A\002\022" - + "V\n\nscale_type\030\006 \001(\0162B.google.cloud.aipla" - + "tform.v1beta1.StudySpec.ParameterSpec.Sc" - + "aleType\022v\n\033conditional_parameter_specs\030\n" - + " \003(\0132Q.google.cloud.aiplatform.v1beta1.S" - + "tudySpec.ParameterSpec.ConditionalParame" - + "terSpec\032o\n\017DoubleValueSpec\022\026\n\tmin_value\030" - + "\001 \001(\001B\003\340A\002\022\026\n\tmax_value\030\002 \001(\001B\003\340A\002\022\032\n\rde" - + "fault_value\030\004 \001(\001H\000\210\001\001B\020\n\016_default_value" - + "\032p\n\020IntegerValueSpec\022\026\n\tmin_value\030\001 \001(\003B" - + "\003\340A\002\022\026\n\tmax_value\030\002 \001(\003B\003\340A\002\022\032\n\rdefault_" - + "value\030\004 \001(\003H\000\210\001\001B\020\n\016_default_value\032Y\n\024Ca" - + "tegoricalValueSpec\022\023\n\006values\030\001 \003(\tB\003\340A\002\022" - + "\032\n\rdefault_value\030\003 \001(\tH\000\210\001\001B\020\n\016_default_" - + "value\032V\n\021DiscreteValueSpec\022\023\n\006values\030\001 \003" - + "(\001B\003\340A\002\022\032\n\rdefault_value\030\003 \001(\001H\000\210\001\001B\020\n\016_" - + "default_value\032\271\005\n\030ConditionalParameterSp" - + "ec\022\212\001\n\026parent_discrete_values\030\002 \001(\0132h.go" - + "ogle.cloud.aiplatform.v1beta1.StudySpec." - + "ParameterSpec.ConditionalParameterSpec.D" - + "iscreteValueConditionH\000\022\200\001\n\021parent_int_v" - + "alues\030\003 \001(\0132c.google.cloud.aiplatform.v1" - + "beta1.StudySpec.ParameterSpec.Conditiona" - + "lParameterSpec.IntValueConditionH\000\022\220\001\n\031p" - + "arent_categorical_values\030\004 \001(\0132k.google." - + "cloud.aiplatform.v1beta1.StudySpec.Param" - + "eterSpec.ConditionalParameterSpec.Catego" - + "ricalValueConditionH\000\022U\n\016parameter_spec\030" - + "\001 \001(\01328.google.cloud.aiplatform.v1beta1." - + "StudySpec.ParameterSpecB\003\340A\002\032-\n\026Discrete" - + "ValueCondition\022\023\n\006values\030\001 \003(\001B\003\340A\002\032(\n\021I" - + "ntValueCondition\022\023\n\006values\030\001 \003(\003B\003\340A\002\0320\n" - + "\031CategoricalValueCondition\022\023\n\006values\030\001 \003" - + "(\tB\003\340A\002B\030\n\026parent_value_condition\"n\n\tSca" - + "leType\022\032\n\026SCALE_TYPE_UNSPECIFIED\020\000\022\025\n\021UN" - + "IT_LINEAR_SCALE\020\001\022\022\n\016UNIT_LOG_SCALE\020\002\022\032\n" - + "\026UNIT_REVERSE_LOG_SCALE\020\003B\026\n\024parameter_v" - + "alue_spec\032?\n\037DecayCurveAutomatedStopping" - + "Spec\022\034\n\024use_elapsed_duration\030\001 \001(\010\032;\n\033Me" - + "dianAutomatedStoppingSpec\022\034\n\024use_elapsed" - + "_duration\030\001 \001(\010\032\366\001\n\033ConvexAutomatedStopp" - + "ingSpec\022\026\n\016max_step_count\030\001 \001(\003\022\026\n\016min_s" - + "tep_count\030\002 \001(\003\022\035\n\025min_measurement_count" - + "\030\003 \001(\003\022$\n\034learning_rate_parameter_name\030\004" - + " \001(\t\022\034\n\024use_elapsed_duration\030\005 \001(\010\022&\n\031up" - + "date_all_stopped_trials\030\006 \001(\010H\000\210\001\001B\034\n\032_u" - + "pdate_all_stopped_trials\032\235\001\n\020ConvexStopC" - + "onfig\022\025\n\rmax_num_steps\030\001 \001(\003\022\025\n\rmin_num_" - + "steps\030\002 \001(\003\022\034\n\024autoregressive_order\030\003 \001(" - + "\003\022$\n\034learning_rate_parameter_name\030\004 \001(\t\022" - + "\023\n\013use_seconds\030\005 \001(\010:\002\030\001\032[\n\026TransferLear" - + "ningConfig\022!\n\031disable_transfer_learning\030" - + "\001 \001(\010\022\036\n\021prior_study_names\030\002 \003(\tB\003\340A\003\"J\n" - + "\tAlgorithm\022\031\n\025ALGORITHM_UNSPECIFIED\020\000\022\017\n" - + "\013GRID_SEARCH\020\002\022\021\n\rRANDOM_SEARCH\020\003\"H\n\020Obs" - + "ervationNoise\022!\n\035OBSERVATION_NOISE_UNSPE" - + "CIFIED\020\000\022\007\n\003LOW\020\001\022\010\n\004HIGH\020\002\"r\n\030Measureme" - + "ntSelectionType\022*\n&MEASUREMENT_SELECTION" - + "_TYPE_UNSPECIFIED\020\000\022\024\n\020LAST_MEASUREMENT\020" - + "\001\022\024\n\020BEST_MEASUREMENT\020\002B\031\n\027automated_sto" - + "pping_spec\"\341\001\n\013Measurement\0228\n\020elapsed_du" - + "ration\030\001 \001(\0132\031.google.protobuf.DurationB" - + "\003\340A\003\022\027\n\nstep_count\030\002 \001(\003B\003\340A\003\022I\n\007metrics" - + "\030\003 \003(\01323.google.cloud.aiplatform.v1beta1" - + ".Measurement.MetricB\003\340A\003\0324\n\006Metric\022\026\n\tme" - + "tric_id\030\001 \001(\tB\003\340A\003\022\022\n\005value\030\002 \001(\001B\003\340A\003B\341" - + "\001\n#com.google.cloud.aiplatform.v1beta1B\n" - + "StudyProtoP\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" + + "ec.DoubleValueSpecH\000\022g\n\022integer_value_sp" + + "ec\030\003 \001(\0132I.google.cloud.aiplatform.v1bet" + + "a1.StudySpec.ParameterSpec.IntegerValueS" + + "pecH\000\022o\n\026categorical_value_spec\030\004 \001(\0132M." + + "google.cloud.aiplatform.v1beta1.StudySpe" + + "c.ParameterSpec.CategoricalValueSpecH\000\022i" + + "\n\023discrete_value_spec\030\005 \001(\0132J.google.clo" + + "ud.aiplatform.v1beta1.StudySpec.Paramete" + + "rSpec.DiscreteValueSpecH\000\022\031\n\014parameter_i" + + "d\030\001 \001(\tB\003\340A\002\022V\n\nscale_type\030\006 \001(\0162B.googl" + + "e.cloud.aiplatform.v1beta1.StudySpec.Par" + + "ameterSpec.ScaleType\022v\n\033conditional_para" + + "meter_specs\030\n \003(\0132Q.google.cloud.aiplatf" + + "orm.v1beta1.StudySpec.ParameterSpec.Cond" + + "itionalParameterSpec\032o\n\017DoubleValueSpec\022" + + "\026\n\tmin_value\030\001 \001(\001B\003\340A\002\022\026\n\tmax_value\030\002 \001" + + "(\001B\003\340A\002\022\032\n\rdefault_value\030\004 \001(\001H\000\210\001\001B\020\n\016_" + + "default_value\032p\n\020IntegerValueSpec\022\026\n\tmin" + + "_value\030\001 \001(\003B\003\340A\002\022\026\n\tmax_value\030\002 \001(\003B\003\340A" + + "\002\022\032\n\rdefault_value\030\004 \001(\003H\000\210\001\001B\020\n\016_defaul" + + "t_value\032Y\n\024CategoricalValueSpec\022\023\n\006value" + + "s\030\001 \003(\tB\003\340A\002\022\032\n\rdefault_value\030\003 \001(\tH\000\210\001\001" + + "B\020\n\016_default_value\032V\n\021DiscreteValueSpec\022" + + "\023\n\006values\030\001 \003(\001B\003\340A\002\022\032\n\rdefault_value\030\003 " + + "\001(\001H\000\210\001\001B\020\n\016_default_value\032\271\005\n\030Condition" + + "alParameterSpec\022\212\001\n\026parent_discrete_valu" + + "es\030\002 \001(\0132h.google.cloud.aiplatform.v1bet" + + "a1.StudySpec.ParameterSpec.ConditionalPa" + + "rameterSpec.DiscreteValueConditionH\000\022\200\001\n" + + "\021parent_int_values\030\003 \001(\0132c.google.cloud." + + "aiplatform.v1beta1.StudySpec.ParameterSp" + + "ec.ConditionalParameterSpec.IntValueCond" + + "itionH\000\022\220\001\n\031parent_categorical_values\030\004 " + + "\001(\0132k.google.cloud.aiplatform.v1beta1.St" + + "udySpec.ParameterSpec.ConditionalParamet" + + "erSpec.CategoricalValueConditionH\000\022U\n\016pa" + + "rameter_spec\030\001 \001(\01328.google.cloud.aiplat" + + "form.v1beta1.StudySpec.ParameterSpecB\003\340A" + + "\002\032-\n\026DiscreteValueCondition\022\023\n\006values\030\001 " + + "\003(\001B\003\340A\002\032(\n\021IntValueCondition\022\023\n\006values\030" + + "\001 \003(\003B\003\340A\002\0320\n\031CategoricalValueCondition\022" + + "\023\n\006values\030\001 \003(\tB\003\340A\002B\030\n\026parent_value_con" + + "dition\"n\n\tScaleType\022\032\n\026SCALE_TYPE_UNSPEC" + + "IFIED\020\000\022\025\n\021UNIT_LINEAR_SCALE\020\001\022\022\n\016UNIT_L" + + "OG_SCALE\020\002\022\032\n\026UNIT_REVERSE_LOG_SCALE\020\003B\026" + + "\n\024parameter_value_spec\032?\n\037DecayCurveAuto" + + "matedStoppingSpec\022\034\n\024use_elapsed_duratio" + + "n\030\001 \001(\010\032;\n\033MedianAutomatedStoppingSpec\022\034" + + "\n\024use_elapsed_duration\030\001 \001(\010\032\366\001\n\033ConvexA" + + "utomatedStoppingSpec\022\026\n\016max_step_count\030\001" + + " \001(\003\022\026\n\016min_step_count\030\002 \001(\003\022\035\n\025min_meas" + + "urement_count\030\003 \001(\003\022$\n\034learning_rate_par" + + "ameter_name\030\004 \001(\t\022\034\n\024use_elapsed_duratio" + + "n\030\005 \001(\010\022&\n\031update_all_stopped_trials\030\006 \001" + + "(\010H\000\210\001\001B\034\n\032_update_all_stopped_trials\032\235\001" + + "\n\020ConvexStopConfig\022\025\n\rmax_num_steps\030\001 \001(" + + "\003\022\025\n\rmin_num_steps\030\002 \001(\003\022\034\n\024autoregressi" + + "ve_order\030\003 \001(\003\022$\n\034learning_rate_paramete" + + "r_name\030\004 \001(\t\022\023\n\013use_seconds\030\005 \001(\010:\002\030\001\032[\n" + + "\026TransferLearningConfig\022!\n\031disable_trans" + + "fer_learning\030\001 \001(\010\022\036\n\021prior_study_names\030" + + "\002 \003(\tB\003\340A\003\"J\n\tAlgorithm\022\031\n\025ALGORITHM_UNS" + + "PECIFIED\020\000\022\017\n\013GRID_SEARCH\020\002\022\021\n\rRANDOM_SE" + + "ARCH\020\003\"H\n\020ObservationNoise\022!\n\035OBSERVATIO" + + "N_NOISE_UNSPECIFIED\020\000\022\007\n\003LOW\020\001\022\010\n\004HIGH\020\002" + + "\"r\n\030MeasurementSelectionType\022*\n&MEASUREM" + + "ENT_SELECTION_TYPE_UNSPECIFIED\020\000\022\024\n\020LAST" + + "_MEASUREMENT\020\001\022\024\n\020BEST_MEASUREMENT\020\002B\031\n\027" + + "automated_stopping_spec\"\341\001\n\013Measurement\022" + + "8\n\020elapsed_duration\030\001 \001(\0132\031.google.proto" + + "buf.DurationB\003\340A\003\022\027\n\nstep_count\030\002 \001(\003B\003\340" + + "A\003\022I\n\007metrics\030\003 \003(\01323.google.cloud.aipla" + + "tform.v1beta1.Measurement.MetricB\003\340A\003\0324\n" + + "\006Metric\022\026\n\tmetric_id\030\001 \001(\tB\003\340A\003\022\022\n\005value" + + "\030\002 \001(\001B\003\340A\003B\341\001\n#com.google.cloud.aiplatf" + + "orm.v1beta1B\nStudyProtoP\001ZCcloud.google." + + "com/go/aiplatform/apiv1beta1/aiplatformp" + + "b;aiplatformpb\252\002\037Google.Cloud.AIPlatform" + + ".V1Beta1\312\002\037Google\\Cloud\\AIPlatform\\V1bet" + + "a1\352\002\"Google::Cloud::AIPlatform::V1beta1b" + + "\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -358,7 +369,17 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_aiplatform_v1beta1_StudySpec_MetricSpec_descriptor, new java.lang.String[] { - "MetricId", "Goal", + "MetricId", "Goal", "SafetyConfig", "SafetyConfig", + }); + internal_static_google_cloud_aiplatform_v1beta1_StudySpec_MetricSpec_SafetyMetricConfig_descriptor = + internal_static_google_cloud_aiplatform_v1beta1_StudySpec_MetricSpec_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_aiplatform_v1beta1_StudySpec_MetricSpec_SafetyMetricConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_aiplatform_v1beta1_StudySpec_MetricSpec_SafetyMetricConfig_descriptor, + new java.lang.String[] { + "SafetyThreshold", "DesiredMinSafeTrialsFraction", "DesiredMinSafeTrialsFraction", }); internal_static_google_cloud_aiplatform_v1beta1_StudySpec_ParameterSpec_descriptor = internal_static_google_cloud_aiplatform_v1beta1_StudySpec_descriptor diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/StudySpec.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/StudySpec.java index 72eb5f25ddc3..de449b823935 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/StudySpec.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/StudySpec.java @@ -633,6 +633,51 @@ public interface MetricSpecOrBuilder * @return The goal. */ com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.GoalType getGoal(); + + /** + * + * + *
+     * Used for safe search. In the case, the metric will be a safety
+     * metric. You must provide a separate metric for objective metric.
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig safety_config = 3; + * + * + * @return Whether the safetyConfig field is set. + */ + boolean hasSafetyConfig(); + /** + * + * + *
+     * Used for safe search. In the case, the metric will be a safety
+     * metric. You must provide a separate metric for objective metric.
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig safety_config = 3; + * + * + * @return The safetyConfig. + */ + com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig getSafetyConfig(); + /** + * + * + *
+     * Used for safe search. In the case, the metric will be a safety
+     * metric. You must provide a separate metric for objective metric.
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig safety_config = 3; + * + */ + com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfigOrBuilder + getSafetyConfigOrBuilder(); } /** * @@ -804,45 +849,835 @@ public GoalType findValueByNumber(int 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."); + 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.StudySpec.MetricSpec.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final GoalType[] VALUES = values(); + + public static GoalType 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 GoalType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.GoalType) + } + + public interface SafetyMetricConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Safety threshold (boundary value between safe and unsafe). NOTE that if
+       * you leave SafetyMetricConfig unset, a default value of 0 will be used.
+       * 
+ * + * double safety_threshold = 1; + * + * @return The safetyThreshold. + */ + double getSafetyThreshold(); + + /** + * + * + *
+       * Desired minimum fraction of safe trials (over total number of trials)
+       * that should be targeted by the algorithm at any time during the
+       * study (best effort). This should be between 0.0 and 1.0 and a value of
+       * 0.0 means that there is no minimum and an algorithm proceeds without
+       * targeting any specific fraction. A value of 1.0 means that the
+       * algorithm attempts to only Suggest safe Trials.
+       * 
+ * + * optional double desired_min_safe_trials_fraction = 2; + * + * @return Whether the desiredMinSafeTrialsFraction field is set. + */ + boolean hasDesiredMinSafeTrialsFraction(); + /** + * + * + *
+       * Desired minimum fraction of safe trials (over total number of trials)
+       * that should be targeted by the algorithm at any time during the
+       * study (best effort). This should be between 0.0 and 1.0 and a value of
+       * 0.0 means that there is no minimum and an algorithm proceeds without
+       * targeting any specific fraction. A value of 1.0 means that the
+       * algorithm attempts to only Suggest safe Trials.
+       * 
+ * + * optional double desired_min_safe_trials_fraction = 2; + * + * @return The desiredMinSafeTrialsFraction. + */ + double getDesiredMinSafeTrialsFraction(); + } + /** + * + * + *
+     * Used in safe optimization to specify threshold levels and risk tolerance.
+     * 
+ * + * Protobuf type {@code google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig} + */ + public static final class SafetyMetricConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig) + SafetyMetricConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use SafetyMetricConfig.newBuilder() to construct. + private SafetyMetricConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SafetyMetricConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SafetyMetricConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.StudyProto + .internal_static_google_cloud_aiplatform_v1beta1_StudySpec_MetricSpec_SafetyMetricConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.StudyProto + .internal_static_google_cloud_aiplatform_v1beta1_StudySpec_MetricSpec_SafetyMetricConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig.class, + com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig.Builder + .class); + } + + private int bitField0_; + public static final int SAFETY_THRESHOLD_FIELD_NUMBER = 1; + private double safetyThreshold_ = 0D; + /** + * + * + *
+       * Safety threshold (boundary value between safe and unsafe). NOTE that if
+       * you leave SafetyMetricConfig unset, a default value of 0 will be used.
+       * 
+ * + * double safety_threshold = 1; + * + * @return The safetyThreshold. + */ + @java.lang.Override + public double getSafetyThreshold() { + return safetyThreshold_; + } + + public static final int DESIRED_MIN_SAFE_TRIALS_FRACTION_FIELD_NUMBER = 2; + private double desiredMinSafeTrialsFraction_ = 0D; + /** + * + * + *
+       * Desired minimum fraction of safe trials (over total number of trials)
+       * that should be targeted by the algorithm at any time during the
+       * study (best effort). This should be between 0.0 and 1.0 and a value of
+       * 0.0 means that there is no minimum and an algorithm proceeds without
+       * targeting any specific fraction. A value of 1.0 means that the
+       * algorithm attempts to only Suggest safe Trials.
+       * 
+ * + * optional double desired_min_safe_trials_fraction = 2; + * + * @return Whether the desiredMinSafeTrialsFraction field is set. + */ + @java.lang.Override + public boolean hasDesiredMinSafeTrialsFraction() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * Desired minimum fraction of safe trials (over total number of trials)
+       * that should be targeted by the algorithm at any time during the
+       * study (best effort). This should be between 0.0 and 1.0 and a value of
+       * 0.0 means that there is no minimum and an algorithm proceeds without
+       * targeting any specific fraction. A value of 1.0 means that the
+       * algorithm attempts to only Suggest safe Trials.
+       * 
+ * + * optional double desired_min_safe_trials_fraction = 2; + * + * @return The desiredMinSafeTrialsFraction. + */ + @java.lang.Override + public double getDesiredMinSafeTrialsFraction() { + return desiredMinSafeTrialsFraction_; + } + + 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(safetyThreshold_) != 0) { + output.writeDouble(1, safetyThreshold_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeDouble(2, desiredMinSafeTrialsFraction_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Double.doubleToRawLongBits(safetyThreshold_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(1, safetyThreshold_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeDoubleSize( + 2, desiredMinSafeTrialsFraction_); + } + 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.StudySpec.MetricSpec.SafetyMetricConfig)) { + return super.equals(obj); + } + com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig other = + (com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig) obj; + + if (java.lang.Double.doubleToLongBits(getSafetyThreshold()) + != java.lang.Double.doubleToLongBits(other.getSafetyThreshold())) return false; + if (hasDesiredMinSafeTrialsFraction() != other.hasDesiredMinSafeTrialsFraction()) + return false; + if (hasDesiredMinSafeTrialsFraction()) { + if (java.lang.Double.doubleToLongBits(getDesiredMinSafeTrialsFraction()) + != java.lang.Double.doubleToLongBits(other.getDesiredMinSafeTrialsFraction())) + 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) + SAFETY_THRESHOLD_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getSafetyThreshold())); + if (hasDesiredMinSafeTrialsFraction()) { + hash = (37 * hash) + DESIRED_MIN_SAFE_TRIALS_FRACTION_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getDesiredMinSafeTrialsFraction())); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig + 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.StudySpec.MetricSpec.SafetyMetricConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig + 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.StudySpec.MetricSpec.SafetyMetricConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig + 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.StudySpec.MetricSpec.SafetyMetricConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig + 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.StudySpec.MetricSpec.SafetyMetricConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig + 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.StudySpec.MetricSpec.SafetyMetricConfig + 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.StudySpec.MetricSpec.SafetyMetricConfig + 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.StudySpec.MetricSpec.SafetyMetricConfig 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; + } + /** + * + * + *
+       * Used in safe optimization to specify threshold levels and risk tolerance.
+       * 
+ * + * Protobuf type {@code + * google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig) + com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.aiplatform.v1beta1.StudyProto + .internal_static_google_cloud_aiplatform_v1beta1_StudySpec_MetricSpec_SafetyMetricConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.aiplatform.v1beta1.StudyProto + .internal_static_google_cloud_aiplatform_v1beta1_StudySpec_MetricSpec_SafetyMetricConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig.class, + com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig + .Builder.class); + } + + // Construct using + // com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + safetyThreshold_ = 0D; + desiredMinSafeTrialsFraction_ = 0D; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.aiplatform.v1beta1.StudyProto + .internal_static_google_cloud_aiplatform_v1beta1_StudySpec_MetricSpec_SafetyMetricConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig + getDefaultInstanceForType() { + return com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig build() { + com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig + buildPartial() { + com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig result = + new com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.safetyThreshold_ = safetyThreshold_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.desiredMinSafeTrialsFraction_ = desiredMinSafeTrialsFraction_; + 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.StudySpec.MetricSpec.SafetyMetricConfig) { + return mergeFrom( + (com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig other) { + if (other + == com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig + .getDefaultInstance()) return this; + if (other.getSafetyThreshold() != 0D) { + setSafetyThreshold(other.getSafetyThreshold()); + } + if (other.hasDesiredMinSafeTrialsFraction()) { + setDesiredMinSafeTrialsFraction(other.getDesiredMinSafeTrialsFraction()); + } + 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: + { + safetyThreshold_ = input.readDouble(); + bitField0_ |= 0x00000001; + break; + } // case 9 + case 17: + { + desiredMinSafeTrialsFraction_ = input.readDouble(); + bitField0_ |= 0x00000002; + break; + } // case 17 + 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 safetyThreshold_; + /** + * + * + *
+         * Safety threshold (boundary value between safe and unsafe). NOTE that if
+         * you leave SafetyMetricConfig unset, a default value of 0 will be used.
+         * 
+ * + * double safety_threshold = 1; + * + * @return The safetyThreshold. + */ + @java.lang.Override + public double getSafetyThreshold() { + return safetyThreshold_; + } + /** + * + * + *
+         * Safety threshold (boundary value between safe and unsafe). NOTE that if
+         * you leave SafetyMetricConfig unset, a default value of 0 will be used.
+         * 
+ * + * double safety_threshold = 1; + * + * @param value The safetyThreshold to set. + * @return This builder for chaining. + */ + public Builder setSafetyThreshold(double value) { + + safetyThreshold_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * Safety threshold (boundary value between safe and unsafe). NOTE that if
+         * you leave SafetyMetricConfig unset, a default value of 0 will be used.
+         * 
+ * + * double safety_threshold = 1; + * + * @return This builder for chaining. + */ + public Builder clearSafetyThreshold() { + bitField0_ = (bitField0_ & ~0x00000001); + safetyThreshold_ = 0D; + onChanged(); + return this; + } + + private double desiredMinSafeTrialsFraction_; + /** + * + * + *
+         * Desired minimum fraction of safe trials (over total number of trials)
+         * that should be targeted by the algorithm at any time during the
+         * study (best effort). This should be between 0.0 and 1.0 and a value of
+         * 0.0 means that there is no minimum and an algorithm proceeds without
+         * targeting any specific fraction. A value of 1.0 means that the
+         * algorithm attempts to only Suggest safe Trials.
+         * 
+ * + * optional double desired_min_safe_trials_fraction = 2; + * + * @return Whether the desiredMinSafeTrialsFraction field is set. + */ + @java.lang.Override + public boolean hasDesiredMinSafeTrialsFraction() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+         * Desired minimum fraction of safe trials (over total number of trials)
+         * that should be targeted by the algorithm at any time during the
+         * study (best effort). This should be between 0.0 and 1.0 and a value of
+         * 0.0 means that there is no minimum and an algorithm proceeds without
+         * targeting any specific fraction. A value of 1.0 means that the
+         * algorithm attempts to only Suggest safe Trials.
+         * 
+ * + * optional double desired_min_safe_trials_fraction = 2; + * + * @return The desiredMinSafeTrialsFraction. + */ + @java.lang.Override + public double getDesiredMinSafeTrialsFraction() { + return desiredMinSafeTrialsFraction_; + } + /** + * + * + *
+         * Desired minimum fraction of safe trials (over total number of trials)
+         * that should be targeted by the algorithm at any time during the
+         * study (best effort). This should be between 0.0 and 1.0 and a value of
+         * 0.0 means that there is no minimum and an algorithm proceeds without
+         * targeting any specific fraction. A value of 1.0 means that the
+         * algorithm attempts to only Suggest safe Trials.
+         * 
+ * + * optional double desired_min_safe_trials_fraction = 2; + * + * @param value The desiredMinSafeTrialsFraction to set. + * @return This builder for chaining. + */ + public Builder setDesiredMinSafeTrialsFraction(double value) { + + desiredMinSafeTrialsFraction_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Desired minimum fraction of safe trials (over total number of trials)
+         * that should be targeted by the algorithm at any time during the
+         * study (best effort). This should be between 0.0 and 1.0 and a value of
+         * 0.0 means that there is no minimum and an algorithm proceeds without
+         * targeting any specific fraction. A value of 1.0 means that the
+         * algorithm attempts to only Suggest safe Trials.
+         * 
+ * + * optional double desired_min_safe_trials_fraction = 2; + * + * @return This builder for chaining. + */ + public Builder clearDesiredMinSafeTrialsFraction() { + bitField0_ = (bitField0_ & ~0x00000002); + desiredMinSafeTrialsFraction_ = 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); } - return getDescriptor().getValues().get(ordinal()); + + // @@protoc_insertion_point(builder_scope:google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig) } - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); + // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig) + private static final com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec + .SafetyMetricConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig(); } - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.getDescriptor() - .getEnumTypes() - .get(0); + public static com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; } - private static final GoalType[] VALUES = values(); + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SafetyMetricConfig 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 GoalType 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.protobuf.Parser parser() { + return PARSER; } - private final int value; - - private GoalType(int value) { - this.value = value; + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; } - // @@protoc_insertion_point(enum_scope:google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.GoalType) + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } + private int bitField0_; public static final int METRIC_ID_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -937,6 +1772,70 @@ public com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.GoalType getGoal : result; } + public static final int SAFETY_CONFIG_FIELD_NUMBER = 3; + private com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig + safetyConfig_; + /** + * + * + *
+     * Used for safe search. In the case, the metric will be a safety
+     * metric. You must provide a separate metric for objective metric.
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig safety_config = 3; + * + * + * @return Whether the safetyConfig field is set. + */ + @java.lang.Override + public boolean hasSafetyConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Used for safe search. In the case, the metric will be a safety
+     * metric. You must provide a separate metric for objective metric.
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig safety_config = 3; + * + * + * @return The safetyConfig. + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig + getSafetyConfig() { + return safetyConfig_ == null + ? com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig + .getDefaultInstance() + : safetyConfig_; + } + /** + * + * + *
+     * Used for safe search. In the case, the metric will be a safety
+     * metric. You must provide a separate metric for objective metric.
+     * 
+ * + * + * optional .google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig safety_config = 3; + * + */ + @java.lang.Override + public com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfigOrBuilder + getSafetyConfigOrBuilder() { + return safetyConfig_ == null + ? com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig + .getDefaultInstance() + : safetyConfig_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -959,6 +1858,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(2, goal_); } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getSafetyConfig()); + } getUnknownFields().writeTo(output); } @@ -976,6 +1878,9 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, goal_); } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getSafetyConfig()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -994,6 +1899,10 @@ public boolean equals(final java.lang.Object obj) { if (!getMetricId().equals(other.getMetricId())) return false; if (goal_ != other.goal_) return false; + if (hasSafetyConfig() != other.hasSafetyConfig()) return false; + if (hasSafetyConfig()) { + if (!getSafetyConfig().equals(other.getSafetyConfig())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1009,6 +1918,10 @@ public int hashCode() { hash = (53 * hash) + getMetricId().hashCode(); hash = (37 * hash) + GOAL_FIELD_NUMBER; hash = (53 * hash) + goal_; + if (hasSafetyConfig()) { + hash = (37 * hash) + SAFETY_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getSafetyConfig().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -1141,10 +2054,19 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.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) { + getSafetyConfigFieldBuilder(); + } } @java.lang.Override @@ -1153,6 +2075,11 @@ public Builder clear() { bitField0_ = 0; metricId_ = ""; goal_ = 0; + safetyConfig_ = null; + if (safetyConfigBuilder_ != null) { + safetyConfigBuilder_.dispose(); + safetyConfigBuilder_ = null; + } return this; } @@ -1195,6 +2122,13 @@ private void buildPartial0(com.google.cloud.aiplatform.v1beta1.StudySpec.MetricS if (((from_bitField0_ & 0x00000002) != 0)) { result.goal_ = goal_; } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.safetyConfig_ = + safetyConfigBuilder_ == null ? safetyConfig_ : safetyConfigBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -1253,6 +2187,9 @@ public Builder mergeFrom(com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpe if (other.goal_ != 0) { setGoalValue(other.getGoalValue()); } + if (other.hasSafetyConfig()) { + mergeSafetyConfig(other.getSafetyConfig()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1291,6 +2228,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000002; break; } // case 16 + case 26: + { + input.readMessage(getSafetyConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1524,6 +2467,230 @@ public Builder clearGoal() { return this; } + private com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig + safetyConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig, + com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig.Builder, + com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfigOrBuilder> + safetyConfigBuilder_; + /** + * + * + *
+       * Used for safe search. In the case, the metric will be a safety
+       * metric. You must provide a separate metric for objective metric.
+       * 
+ * + * + * optional .google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig safety_config = 3; + * + * + * @return Whether the safetyConfig field is set. + */ + public boolean hasSafetyConfig() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+       * Used for safe search. In the case, the metric will be a safety
+       * metric. You must provide a separate metric for objective metric.
+       * 
+ * + * + * optional .google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig safety_config = 3; + * + * + * @return The safetyConfig. + */ + public com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig + getSafetyConfig() { + if (safetyConfigBuilder_ == null) { + return safetyConfig_ == null + ? com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig + .getDefaultInstance() + : safetyConfig_; + } else { + return safetyConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Used for safe search. In the case, the metric will be a safety
+       * metric. You must provide a separate metric for objective metric.
+       * 
+ * + * + * optional .google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig safety_config = 3; + * + */ + public Builder setSafetyConfig( + com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig value) { + if (safetyConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + safetyConfig_ = value; + } else { + safetyConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Used for safe search. In the case, the metric will be a safety
+       * metric. You must provide a separate metric for objective metric.
+       * 
+ * + * + * optional .google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig safety_config = 3; + * + */ + public Builder setSafetyConfig( + com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig.Builder + builderForValue) { + if (safetyConfigBuilder_ == null) { + safetyConfig_ = builderForValue.build(); + } else { + safetyConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Used for safe search. In the case, the metric will be a safety
+       * metric. You must provide a separate metric for objective metric.
+       * 
+ * + * + * optional .google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig safety_config = 3; + * + */ + public Builder mergeSafetyConfig( + com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig value) { + if (safetyConfigBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && safetyConfig_ != null + && safetyConfig_ + != com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig + .getDefaultInstance()) { + getSafetyConfigBuilder().mergeFrom(value); + } else { + safetyConfig_ = value; + } + } else { + safetyConfigBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Used for safe search. In the case, the metric will be a safety
+       * metric. You must provide a separate metric for objective metric.
+       * 
+ * + * + * optional .google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig safety_config = 3; + * + */ + public Builder clearSafetyConfig() { + bitField0_ = (bitField0_ & ~0x00000004); + safetyConfig_ = null; + if (safetyConfigBuilder_ != null) { + safetyConfigBuilder_.dispose(); + safetyConfigBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Used for safe search. In the case, the metric will be a safety
+       * metric. You must provide a separate metric for objective metric.
+       * 
+ * + * + * optional .google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig safety_config = 3; + * + */ + public com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig.Builder + getSafetyConfigBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getSafetyConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Used for safe search. In the case, the metric will be a safety
+       * metric. You must provide a separate metric for objective metric.
+       * 
+ * + * + * optional .google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig safety_config = 3; + * + */ + public com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfigOrBuilder + getSafetyConfigOrBuilder() { + if (safetyConfigBuilder_ != null) { + return safetyConfigBuilder_.getMessageOrBuilder(); + } else { + return safetyConfig_ == null + ? com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig + .getDefaultInstance() + : safetyConfig_; + } + } + /** + * + * + *
+       * Used for safe search. In the case, the metric will be a safety
+       * metric. You must provide a separate metric for objective metric.
+       * 
+ * + * + * optional .google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig safety_config = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig, + com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig.Builder, + com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfigOrBuilder> + getSafetyConfigFieldBuilder() { + if (safetyConfigBuilder_ == null) { + safetyConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig, + com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec.SafetyMetricConfig + .Builder, + com.google.cloud.aiplatform.v1beta1.StudySpec.MetricSpec + .SafetyMetricConfigOrBuilder>( + getSafetyConfig(), getParentForChildren(), isClean()); + safetyConfig_ = null; + } + return safetyConfigBuilder_; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -18625,7 +19792,7 @@ public boolean hasMedianAutomatedStoppingSpec() { * * * @deprecated google.cloud.aiplatform.v1beta1.StudySpec.convex_stop_config is deprecated. See - * google/cloud/aiplatform/v1beta1/study.proto;l=588 + * google/cloud/aiplatform/v1beta1/study.proto;l=607 * @return Whether the convexStopConfig field is set. */ @java.lang.Override @@ -18646,7 +19813,7 @@ public boolean hasConvexStopConfig() { * * * @deprecated google.cloud.aiplatform.v1beta1.StudySpec.convex_stop_config is deprecated. See - * google/cloud/aiplatform/v1beta1/study.proto;l=588 + * google/cloud/aiplatform/v1beta1/study.proto;l=607 * @return The convexStopConfig. */ @java.lang.Override @@ -20368,7 +21535,7 @@ public Builder clearMedianAutomatedStoppingSpec() { * * * @deprecated google.cloud.aiplatform.v1beta1.StudySpec.convex_stop_config is deprecated. See - * google/cloud/aiplatform/v1beta1/study.proto;l=588 + * google/cloud/aiplatform/v1beta1/study.proto;l=607 * @return Whether the convexStopConfig field is set. */ @java.lang.Override @@ -20389,7 +21556,7 @@ public boolean hasConvexStopConfig() { * * * @deprecated google.cloud.aiplatform.v1beta1.StudySpec.convex_stop_config is deprecated. See - * google/cloud/aiplatform/v1beta1/study.proto;l=588 + * google/cloud/aiplatform/v1beta1/study.proto;l=607 * @return The convexStopConfig. */ @java.lang.Override diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/StudySpecOrBuilder.java b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/StudySpecOrBuilder.java index 8345bf5be7a4..56d5e56ad171 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/StudySpecOrBuilder.java +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/java/com/google/cloud/aiplatform/v1beta1/StudySpecOrBuilder.java @@ -122,7 +122,7 @@ public interface StudySpecOrBuilder * * * @deprecated google.cloud.aiplatform.v1beta1.StudySpec.convex_stop_config is deprecated. See - * google/cloud/aiplatform/v1beta1/study.proto;l=588 + * google/cloud/aiplatform/v1beta1/study.proto;l=607 * @return Whether the convexStopConfig field is set. */ @java.lang.Deprecated @@ -140,7 +140,7 @@ public interface StudySpecOrBuilder * * * @deprecated google.cloud.aiplatform.v1beta1.StudySpec.convex_stop_config is deprecated. See - * google/cloud/aiplatform/v1beta1/study.proto;l=588 + * google/cloud/aiplatform/v1beta1/study.proto;l=607 * @return The convexStopConfig. */ @java.lang.Deprecated diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/endpoint.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/endpoint.proto index ad084fce5055..e5528607bf1e 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/endpoint.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/endpoint.proto @@ -96,7 +96,7 @@ message Endpoint { // this key. EncryptionSpec encryption_spec = 10; - // The full name of the Google Compute Engine + // Optional. The full name of the Google Compute Engine // [network](https://cloud.google.com//compute/docs/networks-and-firewalls#networks) // to which the Endpoint should be peered. // @@ -113,6 +113,7 @@ message Endpoint { // Where `{project}` is a project number, as in `12345`, and `{network}` is // network name. string network = 13 [ + (google.api.field_behavior) = OPTIONAL, (google.api.resource_reference) = { type: "compute.googleapis.com/Network" } ]; @@ -213,6 +214,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.v1beta1.Model.explanation_spec] + // or + // [explanation_spec][google.cloud.aiplatform.v1beta1.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 @@ -228,6 +236,8 @@ message DeployedModel { // Only supported for custom-trained Models and AutoML Tabular Models. bool enable_container_logging = 12; + // If true, online prediction access logs are sent to StackDriver + // Logging. // These logs are like standard server access logs, containing // information like timestamp and latency for each prediction request. // diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/index_endpoint.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/index_endpoint.proto index 59a3f7afa72e..fc387c80b1bc 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/index_endpoint.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/index_endpoint.proto @@ -19,6 +19,7 @@ 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/service_networking.proto"; import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1"; @@ -102,6 +103,14 @@ message IndexEndpoint { // can be set. bool enable_private_service_connect = 10 [deprecated = true, (google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration for private service connect. + // + // [network][google.cloud.aiplatform.v1beta1.IndexEndpoint.network] and + // [private_service_connect_config][google.cloud.aiplatform.v1beta1.IndexEndpoint.private_service_connect_config] + // are mutually exclusive. + PrivateServiceConnectConfig private_service_connect_config = 12 + [(google.api.field_behavior) = OPTIONAL]; } // A deployment of an Index. IndexEndpoints contain one or more DeployedIndexes. @@ -178,10 +187,10 @@ message DeployedIndex { // e2-standard-16 and all machine types available for LARGE shard. // // Available machine types for LARGE shard: - // e2-standard-32, e2-highmem-16, n2d-standard-32. + // e2-highmem-16, n2d-standard-32. // // n1-standard-16 and n1-standard-32 are still available, but we recommend - // e2-standard-16 and e2-standard-32 for cost efficiency. + // e2-standard-16 and e2-highmem-16 for cost efficiency. DedicatedResources dedicated_resources = 16 [(google.api.field_behavior) = OPTIONAL]; diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/job_service.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/job_service.proto index e3416ee783b1..abde6266bf89 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/job_service.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/job_service.proto @@ -25,6 +25,7 @@ import "google/cloud/aiplatform/v1beta1/custom_job.proto"; import "google/cloud/aiplatform/v1beta1/data_labeling_job.proto"; import "google/cloud/aiplatform/v1beta1/hyperparameter_tuning_job.proto"; import "google/cloud/aiplatform/v1beta1/model_deployment_monitoring_job.proto"; +import "google/cloud/aiplatform/v1beta1/nas_job.proto"; import "google/cloud/aiplatform/v1beta1/operation.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/empty.proto"; @@ -43,7 +44,8 @@ option ruby_package = "Google::Cloud::AIPlatform::V1beta1"; service JobService { option (google.api.default_host) = "aiplatform.googleapis.com"; option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud-platform.read-only"; // Creates a CustomJob. A created CustomJob right away // will be attempted to be run. @@ -219,6 +221,81 @@ service JobService { option (google.api.method_signature) = "name"; } + // Creates a NasJob + rpc CreateNasJob(CreateNasJobRequest) returns (NasJob) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*}/nasJobs" + body: "nas_job" + }; + option (google.api.method_signature) = "parent,nas_job"; + } + + // Gets a NasJob + rpc GetNasJob(GetNasJobRequest) returns (NasJob) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/nasJobs/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists NasJobs in a Location. + rpc ListNasJobs(ListNasJobsRequest) returns (ListNasJobsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*}/nasJobs" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a NasJob. + rpc DeleteNasJob(DeleteNasJobRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/*/nasJobs/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "DeleteOperationMetadata" + }; + } + + // Cancels a NasJob. + // Starts asynchronous cancellation on the NasJob. The server + // makes a best effort to cancel the job, but success is not + // guaranteed. Clients can use + // [JobService.GetNasJob][google.cloud.aiplatform.v1beta1.JobService.GetNasJob] + // or other methods to check whether the cancellation succeeded or whether the + // job completed despite cancellation. On successful cancellation, + // the NasJob is not deleted; instead it becomes a job with + // a [NasJob.error][google.cloud.aiplatform.v1beta1.NasJob.error] value with a + // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + // `Code.CANCELLED`, and + // [NasJob.state][google.cloud.aiplatform.v1beta1.NasJob.state] is set to + // `CANCELLED`. + rpc CancelNasJob(CancelNasJobRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/nasJobs/*}:cancel" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Gets a NasTrialDetail. + rpc GetNasTrialDetail(GetNasTrialDetailRequest) returns (NasTrialDetail) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/nasJobs/*/nasTrialDetails/*}" + }; + option (google.api.method_signature) = "name"; + } + + // List top NasTrialDetails of a NasJob. + rpc ListNasTrialDetails(ListNasTrialDetailsRequest) + returns (ListNasTrialDetailsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*/nasJobs/*}/nasTrialDetails" + }; + option (google.api.method_signature) = "parent"; + } + // Creates a BatchPredictionJob. A BatchPredictionJob once created will // right away be attempted to start. rpc CreateBatchPredictionJob(CreateBatchPredictionJobRequest) @@ -752,6 +829,180 @@ message CancelHyperparameterTuningJobRequest { ]; } +// Request message for +// [JobService.CreateNasJob][google.cloud.aiplatform.v1beta1.JobService.CreateNasJob]. +message CreateNasJobRequest { + // Required. The resource name of the Location to create the NasJob 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 NasJob to create. + NasJob nas_job = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for +// [JobService.GetNasJob][google.cloud.aiplatform.v1beta1.JobService.GetNasJob]. +message GetNasJobRequest { + // Required. The name of the NasJob resource. + // Format: + // `projects/{project}/locations/{location}/nasJobs/{nas_job}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/NasJob" + } + ]; +} + +// Request message for +// [JobService.ListNasJobs][google.cloud.aiplatform.v1beta1.JobService.ListNasJobs]. +message ListNasJobsRequest { + // Required. The resource name of the Location to list the NasJobs + // from. Format: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // The standard list filter. + // + // Supported fields: + // + // * `display_name` supports `=`, `!=` comparisons, and `:` wildcard. + // * `state` supports `=`, `!=` comparisons. + // * `create_time` supports `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons. + // `create_time` must be in RFC 3339 format. + // * `labels` supports general map functions that is: + // `labels.key=value` - key:value equality + // `labels.key:* - key existence + // + // Some examples of using the filter are: + // + // * `state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*"` + // * `state!="JOB_STATE_FAILED" OR display_name="my_job"` + // * `NOT display_name="my_job"` + // * `create_time>"2021-05-18T00:00:00Z"` + // * `labels.keyA=valueA` + // * `labels.keyB:*` + string filter = 2; + + // The standard list page size. + int32 page_size = 3; + + // The standard list page token. + // Typically obtained via + // [ListNasJobsResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListNasJobsResponse.next_page_token] + // of the previous + // [JobService.ListNasJobs][google.cloud.aiplatform.v1beta1.JobService.ListNasJobs] + // call. + string page_token = 4; + + // Mask specifying which fields to read. + google.protobuf.FieldMask read_mask = 5; +} + +// Response message for +// [JobService.ListNasJobs][google.cloud.aiplatform.v1beta1.JobService.ListNasJobs] +message ListNasJobsResponse { + // List of NasJobs in the requested page. + // [NasJob.nas_job_output][google.cloud.aiplatform.v1beta1.NasJob.nas_job_output] + // of the jobs will not be returned. + repeated NasJob nas_jobs = 1; + + // A token to retrieve the next page of results. + // Pass to + // [ListNasJobsRequest.page_token][google.cloud.aiplatform.v1beta1.ListNasJobsRequest.page_token] + // to obtain that page. + string next_page_token = 2; +} + +// Request message for +// [JobService.DeleteNasJob][google.cloud.aiplatform.v1beta1.JobService.DeleteNasJob]. +message DeleteNasJobRequest { + // Required. The name of the NasJob resource to be deleted. + // Format: + // `projects/{project}/locations/{location}/nasJobs/{nas_job}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/NasJob" + } + ]; +} + +// Request message for +// [JobService.CancelNasJob][google.cloud.aiplatform.v1beta1.JobService.CancelNasJob]. +message CancelNasJobRequest { + // Required. The name of the NasJob to cancel. + // Format: + // `projects/{project}/locations/{location}/nasJobs/{nas_job}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/NasJob" + } + ]; +} + +// Request message for +// [JobService.GetNasTrialDetail][google.cloud.aiplatform.v1beta1.JobService.GetNasTrialDetail]. +message GetNasTrialDetailRequest { + // Required. The name of the NasTrialDetail resource. + // Format: + // `projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/NasTrialDetail" + } + ]; +} + +// Request message for +// [JobService.ListNasTrialDetails][google.cloud.aiplatform.v1beta1.JobService.ListNasTrialDetails]. +message ListNasTrialDetailsRequest { + // Required. The name of the NasJob resource. + // Format: + // `projects/{project}/locations/{location}/nasJobs/{nas_job}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/NasJob" + } + ]; + + // The standard list page size. + int32 page_size = 2; + + // The standard list page token. + // Typically obtained via + // [ListNasTrialDetailsResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListNasTrialDetailsResponse.next_page_token] + // of the previous + // [JobService.ListNasTrialDetails][google.cloud.aiplatform.v1beta1.JobService.ListNasTrialDetails] + // call. + string page_token = 3; +} + +// Response message for +// [JobService.ListNasTrialDetails][google.cloud.aiplatform.v1beta1.JobService.ListNasTrialDetails] +message ListNasTrialDetailsResponse { + // List of top NasTrials in the requested page. + repeated NasTrialDetail nas_trial_details = 1; + + // A token to retrieve the next page of results. + // Pass to + // [ListNasTrialDetailsRequest.page_token][google.cloud.aiplatform.v1beta1.ListNasTrialDetailsRequest.page_token] + // to obtain that page. + string next_page_token = 2; +} + // Request message for // [JobService.CreateBatchPredictionJob][google.cloud.aiplatform.v1beta1.JobService.CreateBatchPredictionJob]. message CreateBatchPredictionJobRequest { diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/model.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/model.proto index b76ec7d78f72..ed2b51e18485 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/model.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/model.proto @@ -90,6 +90,19 @@ message Model { [(google.api.field_behavior) = OUTPUT_ONLY]; } + // Contains information about the original Model if this Model is a copy. + message OriginalModelInfo { + // Output only. The resource name of the Model this Model is a copy of, + // including the revision. Format: + // `projects/{project}/locations/{location}/models/{model_id}@{version_id}` + string model = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Model" + } + ]; + } + // Identifies a type of Model's prediction resources. enum DeploymentResourcesType { // Should not be used. @@ -380,6 +393,11 @@ message Model { ModelSourceInfo model_source_info = 38 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. If this Model is a copy of another Model, this contains info + // about the original. + OriginalModelInfo original_model_info = 34 + [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. The resource name of the Artifact that was created in // MetadataStore when creating the Model. The Artifact resource name pattern // is diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/model_service.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/model_service.proto index 08ce8bcd95fa..c1a68c12c526 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/model_service.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/model_service.proto @@ -20,6 +20,7 @@ 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/encryption_spec.proto"; import "google/cloud/aiplatform/v1beta1/explanation.proto"; import "google/cloud/aiplatform/v1beta1/io.proto"; import "google/cloud/aiplatform/v1beta1/model.proto"; @@ -166,6 +167,24 @@ service ModelService { }; } + // Copies an already existing Vertex AI Model into the specified Location. + // The source Model must exist in the same Project. + // When copying custom Models, the users themselves are responsible for + // [Model.metadata][google.cloud.aiplatform.v1beta1.Model.metadata] content to + // be region-agnostic, as well as making sure that any resources (e.g. files) + // it depends on remain accessible. + rpc CopyModel(CopyModelRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*}/models:copy" + body: "*" + }; + option (google.api.method_signature) = "parent,source_model"; + option (google.longrunning.operation_info) = { + response_type: "CopyModelResponse" + metadata_type: "CopyModelOperationMetadata" + }; + } + // Imports an externally generated ModelEvaluation. rpc ImportModelEvaluation(ImportModelEvaluationRequest) returns (ModelEvaluation) { @@ -612,6 +631,75 @@ message UpdateExplanationDatasetResponse {} // operation. message ExportModelResponse {} +// Request message for +// [ModelService.CopyModel][google.cloud.aiplatform.v1beta1.ModelService.CopyModel]. +message CopyModelRequest { + // If both fields are unset, a new Model will be created with a generated ID. + oneof destination_model { + // Optional. Copy source_model into a new Model with this ID. The ID will + // become the final component of the model resource name. + // + // This value may be up to 63 characters, and valid characters are + // `[a-z0-9_-]`. The first character cannot be a number or hyphen. + string model_id = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specify this field to copy source_model into this existing + // Model as a new version. Format: + // `projects/{project}/locations/{location}/models/{model}` + string parent_model = 5 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Model" + } + ]; + } + + // Required. The resource name of the Location into which to copy the Model. + // 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 Model to copy. That Model must be in the + // same Project. Format: + // `projects/{project}/locations/{location}/models/{model}` + string source_model = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Model" + } + ]; + + // Customer-managed encryption key options. If this is set, + // then the Model copy will be encrypted with the provided encryption key. + EncryptionSpec encryption_spec = 3; +} + +// Details of +// [ModelService.CopyModel][google.cloud.aiplatform.v1beta1.ModelService.CopyModel] +// operation. +message CopyModelOperationMetadata { + // The common part of the operation metadata. + GenericOperationMetadata generic_metadata = 1; +} + +// Response message of +// [ModelService.CopyModel][google.cloud.aiplatform.v1beta1.ModelService.CopyModel] +// operation. +message CopyModelResponse { + // The name of the copied Model resource. + // Format: `projects/{project}/locations/{location}/models/{model}` + string model = 1 [(google.api.resource_reference) = { + type: "aiplatform.googleapis.com/Model" + }]; + + // Output only. The version ID of the model that is copied. + string model_version_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + // Request message for // [ModelService.ImportModelEvaluation][google.cloud.aiplatform.v1beta1.ModelService.ImportModelEvaluation] message ImportModelEvaluationRequest { diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/nas_job.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/nas_job.proto new file mode 100644 index 000000000000..383d3c5aca2a --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/nas_job.proto @@ -0,0 +1,306 @@ +// 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.aiplatform.v1beta1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/aiplatform/v1beta1/custom_job.proto"; +import "google/cloud/aiplatform/v1beta1/encryption_spec.proto"; +import "google/cloud/aiplatform/v1beta1/job_state.proto"; +import "google/cloud/aiplatform/v1beta1/study.proto"; +import "google/protobuf/timestamp.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 = "NasJobProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1"; +option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1"; +option ruby_package = "Google::Cloud::AIPlatform::V1beta1"; + +// Represents a Neural Architecture Search (NAS) job. +message NasJob { + option (google.api.resource) = { + type: "aiplatform.googleapis.com/NasJob" + pattern: "projects/{project}/locations/{location}/nasJobs/{nas_job}" + }; + + // Output only. Resource name of the NasJob. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The display name of the NasJob. + // 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]; + + // Required. The specification of a NasJob. + NasJobSpec nas_job_spec = 4 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Output of the NasJob. + NasJobOutput nas_job_output = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The detailed state of the job. + JobState state = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the NasJob was created. + google.protobuf.Timestamp create_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the NasJob 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 NasJob entered any of the following states: + // `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`. + google.protobuf.Timestamp end_time = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the NasJob 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]; + + // The labels with user-defined metadata to organize NasJobs. + // + // 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; + + // Customer-managed encryption key options for a NasJob. + // If this is set, then all resources created by the NasJob + // will be encrypted with the provided encryption key. + EncryptionSpec encryption_spec = 13; + + // Optional. Enable a separation of Custom model training + // and restricted image training for tenant project. + bool enable_restricted_image_training = 14 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Represents a NasTrial details along with it's parameters. If there is a +// corresponding train NasTrial, the train NasTrial is also returned. +message NasTrialDetail { + option (google.api.resource) = { + type: "aiplatform.googleapis.com/NasTrialDetail" + pattern: "projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}" + }; + + // Output only. Resource name of the NasTrialDetail. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The parameters for the NasJob NasTrial. + string parameters = 2; + + // The requested search NasTrial. + NasTrial search_trial = 3; + + // The train NasTrial corresponding to + // [search_trial][google.cloud.aiplatform.v1beta1.NasTrialDetail.search_trial]. + // Only populated if + // [search_trial][google.cloud.aiplatform.v1beta1.NasTrialDetail.search_trial] + // is used for training. + NasTrial train_trial = 4; +} + +// Represents the spec of a NasJob. +message NasJobSpec { + // The spec of multi-trial Neural Architecture Search (NAS). + message MultiTrialAlgorithmSpec { + // Represents a metric to optimize. + message MetricSpec { + // The available types of optimization goals. + enum GoalType { + // Goal Type will default to maximize. + GOAL_TYPE_UNSPECIFIED = 0; + + // Maximize the goal metric. + MAXIMIZE = 1; + + // Minimize the goal metric. + MINIMIZE = 2; + } + + // Required. The ID of the metric. Must not contain whitespaces. + string metric_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The optimization goal of the metric. + GoalType goal = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // Represent spec for search trials. + message SearchTrialSpec { + // Required. The spec of a search trial job. The same spec applies to + // all search trials. + CustomJobSpec search_trial_job_spec = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The maximum number of Neural Architecture Search (NAS) trials + // to run. + int32 max_trial_count = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The maximum number of trials to run in parallel. + int32 max_parallel_trial_count = 3 + [(google.api.field_behavior) = REQUIRED]; + + // The number of failed trials that need to be seen before failing + // the NasJob. + // + // If set to 0, Vertex AI decides how many trials must fail + // before the whole job fails. + int32 max_failed_trial_count = 4; + } + + // Represent spec for train trials. + message TrainTrialSpec { + // Required. The spec of a train trial job. The same spec applies to + // all train trials. + CustomJobSpec train_trial_job_spec = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The maximum number of trials to run in parallel. + int32 max_parallel_trial_count = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Frequency of search trials to start train stage. Top N + // [TrainTrialSpec.max_parallel_trial_count] + // search trials will be trained for every M + // [TrainTrialSpec.frequency] trials searched. + int32 frequency = 3 [(google.api.field_behavior) = REQUIRED]; + } + + // The available types of multi-trial algorithms. + enum MultiTrialAlgorithm { + // Defaults to `REINFORCEMENT_LEARNING`. + MULTI_TRIAL_ALGORITHM_UNSPECIFIED = 0; + + // The Reinforcement Learning Algorithm for Multi-trial Neural + // Architecture Search (NAS). + REINFORCEMENT_LEARNING = 1; + + // The Grid Search Algorithm for Multi-trial Neural + // Architecture Search (NAS). + GRID_SEARCH = 2; + } + + // The multi-trial Neural Architecture Search (NAS) algorithm + // type. Defaults to `REINFORCEMENT_LEARNING`. + MultiTrialAlgorithm multi_trial_algorithm = 1; + + // Metric specs for the NAS job. + // Validation for this field is done at `multi_trial_algorithm_spec` field. + MetricSpec metric = 2; + + // Required. Spec for search trials. + SearchTrialSpec search_trial_spec = 3 + [(google.api.field_behavior) = REQUIRED]; + + // Spec for train trials. Top N [TrainTrialSpec.max_parallel_trial_count] + // search trials will be trained for every M + // [TrainTrialSpec.frequency] trials searched. + TrainTrialSpec train_trial_spec = 4; + } + + // The Neural Architecture Search (NAS) algorithm specification. + oneof nas_algorithm_spec { + // The spec of multi-trial algorithms. + MultiTrialAlgorithmSpec multi_trial_algorithm_spec = 2; + } + + // The ID of the existing NasJob in the same Project and Location + // which will be used to resume search. search_space_spec and + // nas_algorithm_spec are obtained from previous NasJob hence should not + // provide them again for this NasJob. + string resume_nas_job_id = 3; + + // It defines the search space for Neural Architecture Search (NAS). + string search_space_spec = 1; +} + +// Represents a uCAIP NasJob output. +message NasJobOutput { + // The output of a multi-trial Neural Architecture Search (NAS) jobs. + message MultiTrialJobOutput { + // Output only. List of NasTrials that were started as part of search stage. + repeated NasTrial search_trials = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. List of NasTrials that were started as part of train stage. + repeated NasTrial train_trials = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // The output of this Neural Architecture Search (NAS) job. + oneof output { + // Output only. The output of this multi-trial Neural Architecture Search + // (NAS) job. + MultiTrialJobOutput multi_trial_job_output = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } +} + +// Represents a uCAIP NasJob trial. +message NasTrial { + // Describes a NasTrial state. + enum State { + // The NasTrial state is unspecified. + STATE_UNSPECIFIED = 0; + + // Indicates that a specific NasTrial has been requested, but it has not yet + // been suggested by the service. + REQUESTED = 1; + + // Indicates that the NasTrial has been suggested. + ACTIVE = 2; + + // Indicates that the NasTrial should stop according to the service. + STOPPING = 3; + + // Indicates that the NasTrial is completed successfully. + SUCCEEDED = 4; + + // Indicates that the NasTrial should not be attempted again. + // The service will set a NasTrial to INFEASIBLE when it's done but missing + // the final_measurement. + INFEASIBLE = 5; + } + + // Output only. The identifier of the NasTrial assigned by the service. + string id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The detailed state of the NasTrial. + State state = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The final measurement containing the objective value. + Measurement final_measurement = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the NasTrial was started. + google.protobuf.Timestamp start_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the NasTrial's status changed to `SUCCEEDED` or + // `INFEASIBLE`. + google.protobuf.Timestamp end_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/pipeline_job.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/pipeline_job.proto index 93edfbdf9f12..88d66b17647b 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/pipeline_job.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/pipeline_job.proto @@ -382,8 +382,6 @@ message PipelineTaskExecutorDetail { // The detailed info for a custom job executor. message CustomJobDetail { - option deprecated = true; - // Output only. The name of the // [CustomJob][google.cloud.aiplatform.v1beta1.CustomJob]. string job = 1 [ @@ -392,6 +390,11 @@ message PipelineTaskExecutorDetail { type: "aiplatform.googleapis.com/CustomJob" } ]; + + // Output only. The names of the previously failed + // [CustomJob][google.cloud.aiplatform.v1beta1.CustomJob]. The list includes + // the all attempts in chronological order. + repeated string failed_jobs = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } oneof details { @@ -401,6 +404,6 @@ message PipelineTaskExecutorDetail { // Output only. The detailed info for a custom job executor. CustomJobDetail custom_job_detail = 2 - [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; + [(google.api.field_behavior) = OUTPUT_ONLY]; } } diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/service_networking.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/service_networking.proto new file mode 100644 index 000000000000..3c3052633ec1 --- /dev/null +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/service_networking.proto @@ -0,0 +1,38 @@ +// 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.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 = "ServiceNetworkingProto"; +option java_package = "com.google.cloud.aiplatform.v1beta1"; +option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1"; +option ruby_package = "Google::Cloud::AIPlatform::V1beta1"; + +// Represents configuration for private service connect. +message PrivateServiceConnectConfig { + // Required. If true, expose the IndexEndpoint via private service connect. + bool enable_private_service_connect = 1 + [(google.api.field_behavior) = REQUIRED]; + + // A list of Projects from which the forwarding rule will target the service + // attachment. + repeated string project_allowlist = 2; +} diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/study.proto b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/study.proto index 8337e9643628..03a9cfb72ea2 100644 --- a/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/study.proto +++ b/java-aiplatform/proto-google-cloud-aiplatform-v1beta1/src/main/proto/google/cloud/aiplatform/v1beta1/study.proto @@ -199,6 +199,21 @@ message Trial { message StudySpec { // Represents a metric to optimize. message MetricSpec { + // Used in safe optimization to specify threshold levels and risk tolerance. + message SafetyMetricConfig { + // Safety threshold (boundary value between safe and unsafe). NOTE that if + // you leave SafetyMetricConfig unset, a default value of 0 will be used. + double safety_threshold = 1; + + // Desired minimum fraction of safe trials (over total number of trials) + // that should be targeted by the algorithm at any time during the + // study (best effort). This should be between 0.0 and 1.0 and a value of + // 0.0 means that there is no minimum and an algorithm proceeds without + // targeting any specific fraction. A value of 1.0 means that the + // algorithm attempts to only Suggest safe Trials. + optional double desired_min_safe_trials_fraction = 2; + } + // The available types of optimization goals. enum GoalType { // Goal Type will default to maximize. @@ -217,6 +232,10 @@ message StudySpec { // Required. The optimization goal of the metric. GoalType goal = 2 [(google.api.field_behavior) = REQUIRED]; + + // Used for safe search. In the case, the metric will be a safety + // metric. You must provide a separate metric for objective metric. + optional SafetyMetricConfig safety_config = 3; } // Represents a single parameter to optimize.