diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/PredictionServiceClient.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/PredictionServiceClient.java index 60d164eb62a1..f82ae404d7e2 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/PredictionServiceClient.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/PredictionServiceClient.java @@ -124,8 +124,18 @@ * * *
StreamRawPredict
Perform a streaming online prediction with an arbitrary HTTP payload.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *streamRawPredictCallable() + *
DirectPredict
Perform an unary online prediction request for Vertex first-party products and frameworks.
Perform an unary online prediction request to a gRPC model server for Vertex first-party products and frameworks.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
*DirectRawPredict
Perform an online prediction request through gRPC.
Perform an unary online prediction request to a gRPC model server for custom containers.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
*StreamDirectPredict
Perform a streaming online prediction request to a gRPC model server for Vertex first-party products and frameworks.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *streamDirectPredictCallable() + *
StreamDirectRawPredict
Perform a streaming online prediction request to a gRPC model server for custom containers.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *streamDirectRawPredictCallable() + *
StreamingPredict
Perform a streaming online prediction request for Vertex first-party products and frameworks.
GenerateContent
Generate content with multimodal inputs.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *generateContent(GenerateContentRequest request) + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
+ *generateContent(String model, List<Content> contents) + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *generateContentCallable() + *
StreamGenerateContent
Generate content with multimodal inputs with streaming support.
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) { + * StreamRawPredictRequest request = + * StreamRawPredictRequest.newBuilder() + * .setEndpoint( + * EndpointName.ofProjectLocationEndpointName( + * "[PROJECT]", "[LOCATION]", "[ENDPOINT]") + * .toString()) + * .setHttpBody(HttpBody.newBuilder().build()) + * .build(); + * ServerStream+ */ + public final ServerStreamingCallablestream = + * predictionServiceClient.streamRawPredictCallable().call(request); + * for (HttpBody response : stream) { + * // Do something when a response is received. + * } + * } + * }
Sample code: * @@ -773,7 +856,8 @@ public final DirectPredictResponse directPredict(DirectPredictRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Perform an unary online prediction request for Vertex first-party products and frameworks. + * Perform an unary online prediction request to a gRPC model server for Vertex first-party + * products and frameworks. * *
Sample code:
*
@@ -806,7 +890,7 @@ public final UnaryCallable Sample code:
*
@@ -839,7 +923,7 @@ public final DirectRawPredictResponse directRawPredict(DirectRawPredictRequest r
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Perform an online prediction request through gRPC.
+ * Perform an unary online prediction request to a gRPC model server for custom containers.
*
* Sample code:
*
@@ -871,6 +955,79 @@ public final DirectRawPredictResponse directRawPredict(DirectRawPredictRequest r
return stub.directRawPredictCallable();
}
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Perform a streaming online prediction request to a gRPC model server for Vertex first-party
+ * products and frameworks.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * For single-turn queries, this is a single instance. For multi-turn queries, this is a
+ * repeated field that contains conversation history + latest request.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final GenerateContentResponse generateContent(String model, List Sample code:
+ *
+ * Sample code:
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
+ * BidiStream
+ */
+ public final BidiStreamingCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
+ * BidiStream
+ */
+ public final BidiStreamingCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
+ * String model = "model104069929";
+ * List
+ *
+ * @param model Required. The name of the publisher model requested to serve the prediction.
+ * Format: `projects/{project}/locations/{location}/publishers/*/models/*`
+ * @param contents Required. The content of the current conversation with the model.
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
+ * GenerateContentRequest request =
+ * GenerateContentRequest.newBuilder()
+ * .setModel("model104069929")
+ * .addAllContents(new ArrayList
+ *
+ * @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 GenerateContentResponse generateContent(GenerateContentRequest request) {
+ return generateContentCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Generate content with multimodal inputs.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
+ * GenerateContentRequest request =
+ * GenerateContentRequest.newBuilder()
+ * .setModel("model104069929")
+ * .addAllContents(new ArrayList
+ */
+ public final UnaryCallable
DirectPredict
Perform an unary online prediction request for Vertex first-party products and frameworks.
Perform an unary online prediction request to a gRPC model server for Vertex first-party products and frameworks.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
*DirectRawPredict
Perform an online prediction request through gRPC.
Perform an unary online prediction request to a gRPC model server for custom containers.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
*StreamDirectPredict
Perform a streaming online prediction request to a gRPC model server for Vertex first-party products and frameworks.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *streamDirectPredictCallable() + *
StreamDirectRawPredict
Perform a streaming online prediction request to a gRPC model server for custom containers.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *streamDirectRawPredictCallable() + *
StreamingPredict
Perform a streaming online prediction request for Vertex first-party products and frameworks.
GenerateContent
Generate content with multimodal inputs.
Request object method variants only take one parameter, a request object, which must be constructed before the call.
+ *generateContent(GenerateContentRequest request) + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
+ *generateContent(String model, List<Content> contents) + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
+ *generateContentCallable() + *
StreamGenerateContent
Generate content with multimodal inputs with streaming support.
Sample code: * @@ -800,7 +839,8 @@ public final DirectPredictResponse directPredict(DirectPredictRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Perform an unary online prediction request for Vertex first-party products and frameworks. + * Perform an unary online prediction request to a gRPC model server for Vertex first-party + * products and frameworks. * *
Sample code:
*
@@ -833,7 +873,7 @@ public final UnaryCallable Sample code:
*
@@ -866,7 +906,7 @@ public final DirectRawPredictResponse directRawPredict(DirectRawPredictRequest r
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Perform an online prediction request through gRPC.
+ * Perform an unary online prediction request to a gRPC model server for custom containers.
*
* Sample code:
*
@@ -898,6 +938,79 @@ public final DirectRawPredictResponse directRawPredict(DirectRawPredictRequest r
return stub.directRawPredictCallable();
}
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Perform a streaming online prediction request to a gRPC model server for Vertex first-party
+ * products and frameworks.
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * For single-turn queries, this is a single instance. For multi-turn queries, this is a
+ * repeated field that contains conversation history + latest request.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final GenerateContentResponse generateContent(String model, List Sample code:
+ *
+ * Sample code:
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
+ * BidiStream
+ */
+ public final BidiStreamingCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
+ * BidiStream
+ */
+ public final BidiStreamingCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
+ * String model = "model104069929";
+ * List
+ *
+ * @param model Required. The name of the publisher model requested to serve the prediction.
+ * Format: `projects/{project}/locations/{location}/publishers/*/models/*`
+ * @param contents Required. The content of the current conversation with the model.
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
+ * GenerateContentRequest request =
+ * GenerateContentRequest.newBuilder()
+ * .setModel("model104069929")
+ * .addAllContents(new ArrayList
+ *
+ * @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 GenerateContentResponse generateContent(GenerateContentRequest request) {
+ return generateContentCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Generate content with multimodal inputs.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
+ * GenerateContentRequest request =
+ * GenerateContentRequest.newBuilder()
+ * .setModel("model104069929")
+ * .addAllContents(new ArrayList
+ */
+ public final UnaryCallable
- * Perform an unary online prediction request for Vertex first-party products
- * and frameworks.
+ * Perform a streaming online prediction with an arbitrary HTTP payload.
+ *
+ */
+ default void streamRawPredict(
+ com.google.cloud.aiplatform.v1.StreamRawPredictRequest request,
+ io.grpc.stub.StreamObserver
+ * Perform an unary online prediction request to a gRPC model server for
+ * Vertex first-party products and frameworks.
*
*/
default void directPredict(
@@ -562,7 +767,8 @@ default void directPredict(
*
*
*
- * Perform an online prediction request through gRPC.
+ * Perform an unary online prediction request to a gRPC model server for
+ * custom containers.
*
*/
default void directRawPredict(
@@ -573,6 +779,40 @@ default void directRawPredict(
getDirectRawPredictMethod(), responseObserver);
}
+ /**
+ *
+ *
+ *
+ * Perform a streaming online prediction request to a gRPC model server for
+ * Vertex first-party products and frameworks.
+ *
+ */
+ default io.grpc.stub.StreamObserver
+ * Perform a streaming online prediction request to a gRPC model server for
+ * custom containers.
+ *
+ */
+ default io.grpc.stub.StreamObserver<
+ com.google.cloud.aiplatform.v1.StreamDirectRawPredictRequest>
+ streamDirectRawPredict(
+ io.grpc.stub.StreamObserver<
+ com.google.cloud.aiplatform.v1.StreamDirectRawPredictResponse>
+ responseObserver) {
+ return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(
+ getStreamDirectRawPredictMethod(), responseObserver);
+ }
+
/**
*
*
@@ -643,6 +883,21 @@ default void explain(
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getExplainMethod(), responseObserver);
}
+ /**
+ *
+ *
+ *
+ * Generate content with multimodal inputs.
+ *
+ */
+ default void generateContent(
+ com.google.cloud.aiplatform.v1.GenerateContentRequest request,
+ io.grpc.stub.StreamObserver
- * Perform an unary online prediction request for Vertex first-party products
- * and frameworks.
+ * Perform a streaming online prediction with an arbitrary HTTP payload.
+ *
+ */
+ public void streamRawPredict(
+ com.google.cloud.aiplatform.v1.StreamRawPredictRequest request,
+ io.grpc.stub.StreamObserver
+ * Perform an unary online prediction request to a gRPC model server for
+ * Vertex first-party products and frameworks.
*
*/
public void directPredict(
@@ -752,7 +1023,8 @@ public void directPredict(
*
*
*
- * Perform an online prediction request through gRPC.
+ * Perform an unary online prediction request to a gRPC model server for
+ * custom containers.
*
*/
public void directRawPredict(
@@ -765,6 +1037,40 @@ public void directRawPredict(
responseObserver);
}
+ /**
+ *
+ *
+ *
+ * Perform a streaming online prediction request to a gRPC model server for
+ * Vertex first-party products and frameworks.
+ *
+ */
+ public io.grpc.stub.StreamObserver
+ * Perform a streaming online prediction request to a gRPC model server for
+ * custom containers.
+ *
+ */
+ public io.grpc.stub.StreamObserver
+ * Generate content with multimodal inputs.
+ *
+ */
+ public void generateContent(
+ com.google.cloud.aiplatform.v1.GenerateContentRequest request,
+ io.grpc.stub.StreamObserver
- * Perform an unary online prediction request for Vertex first-party products
- * and frameworks.
+ * Perform a streaming online prediction with an arbitrary HTTP payload.
+ *
+ */
+ public java.util.Iterator
+ * Perform an unary online prediction request to a gRPC model server for
+ * Vertex first-party products and frameworks.
*
*/
public com.google.cloud.aiplatform.v1.DirectPredictResponse directPredict(
@@ -927,7 +1263,8 @@ public com.google.cloud.aiplatform.v1.DirectPredictResponse directPredict(
*
*
*
- * Perform an online prediction request through gRPC.
+ * Perform an unary online prediction request to a gRPC model server for
+ * custom containers.
*
*/
public com.google.cloud.aiplatform.v1.DirectRawPredictResponse directRawPredict(
@@ -972,6 +1309,19 @@ public com.google.cloud.aiplatform.v1.ExplainResponse explain(
getChannel(), getExplainMethod(), getCallOptions(), request);
}
+ /**
+ *
+ *
+ *
+ * Generate content with multimodal inputs.
+ *
+ */
+ public com.google.cloud.aiplatform.v1.GenerateContentResponse generateContent(
+ com.google.cloud.aiplatform.v1.GenerateContentRequest request) {
+ return io.grpc.stub.ClientCalls.blockingUnaryCall(
+ getChannel(), getGenerateContentMethod(), getCallOptions(), request);
+ }
+
/**
*
*
@@ -1043,8 +1393,8 @@ public com.google.common.util.concurrent.ListenableFuture
- * Perform an unary online prediction request for Vertex first-party products
- * and frameworks.
+ * Perform an unary online prediction request to a gRPC model server for
+ * Vertex first-party products and frameworks.
*
*/
default void directPredict(
@@ -614,7 +762,8 @@ default void directPredict(
*
*
*
- * Perform an online prediction request through gRPC.
+ * Perform an unary online prediction request to a gRPC model server for
+ * custom containers.
*
*/
default void directRawPredict(
@@ -625,6 +774,42 @@ default void directRawPredict(
getDirectRawPredictMethod(), responseObserver);
}
+ /**
+ *
+ *
+ *
+ * Perform a streaming online prediction request to a gRPC model server for
+ * Vertex first-party products and frameworks.
+ *
+ */
+ default io.grpc.stub.StreamObserver<
+ com.google.cloud.aiplatform.v1beta1.StreamDirectPredictRequest>
+ streamDirectPredict(
+ io.grpc.stub.StreamObserver<
+ com.google.cloud.aiplatform.v1beta1.StreamDirectPredictResponse>
+ responseObserver) {
+ return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(
+ getStreamDirectPredictMethod(), responseObserver);
+ }
+
+ /**
+ *
+ *
+ *
+ * Perform a streaming online prediction request to a gRPC model server for
+ * custom containers.
+ *
+ */
+ default io.grpc.stub.StreamObserver<
+ com.google.cloud.aiplatform.v1beta1.StreamDirectRawPredictRequest>
+ streamDirectRawPredict(
+ io.grpc.stub.StreamObserver<
+ com.google.cloud.aiplatform.v1beta1.StreamDirectRawPredictResponse>
+ responseObserver) {
+ return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(
+ getStreamDirectRawPredictMethod(), responseObserver);
+ }
+
/**
*
*
@@ -713,6 +898,21 @@ default void countTokens(
getCountTokensMethod(), responseObserver);
}
+ /**
+ *
+ *
+ *
+ * Generate content with multimodal inputs.
+ *
+ */
+ default void generateContent(
+ com.google.cloud.aiplatform.v1beta1.GenerateContentRequest request,
+ io.grpc.stub.StreamObserver
- * Perform an unary online prediction request for Vertex first-party products
- * and frameworks.
+ * Perform an unary online prediction request to a gRPC model server for
+ * Vertex first-party products and frameworks.
*
*/
public void directPredict(
@@ -822,7 +1022,8 @@ public void directPredict(
*
*
*
- * Perform an online prediction request through gRPC.
+ * Perform an unary online prediction request to a gRPC model server for
+ * custom containers.
*
*/
public void directRawPredict(
@@ -835,6 +1036,43 @@ public void directRawPredict(
responseObserver);
}
+ /**
+ *
+ *
+ *
+ * Perform a streaming online prediction request to a gRPC model server for
+ * Vertex first-party products and frameworks.
+ *
+ */
+ public io.grpc.stub.StreamObserver<
+ com.google.cloud.aiplatform.v1beta1.StreamDirectPredictRequest>
+ streamDirectPredict(
+ io.grpc.stub.StreamObserver<
+ com.google.cloud.aiplatform.v1beta1.StreamDirectPredictResponse>
+ responseObserver) {
+ return io.grpc.stub.ClientCalls.asyncBidiStreamingCall(
+ getChannel().newCall(getStreamDirectPredictMethod(), getCallOptions()), responseObserver);
+ }
+
+ /**
+ *
+ *
+ *
+ * Perform a streaming online prediction request to a gRPC model server for
+ * custom containers.
+ *
+ */
+ public io.grpc.stub.StreamObserver<
+ com.google.cloud.aiplatform.v1beta1.StreamDirectRawPredictRequest>
+ streamDirectRawPredict(
+ io.grpc.stub.StreamObserver<
+ com.google.cloud.aiplatform.v1beta1.StreamDirectRawPredictResponse>
+ responseObserver) {
+ return io.grpc.stub.ClientCalls.asyncBidiStreamingCall(
+ getChannel().newCall(getStreamDirectRawPredictMethod(), getCallOptions()),
+ responseObserver);
+ }
+
/**
*
*
@@ -928,6 +1166,23 @@ public void countTokens(
responseObserver);
}
+ /**
+ *
+ *
+ *
+ * Generate content with multimodal inputs.
+ *
+ */
+ public void generateContent(
+ com.google.cloud.aiplatform.v1beta1.GenerateContentRequest request,
+ io.grpc.stub.StreamObserver
- * Perform an unary online prediction request for Vertex first-party products
- * and frameworks.
+ * Perform an unary online prediction request to a gRPC model server for
+ * Vertex first-party products and frameworks.
*
*/
public com.google.cloud.aiplatform.v1beta1.DirectPredictResponse directPredict(
@@ -1017,7 +1272,8 @@ public com.google.cloud.aiplatform.v1beta1.DirectPredictResponse directPredict(
*
*
*
- * Perform an online prediction request through gRPC.
+ * Perform an unary online prediction request to a gRPC model server for
+ * custom containers.
*
*/
public com.google.cloud.aiplatform.v1beta1.DirectRawPredictResponse directRawPredict(
@@ -1076,6 +1332,19 @@ public com.google.cloud.aiplatform.v1beta1.CountTokensResponse countTokens(
getChannel(), getCountTokensMethod(), getCallOptions(), request);
}
+ /**
+ *
+ *
+ *
+ * Generate content with multimodal inputs.
+ *
+ */
+ public com.google.cloud.aiplatform.v1beta1.GenerateContentResponse generateContent(
+ com.google.cloud.aiplatform.v1beta1.GenerateContentRequest request) {
+ return io.grpc.stub.ClientCalls.blockingUnaryCall(
+ getChannel(), getGenerateContentMethod(), getCallOptions(), request);
+ }
+
/**
*
*
@@ -1147,8 +1416,8 @@ public com.google.common.util.concurrent.ListenableFuture
+ * Request message for
+ * [PredictionService.StreamDirectPredict][google.cloud.aiplatform.v1.PredictionService.StreamDirectPredict].
+ *
+ * The first message must contain
+ * [endpoint][google.cloud.aiplatform.v1.StreamDirectPredictRequest.endpoint]
+ * field and optionally [input][]. The subsequent messages must contain
+ * [input][].
+ *
+ *
+ * Protobuf type {@code google.cloud.aiplatform.v1.StreamDirectPredictRequest}
+ */
+public final class StreamDirectPredictRequest extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.StreamDirectPredictRequest)
+ StreamDirectPredictRequestOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use StreamDirectPredictRequest.newBuilder() to construct.
+ private StreamDirectPredictRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private StreamDirectPredictRequest() {
+ endpoint_ = "";
+ inputs_ = java.util.Collections.emptyList();
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+ return new StreamDirectPredictRequest();
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.cloud.aiplatform.v1.PredictionServiceProto
+ .internal_static_google_cloud_aiplatform_v1_StreamDirectPredictRequest_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.aiplatform.v1.PredictionServiceProto
+ .internal_static_google_cloud_aiplatform_v1_StreamDirectPredictRequest_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.aiplatform.v1.StreamDirectPredictRequest.class,
+ com.google.cloud.aiplatform.v1.StreamDirectPredictRequest.Builder.class);
+ }
+
+ private int bitField0_;
+ public static final int ENDPOINT_FIELD_NUMBER = 1;
+
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object endpoint_ = "";
+ /**
+ *
+ *
+ *
+ * Required. The name of the Endpoint requested to serve the prediction.
+ * Format:
+ * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+ *
+ *
+ *
+ * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The endpoint.
+ */
+ @java.lang.Override
+ public java.lang.String getEndpoint() {
+ java.lang.Object ref = endpoint_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ endpoint_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Required. The name of the Endpoint requested to serve the prediction.
+ * Format:
+ * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+ *
+ *
+ *
+ * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The bytes for endpoint.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getEndpointBytes() {
+ java.lang.Object ref = endpoint_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ endpoint_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int INPUTS_FIELD_NUMBER = 2;
+
+ @SuppressWarnings("serial")
+ private java.util.List
+ * Optional. The prediction input.
+ *
+ *
+ *
+ * repeated .google.cloud.aiplatform.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ @java.lang.Override
+ public java.util.List
+ * Optional. The prediction input.
+ *
+ *
+ *
+ * repeated .google.cloud.aiplatform.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ @java.lang.Override
+ public java.util.List extends com.google.cloud.aiplatform.v1.TensorOrBuilder>
+ getInputsOrBuilderList() {
+ return inputs_;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The prediction input.
+ *
+ *
+ *
+ * repeated .google.cloud.aiplatform.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ @java.lang.Override
+ public int getInputsCount() {
+ return inputs_.size();
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The prediction input.
+ *
+ *
+ *
+ * repeated .google.cloud.aiplatform.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ @java.lang.Override
+ public com.google.cloud.aiplatform.v1.Tensor getInputs(int index) {
+ return inputs_.get(index);
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The prediction input.
+ *
+ *
+ *
+ * repeated .google.cloud.aiplatform.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ @java.lang.Override
+ public com.google.cloud.aiplatform.v1.TensorOrBuilder getInputsOrBuilder(int index) {
+ return inputs_.get(index);
+ }
+
+ public static final int PARAMETERS_FIELD_NUMBER = 3;
+ private com.google.cloud.aiplatform.v1.Tensor parameters_;
+ /**
+ *
+ *
+ *
+ * Optional. The parameters that govern the prediction.
+ *
+ *
+ *
+ * .google.cloud.aiplatform.v1.Tensor parameters = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the parameters field is set.
+ */
+ @java.lang.Override
+ public boolean hasParameters() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The parameters that govern the prediction.
+ *
+ *
+ *
+ * .google.cloud.aiplatform.v1.Tensor parameters = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The parameters.
+ */
+ @java.lang.Override
+ public com.google.cloud.aiplatform.v1.Tensor getParameters() {
+ return parameters_ == null
+ ? com.google.cloud.aiplatform.v1.Tensor.getDefaultInstance()
+ : parameters_;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The parameters that govern the prediction.
+ *
+ *
+ *
+ * .google.cloud.aiplatform.v1.Tensor parameters = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ @java.lang.Override
+ public com.google.cloud.aiplatform.v1.TensorOrBuilder getParametersOrBuilder() {
+ return parameters_ == null
+ ? com.google.cloud.aiplatform.v1.Tensor.getDefaultInstance()
+ : parameters_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpoint_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, endpoint_);
+ }
+ for (int i = 0; i < inputs_.size(); i++) {
+ output.writeMessage(2, inputs_.get(i));
+ }
+ if (((bitField0_ & 0x00000001) != 0)) {
+ output.writeMessage(3, getParameters());
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpoint_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, endpoint_);
+ }
+ for (int i = 0; i < inputs_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, inputs_.get(i));
+ }
+ if (((bitField0_ & 0x00000001) != 0)) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getParameters());
+ }
+ 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.StreamDirectPredictRequest)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.aiplatform.v1.StreamDirectPredictRequest other =
+ (com.google.cloud.aiplatform.v1.StreamDirectPredictRequest) obj;
+
+ if (!getEndpoint().equals(other.getEndpoint())) return false;
+ if (!getInputsList().equals(other.getInputsList())) return false;
+ if (hasParameters() != other.hasParameters()) return false;
+ if (hasParameters()) {
+ if (!getParameters().equals(other.getParameters())) return false;
+ }
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + ENDPOINT_FIELD_NUMBER;
+ hash = (53 * hash) + getEndpoint().hashCode();
+ if (getInputsCount() > 0) {
+ hash = (37 * hash) + INPUTS_FIELD_NUMBER;
+ hash = (53 * hash) + getInputsList().hashCode();
+ }
+ if (hasParameters()) {
+ hash = (37 * hash) + PARAMETERS_FIELD_NUMBER;
+ hash = (53 * hash) + getParameters().hashCode();
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.aiplatform.v1.StreamDirectPredictRequest parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.aiplatform.v1.StreamDirectPredictRequest 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.StreamDirectPredictRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.aiplatform.v1.StreamDirectPredictRequest 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.StreamDirectPredictRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.aiplatform.v1.StreamDirectPredictRequest 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.StreamDirectPredictRequest parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.aiplatform.v1.StreamDirectPredictRequest 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.StreamDirectPredictRequest parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.aiplatform.v1.StreamDirectPredictRequest 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.StreamDirectPredictRequest 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.StreamDirectPredictRequest 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.StreamDirectPredictRequest prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ *
+ * Request message for
+ * [PredictionService.StreamDirectPredict][google.cloud.aiplatform.v1.PredictionService.StreamDirectPredict].
+ *
+ * The first message must contain
+ * [endpoint][google.cloud.aiplatform.v1.StreamDirectPredictRequest.endpoint]
+ * field and optionally [input][]. The subsequent messages must contain
+ * [input][].
+ *
+ *
+ * Protobuf type {@code google.cloud.aiplatform.v1.StreamDirectPredictRequest}
+ */
+ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Required. The name of the Endpoint requested to serve the prediction.
+ * Format:
+ * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+ *
+ *
+ *
+ * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The endpoint.
+ */
+ public java.lang.String getEndpoint() {
+ java.lang.Object ref = endpoint_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ endpoint_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Required. The name of the Endpoint requested to serve the prediction.
+ * Format:
+ * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+ *
+ *
+ *
+ * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The bytes for endpoint.
+ */
+ public com.google.protobuf.ByteString getEndpointBytes() {
+ java.lang.Object ref = endpoint_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ endpoint_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Required. The name of the Endpoint requested to serve the prediction.
+ * Format:
+ * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+ *
+ *
+ *
+ * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param value The endpoint to set.
+ * @return This builder for chaining.
+ */
+ public Builder setEndpoint(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ endpoint_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Required. The name of the Endpoint requested to serve the prediction.
+ * Format:
+ * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+ *
+ *
+ *
+ * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearEndpoint() {
+ endpoint_ = getDefaultInstance().getEndpoint();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Required. The name of the Endpoint requested to serve the prediction.
+ * Format:
+ * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+ *
+ *
+ *
+ * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param value The bytes for endpoint to set.
+ * @return This builder for chaining.
+ */
+ public Builder setEndpointBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ endpoint_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ private java.util.List
+ * Optional. The prediction input.
+ *
+ *
+ *
+ * repeated .google.cloud.aiplatform.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public java.util.List
+ * Optional. The prediction input.
+ *
+ *
+ *
+ * repeated .google.cloud.aiplatform.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public int getInputsCount() {
+ if (inputsBuilder_ == null) {
+ return inputs_.size();
+ } else {
+ return inputsBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The prediction input.
+ *
+ *
+ *
+ * repeated .google.cloud.aiplatform.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.cloud.aiplatform.v1.Tensor getInputs(int index) {
+ if (inputsBuilder_ == null) {
+ return inputs_.get(index);
+ } else {
+ return inputsBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The prediction input.
+ *
+ *
+ *
+ * repeated .google.cloud.aiplatform.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder setInputs(int index, com.google.cloud.aiplatform.v1.Tensor value) {
+ if (inputsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureInputsIsMutable();
+ inputs_.set(index, value);
+ onChanged();
+ } else {
+ inputsBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The prediction input.
+ *
+ *
+ *
+ * repeated .google.cloud.aiplatform.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder setInputs(
+ int index, com.google.cloud.aiplatform.v1.Tensor.Builder builderForValue) {
+ if (inputsBuilder_ == null) {
+ ensureInputsIsMutable();
+ inputs_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ inputsBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The prediction input.
+ *
+ *
+ *
+ * repeated .google.cloud.aiplatform.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder addInputs(com.google.cloud.aiplatform.v1.Tensor value) {
+ if (inputsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureInputsIsMutable();
+ inputs_.add(value);
+ onChanged();
+ } else {
+ inputsBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The prediction input.
+ *
+ *
+ *
+ * repeated .google.cloud.aiplatform.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder addInputs(int index, com.google.cloud.aiplatform.v1.Tensor value) {
+ if (inputsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureInputsIsMutable();
+ inputs_.add(index, value);
+ onChanged();
+ } else {
+ inputsBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The prediction input.
+ *
+ *
+ *
+ * repeated .google.cloud.aiplatform.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder addInputs(com.google.cloud.aiplatform.v1.Tensor.Builder builderForValue) {
+ if (inputsBuilder_ == null) {
+ ensureInputsIsMutable();
+ inputs_.add(builderForValue.build());
+ onChanged();
+ } else {
+ inputsBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The prediction input.
+ *
+ *
+ *
+ * repeated .google.cloud.aiplatform.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder addInputs(
+ int index, com.google.cloud.aiplatform.v1.Tensor.Builder builderForValue) {
+ if (inputsBuilder_ == null) {
+ ensureInputsIsMutable();
+ inputs_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ inputsBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The prediction input.
+ *
+ *
+ *
+ * repeated .google.cloud.aiplatform.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder addAllInputs(
+ java.lang.Iterable extends com.google.cloud.aiplatform.v1.Tensor> values) {
+ if (inputsBuilder_ == null) {
+ ensureInputsIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, inputs_);
+ onChanged();
+ } else {
+ inputsBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The prediction input.
+ *
+ *
+ *
+ * repeated .google.cloud.aiplatform.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder clearInputs() {
+ if (inputsBuilder_ == null) {
+ inputs_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ onChanged();
+ } else {
+ inputsBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The prediction input.
+ *
+ *
+ *
+ * repeated .google.cloud.aiplatform.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder removeInputs(int index) {
+ if (inputsBuilder_ == null) {
+ ensureInputsIsMutable();
+ inputs_.remove(index);
+ onChanged();
+ } else {
+ inputsBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The prediction input.
+ *
+ *
+ *
+ * repeated .google.cloud.aiplatform.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.cloud.aiplatform.v1.Tensor.Builder getInputsBuilder(int index) {
+ return getInputsFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The prediction input.
+ *
+ *
+ *
+ * repeated .google.cloud.aiplatform.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.cloud.aiplatform.v1.TensorOrBuilder getInputsOrBuilder(int index) {
+ if (inputsBuilder_ == null) {
+ return inputs_.get(index);
+ } else {
+ return inputsBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The prediction input.
+ *
+ *
+ *
+ * repeated .google.cloud.aiplatform.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public java.util.List extends com.google.cloud.aiplatform.v1.TensorOrBuilder>
+ getInputsOrBuilderList() {
+ if (inputsBuilder_ != null) {
+ return inputsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(inputs_);
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The prediction input.
+ *
+ *
+ *
+ * repeated .google.cloud.aiplatform.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.cloud.aiplatform.v1.Tensor.Builder addInputsBuilder() {
+ return getInputsFieldBuilder()
+ .addBuilder(com.google.cloud.aiplatform.v1.Tensor.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The prediction input.
+ *
+ *
+ *
+ * repeated .google.cloud.aiplatform.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.cloud.aiplatform.v1.Tensor.Builder addInputsBuilder(int index) {
+ return getInputsFieldBuilder()
+ .addBuilder(index, com.google.cloud.aiplatform.v1.Tensor.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The prediction input.
+ *
+ *
+ *
+ * repeated .google.cloud.aiplatform.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public java.util.List
+ * Optional. The parameters that govern the prediction.
+ *
+ *
+ *
+ * .google.cloud.aiplatform.v1.Tensor parameters = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the parameters field is set.
+ */
+ public boolean hasParameters() {
+ return ((bitField0_ & 0x00000004) != 0);
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The parameters that govern the prediction.
+ *
+ *
+ *
+ * .google.cloud.aiplatform.v1.Tensor parameters = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The parameters.
+ */
+ public com.google.cloud.aiplatform.v1.Tensor getParameters() {
+ if (parametersBuilder_ == null) {
+ return parameters_ == null
+ ? com.google.cloud.aiplatform.v1.Tensor.getDefaultInstance()
+ : parameters_;
+ } else {
+ return parametersBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The parameters that govern the prediction.
+ *
+ *
+ *
+ * .google.cloud.aiplatform.v1.Tensor parameters = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder setParameters(com.google.cloud.aiplatform.v1.Tensor value) {
+ if (parametersBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ parameters_ = value;
+ } else {
+ parametersBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The parameters that govern the prediction.
+ *
+ *
+ *
+ * .google.cloud.aiplatform.v1.Tensor parameters = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder setParameters(com.google.cloud.aiplatform.v1.Tensor.Builder builderForValue) {
+ if (parametersBuilder_ == null) {
+ parameters_ = builderForValue.build();
+ } else {
+ parametersBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The parameters that govern the prediction.
+ *
+ *
+ *
+ * .google.cloud.aiplatform.v1.Tensor parameters = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder mergeParameters(com.google.cloud.aiplatform.v1.Tensor value) {
+ if (parametersBuilder_ == null) {
+ if (((bitField0_ & 0x00000004) != 0)
+ && parameters_ != null
+ && parameters_ != com.google.cloud.aiplatform.v1.Tensor.getDefaultInstance()) {
+ getParametersBuilder().mergeFrom(value);
+ } else {
+ parameters_ = value;
+ }
+ } else {
+ parametersBuilder_.mergeFrom(value);
+ }
+ if (parameters_ != null) {
+ bitField0_ |= 0x00000004;
+ onChanged();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The parameters that govern the prediction.
+ *
+ *
+ *
+ * .google.cloud.aiplatform.v1.Tensor parameters = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder clearParameters() {
+ bitField0_ = (bitField0_ & ~0x00000004);
+ parameters_ = null;
+ if (parametersBuilder_ != null) {
+ parametersBuilder_.dispose();
+ parametersBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The parameters that govern the prediction.
+ *
+ *
+ *
+ * .google.cloud.aiplatform.v1.Tensor parameters = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.cloud.aiplatform.v1.Tensor.Builder getParametersBuilder() {
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return getParametersFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The parameters that govern the prediction.
+ *
+ *
+ *
+ * .google.cloud.aiplatform.v1.Tensor parameters = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.cloud.aiplatform.v1.TensorOrBuilder getParametersOrBuilder() {
+ if (parametersBuilder_ != null) {
+ return parametersBuilder_.getMessageOrBuilder();
+ } else {
+ return parameters_ == null
+ ? com.google.cloud.aiplatform.v1.Tensor.getDefaultInstance()
+ : parameters_;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The parameters that govern the prediction.
+ *
+ *
+ *
+ * .google.cloud.aiplatform.v1.Tensor parameters = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.aiplatform.v1.Tensor,
+ com.google.cloud.aiplatform.v1.Tensor.Builder,
+ com.google.cloud.aiplatform.v1.TensorOrBuilder>
+ getParametersFieldBuilder() {
+ if (parametersBuilder_ == null) {
+ parametersBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.aiplatform.v1.Tensor,
+ com.google.cloud.aiplatform.v1.Tensor.Builder,
+ com.google.cloud.aiplatform.v1.TensorOrBuilder>(
+ getParameters(), getParentForChildren(), isClean());
+ parameters_ = null;
+ }
+ return parametersBuilder_;
+ }
+
+ @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.StreamDirectPredictRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.StreamDirectPredictRequest)
+ private static final com.google.cloud.aiplatform.v1.StreamDirectPredictRequest DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.StreamDirectPredictRequest();
+ }
+
+ public static com.google.cloud.aiplatform.v1.StreamDirectPredictRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ * Required. The name of the Endpoint requested to serve the prediction.
+ * Format:
+ * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+ *
+ *
+ *
+ * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The endpoint.
+ */
+ java.lang.String getEndpoint();
+ /**
+ *
+ *
+ *
+ * Required. The name of the Endpoint requested to serve the prediction.
+ * Format:
+ * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+ *
+ *
+ *
+ * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The bytes for endpoint.
+ */
+ com.google.protobuf.ByteString getEndpointBytes();
+
+ /**
+ *
+ *
+ *
+ * Optional. The prediction input.
+ *
+ *
+ *
+ * repeated .google.cloud.aiplatform.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ java.util.List
+ * Optional. The prediction input.
+ *
+ *
+ *
+ * repeated .google.cloud.aiplatform.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ com.google.cloud.aiplatform.v1.Tensor getInputs(int index);
+ /**
+ *
+ *
+ *
+ * Optional. The prediction input.
+ *
+ *
+ *
+ * repeated .google.cloud.aiplatform.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ int getInputsCount();
+ /**
+ *
+ *
+ *
+ * Optional. The prediction input.
+ *
+ *
+ *
+ * repeated .google.cloud.aiplatform.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ java.util.List extends com.google.cloud.aiplatform.v1.TensorOrBuilder> getInputsOrBuilderList();
+ /**
+ *
+ *
+ *
+ * Optional. The prediction input.
+ *
+ *
+ *
+ * repeated .google.cloud.aiplatform.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ com.google.cloud.aiplatform.v1.TensorOrBuilder getInputsOrBuilder(int index);
+
+ /**
+ *
+ *
+ *
+ * Optional. The parameters that govern the prediction.
+ *
+ *
+ *
+ * .google.cloud.aiplatform.v1.Tensor parameters = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the parameters field is set.
+ */
+ boolean hasParameters();
+ /**
+ *
+ *
+ *
+ * Optional. The parameters that govern the prediction.
+ *
+ *
+ *
+ * .google.cloud.aiplatform.v1.Tensor parameters = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The parameters.
+ */
+ com.google.cloud.aiplatform.v1.Tensor getParameters();
+ /**
+ *
+ *
+ *
+ * Optional. The parameters that govern the prediction.
+ *
+ *
+ *
+ * .google.cloud.aiplatform.v1.Tensor parameters = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ com.google.cloud.aiplatform.v1.TensorOrBuilder getParametersOrBuilder();
+}
diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StreamDirectPredictResponse.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StreamDirectPredictResponse.java
new file mode 100644
index 000000000000..6f77ae82a0a3
--- /dev/null
+++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StreamDirectPredictResponse.java
@@ -0,0 +1,1218 @@
+/*
+ * Copyright 2024 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License 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/prediction_service.proto
+
+// Protobuf Java Version: 3.25.2
+package com.google.cloud.aiplatform.v1;
+
+/**
+ *
+ *
+ *
+ * Response message for
+ * [PredictionService.StreamDirectPredict][google.cloud.aiplatform.v1.PredictionService.StreamDirectPredict].
+ *
+ *
+ * Protobuf type {@code google.cloud.aiplatform.v1.StreamDirectPredictResponse}
+ */
+public final class StreamDirectPredictResponse extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.StreamDirectPredictResponse)
+ StreamDirectPredictResponseOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use StreamDirectPredictResponse.newBuilder() to construct.
+ private StreamDirectPredictResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private StreamDirectPredictResponse() {
+ outputs_ = java.util.Collections.emptyList();
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+ return new StreamDirectPredictResponse();
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.cloud.aiplatform.v1.PredictionServiceProto
+ .internal_static_google_cloud_aiplatform_v1_StreamDirectPredictResponse_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.aiplatform.v1.PredictionServiceProto
+ .internal_static_google_cloud_aiplatform_v1_StreamDirectPredictResponse_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.aiplatform.v1.StreamDirectPredictResponse.class,
+ com.google.cloud.aiplatform.v1.StreamDirectPredictResponse.Builder.class);
+ }
+
+ private int bitField0_;
+ public static final int OUTPUTS_FIELD_NUMBER = 1;
+
+ @SuppressWarnings("serial")
+ private java.util.List
+ * The prediction output.
+ *
+ *
+ * repeated .google.cloud.aiplatform.v1.Tensor outputs = 1;
+ */
+ @java.lang.Override
+ public java.util.List
+ * The prediction output.
+ *
+ *
+ * repeated .google.cloud.aiplatform.v1.Tensor outputs = 1;
+ */
+ @java.lang.Override
+ public java.util.List extends com.google.cloud.aiplatform.v1.TensorOrBuilder>
+ getOutputsOrBuilderList() {
+ return outputs_;
+ }
+ /**
+ *
+ *
+ *
+ * The prediction output.
+ *
+ *
+ * repeated .google.cloud.aiplatform.v1.Tensor outputs = 1;
+ */
+ @java.lang.Override
+ public int getOutputsCount() {
+ return outputs_.size();
+ }
+ /**
+ *
+ *
+ *
+ * The prediction output.
+ *
+ *
+ * repeated .google.cloud.aiplatform.v1.Tensor outputs = 1;
+ */
+ @java.lang.Override
+ public com.google.cloud.aiplatform.v1.Tensor getOutputs(int index) {
+ return outputs_.get(index);
+ }
+ /**
+ *
+ *
+ *
+ * The prediction output.
+ *
+ *
+ * repeated .google.cloud.aiplatform.v1.Tensor outputs = 1;
+ */
+ @java.lang.Override
+ public com.google.cloud.aiplatform.v1.TensorOrBuilder getOutputsOrBuilder(int index) {
+ return outputs_.get(index);
+ }
+
+ public static final int PARAMETERS_FIELD_NUMBER = 2;
+ private com.google.cloud.aiplatform.v1.Tensor parameters_;
+ /**
+ *
+ *
+ *
+ * The parameters that govern the prediction.
+ *
+ *
+ * .google.cloud.aiplatform.v1.Tensor parameters = 2;
+ *
+ * @return Whether the parameters field is set.
+ */
+ @java.lang.Override
+ public boolean hasParameters() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ *
+ *
+ *
+ * The parameters that govern the prediction.
+ *
+ *
+ * .google.cloud.aiplatform.v1.Tensor parameters = 2;
+ *
+ * @return The parameters.
+ */
+ @java.lang.Override
+ public com.google.cloud.aiplatform.v1.Tensor getParameters() {
+ return parameters_ == null
+ ? com.google.cloud.aiplatform.v1.Tensor.getDefaultInstance()
+ : parameters_;
+ }
+ /**
+ *
+ *
+ *
+ * The parameters that govern the prediction.
+ *
+ *
+ * .google.cloud.aiplatform.v1.Tensor parameters = 2;
+ */
+ @java.lang.Override
+ public com.google.cloud.aiplatform.v1.TensorOrBuilder getParametersOrBuilder() {
+ return parameters_ == null
+ ? com.google.cloud.aiplatform.v1.Tensor.getDefaultInstance()
+ : parameters_;
+ }
+
+ 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 < outputs_.size(); i++) {
+ output.writeMessage(1, outputs_.get(i));
+ }
+ if (((bitField0_ & 0x00000001) != 0)) {
+ output.writeMessage(2, getParameters());
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ for (int i = 0; i < outputs_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, outputs_.get(i));
+ }
+ if (((bitField0_ & 0x00000001) != 0)) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getParameters());
+ }
+ 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.StreamDirectPredictResponse)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.aiplatform.v1.StreamDirectPredictResponse other =
+ (com.google.cloud.aiplatform.v1.StreamDirectPredictResponse) obj;
+
+ if (!getOutputsList().equals(other.getOutputsList())) return false;
+ if (hasParameters() != other.hasParameters()) return false;
+ if (hasParameters()) {
+ if (!getParameters().equals(other.getParameters())) 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 (getOutputsCount() > 0) {
+ hash = (37 * hash) + OUTPUTS_FIELD_NUMBER;
+ hash = (53 * hash) + getOutputsList().hashCode();
+ }
+ if (hasParameters()) {
+ hash = (37 * hash) + PARAMETERS_FIELD_NUMBER;
+ hash = (53 * hash) + getParameters().hashCode();
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.aiplatform.v1.StreamDirectPredictResponse parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.aiplatform.v1.StreamDirectPredictResponse 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.StreamDirectPredictResponse parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.aiplatform.v1.StreamDirectPredictResponse 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.StreamDirectPredictResponse parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.aiplatform.v1.StreamDirectPredictResponse 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.StreamDirectPredictResponse parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.aiplatform.v1.StreamDirectPredictResponse 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.StreamDirectPredictResponse parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.aiplatform.v1.StreamDirectPredictResponse 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.StreamDirectPredictResponse 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.StreamDirectPredictResponse 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.StreamDirectPredictResponse 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
+ * [PredictionService.StreamDirectPredict][google.cloud.aiplatform.v1.PredictionService.StreamDirectPredict].
+ *
+ *
+ * Protobuf type {@code google.cloud.aiplatform.v1.StreamDirectPredictResponse}
+ */
+ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The prediction output.
+ *
+ *
+ * repeated .google.cloud.aiplatform.v1.Tensor outputs = 1;
+ */
+ public java.util.List
+ * The prediction output.
+ *
+ *
+ * repeated .google.cloud.aiplatform.v1.Tensor outputs = 1;
+ */
+ public int getOutputsCount() {
+ if (outputsBuilder_ == null) {
+ return outputs_.size();
+ } else {
+ return outputsBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The prediction output.
+ *
+ *
+ * repeated .google.cloud.aiplatform.v1.Tensor outputs = 1;
+ */
+ public com.google.cloud.aiplatform.v1.Tensor getOutputs(int index) {
+ if (outputsBuilder_ == null) {
+ return outputs_.get(index);
+ } else {
+ return outputsBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The prediction output.
+ *
+ *
+ * repeated .google.cloud.aiplatform.v1.Tensor outputs = 1;
+ */
+ public Builder setOutputs(int index, com.google.cloud.aiplatform.v1.Tensor value) {
+ if (outputsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureOutputsIsMutable();
+ outputs_.set(index, value);
+ onChanged();
+ } else {
+ outputsBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The prediction output.
+ *
+ *
+ * repeated .google.cloud.aiplatform.v1.Tensor outputs = 1;
+ */
+ public Builder setOutputs(
+ int index, com.google.cloud.aiplatform.v1.Tensor.Builder builderForValue) {
+ if (outputsBuilder_ == null) {
+ ensureOutputsIsMutable();
+ outputs_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ outputsBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The prediction output.
+ *
+ *
+ * repeated .google.cloud.aiplatform.v1.Tensor outputs = 1;
+ */
+ public Builder addOutputs(com.google.cloud.aiplatform.v1.Tensor value) {
+ if (outputsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureOutputsIsMutable();
+ outputs_.add(value);
+ onChanged();
+ } else {
+ outputsBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The prediction output.
+ *
+ *
+ * repeated .google.cloud.aiplatform.v1.Tensor outputs = 1;
+ */
+ public Builder addOutputs(int index, com.google.cloud.aiplatform.v1.Tensor value) {
+ if (outputsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureOutputsIsMutable();
+ outputs_.add(index, value);
+ onChanged();
+ } else {
+ outputsBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The prediction output.
+ *
+ *
+ * repeated .google.cloud.aiplatform.v1.Tensor outputs = 1;
+ */
+ public Builder addOutputs(com.google.cloud.aiplatform.v1.Tensor.Builder builderForValue) {
+ if (outputsBuilder_ == null) {
+ ensureOutputsIsMutable();
+ outputs_.add(builderForValue.build());
+ onChanged();
+ } else {
+ outputsBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The prediction output.
+ *
+ *
+ * repeated .google.cloud.aiplatform.v1.Tensor outputs = 1;
+ */
+ public Builder addOutputs(
+ int index, com.google.cloud.aiplatform.v1.Tensor.Builder builderForValue) {
+ if (outputsBuilder_ == null) {
+ ensureOutputsIsMutable();
+ outputs_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ outputsBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The prediction output.
+ *
+ *
+ * repeated .google.cloud.aiplatform.v1.Tensor outputs = 1;
+ */
+ public Builder addAllOutputs(
+ java.lang.Iterable extends com.google.cloud.aiplatform.v1.Tensor> values) {
+ if (outputsBuilder_ == null) {
+ ensureOutputsIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, outputs_);
+ onChanged();
+ } else {
+ outputsBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The prediction output.
+ *
+ *
+ * repeated .google.cloud.aiplatform.v1.Tensor outputs = 1;
+ */
+ public Builder clearOutputs() {
+ if (outputsBuilder_ == null) {
+ outputs_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ outputsBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The prediction output.
+ *
+ *
+ * repeated .google.cloud.aiplatform.v1.Tensor outputs = 1;
+ */
+ public Builder removeOutputs(int index) {
+ if (outputsBuilder_ == null) {
+ ensureOutputsIsMutable();
+ outputs_.remove(index);
+ onChanged();
+ } else {
+ outputsBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The prediction output.
+ *
+ *
+ * repeated .google.cloud.aiplatform.v1.Tensor outputs = 1;
+ */
+ public com.google.cloud.aiplatform.v1.Tensor.Builder getOutputsBuilder(int index) {
+ return getOutputsFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ *
+ *
+ * The prediction output.
+ *
+ *
+ * repeated .google.cloud.aiplatform.v1.Tensor outputs = 1;
+ */
+ public com.google.cloud.aiplatform.v1.TensorOrBuilder getOutputsOrBuilder(int index) {
+ if (outputsBuilder_ == null) {
+ return outputs_.get(index);
+ } else {
+ return outputsBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The prediction output.
+ *
+ *
+ * repeated .google.cloud.aiplatform.v1.Tensor outputs = 1;
+ */
+ public java.util.List extends com.google.cloud.aiplatform.v1.TensorOrBuilder>
+ getOutputsOrBuilderList() {
+ if (outputsBuilder_ != null) {
+ return outputsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(outputs_);
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The prediction output.
+ *
+ *
+ * repeated .google.cloud.aiplatform.v1.Tensor outputs = 1;
+ */
+ public com.google.cloud.aiplatform.v1.Tensor.Builder addOutputsBuilder() {
+ return getOutputsFieldBuilder()
+ .addBuilder(com.google.cloud.aiplatform.v1.Tensor.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ *
+ * The prediction output.
+ *
+ *
+ * repeated .google.cloud.aiplatform.v1.Tensor outputs = 1;
+ */
+ public com.google.cloud.aiplatform.v1.Tensor.Builder addOutputsBuilder(int index) {
+ return getOutputsFieldBuilder()
+ .addBuilder(index, com.google.cloud.aiplatform.v1.Tensor.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ *
+ * The prediction output.
+ *
+ *
+ * repeated .google.cloud.aiplatform.v1.Tensor outputs = 1;
+ */
+ public java.util.List
+ * The parameters that govern the prediction.
+ *
+ *
+ * .google.cloud.aiplatform.v1.Tensor parameters = 2;
+ *
+ * @return Whether the parameters field is set.
+ */
+ public boolean hasParameters() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ *
+ *
+ *
+ * The parameters that govern the prediction.
+ *
+ *
+ * .google.cloud.aiplatform.v1.Tensor parameters = 2;
+ *
+ * @return The parameters.
+ */
+ public com.google.cloud.aiplatform.v1.Tensor getParameters() {
+ if (parametersBuilder_ == null) {
+ return parameters_ == null
+ ? com.google.cloud.aiplatform.v1.Tensor.getDefaultInstance()
+ : parameters_;
+ } else {
+ return parametersBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The parameters that govern the prediction.
+ *
+ *
+ * .google.cloud.aiplatform.v1.Tensor parameters = 2;
+ */
+ public Builder setParameters(com.google.cloud.aiplatform.v1.Tensor value) {
+ if (parametersBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ parameters_ = value;
+ } else {
+ parametersBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The parameters that govern the prediction.
+ *
+ *
+ * .google.cloud.aiplatform.v1.Tensor parameters = 2;
+ */
+ public Builder setParameters(com.google.cloud.aiplatform.v1.Tensor.Builder builderForValue) {
+ if (parametersBuilder_ == null) {
+ parameters_ = builderForValue.build();
+ } else {
+ parametersBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The parameters that govern the prediction.
+ *
+ *
+ * .google.cloud.aiplatform.v1.Tensor parameters = 2;
+ */
+ public Builder mergeParameters(com.google.cloud.aiplatform.v1.Tensor value) {
+ if (parametersBuilder_ == null) {
+ if (((bitField0_ & 0x00000002) != 0)
+ && parameters_ != null
+ && parameters_ != com.google.cloud.aiplatform.v1.Tensor.getDefaultInstance()) {
+ getParametersBuilder().mergeFrom(value);
+ } else {
+ parameters_ = value;
+ }
+ } else {
+ parametersBuilder_.mergeFrom(value);
+ }
+ if (parameters_ != null) {
+ bitField0_ |= 0x00000002;
+ onChanged();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The parameters that govern the prediction.
+ *
+ *
+ * .google.cloud.aiplatform.v1.Tensor parameters = 2;
+ */
+ public Builder clearParameters() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ parameters_ = null;
+ if (parametersBuilder_ != null) {
+ parametersBuilder_.dispose();
+ parametersBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The parameters that govern the prediction.
+ *
+ *
+ * .google.cloud.aiplatform.v1.Tensor parameters = 2;
+ */
+ public com.google.cloud.aiplatform.v1.Tensor.Builder getParametersBuilder() {
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return getParametersFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ *
+ * The parameters that govern the prediction.
+ *
+ *
+ * .google.cloud.aiplatform.v1.Tensor parameters = 2;
+ */
+ public com.google.cloud.aiplatform.v1.TensorOrBuilder getParametersOrBuilder() {
+ if (parametersBuilder_ != null) {
+ return parametersBuilder_.getMessageOrBuilder();
+ } else {
+ return parameters_ == null
+ ? com.google.cloud.aiplatform.v1.Tensor.getDefaultInstance()
+ : parameters_;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The parameters that govern the prediction.
+ *
+ *
+ * .google.cloud.aiplatform.v1.Tensor parameters = 2;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.aiplatform.v1.Tensor,
+ com.google.cloud.aiplatform.v1.Tensor.Builder,
+ com.google.cloud.aiplatform.v1.TensorOrBuilder>
+ getParametersFieldBuilder() {
+ if (parametersBuilder_ == null) {
+ parametersBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.aiplatform.v1.Tensor,
+ com.google.cloud.aiplatform.v1.Tensor.Builder,
+ com.google.cloud.aiplatform.v1.TensorOrBuilder>(
+ getParameters(), getParentForChildren(), isClean());
+ parameters_ = null;
+ }
+ return parametersBuilder_;
+ }
+
+ @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.StreamDirectPredictResponse)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.StreamDirectPredictResponse)
+ private static final com.google.cloud.aiplatform.v1.StreamDirectPredictResponse DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.StreamDirectPredictResponse();
+ }
+
+ public static com.google.cloud.aiplatform.v1.StreamDirectPredictResponse getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ * The prediction output.
+ *
+ *
+ * repeated .google.cloud.aiplatform.v1.Tensor outputs = 1;
+ */
+ java.util.List
+ * The prediction output.
+ *
+ *
+ * repeated .google.cloud.aiplatform.v1.Tensor outputs = 1;
+ */
+ com.google.cloud.aiplatform.v1.Tensor getOutputs(int index);
+ /**
+ *
+ *
+ *
+ * The prediction output.
+ *
+ *
+ * repeated .google.cloud.aiplatform.v1.Tensor outputs = 1;
+ */
+ int getOutputsCount();
+ /**
+ *
+ *
+ *
+ * The prediction output.
+ *
+ *
+ * repeated .google.cloud.aiplatform.v1.Tensor outputs = 1;
+ */
+ java.util.List extends com.google.cloud.aiplatform.v1.TensorOrBuilder>
+ getOutputsOrBuilderList();
+ /**
+ *
+ *
+ *
+ * The prediction output.
+ *
+ *
+ * repeated .google.cloud.aiplatform.v1.Tensor outputs = 1;
+ */
+ com.google.cloud.aiplatform.v1.TensorOrBuilder getOutputsOrBuilder(int index);
+
+ /**
+ *
+ *
+ *
+ * The parameters that govern the prediction.
+ *
+ *
+ * .google.cloud.aiplatform.v1.Tensor parameters = 2;
+ *
+ * @return Whether the parameters field is set.
+ */
+ boolean hasParameters();
+ /**
+ *
+ *
+ *
+ * The parameters that govern the prediction.
+ *
+ *
+ * .google.cloud.aiplatform.v1.Tensor parameters = 2;
+ *
+ * @return The parameters.
+ */
+ com.google.cloud.aiplatform.v1.Tensor getParameters();
+ /**
+ *
+ *
+ *
+ * The parameters that govern the prediction.
+ *
+ *
+ * .google.cloud.aiplatform.v1.Tensor parameters = 2;
+ */
+ com.google.cloud.aiplatform.v1.TensorOrBuilder getParametersOrBuilder();
+}
diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StreamDirectRawPredictRequest.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StreamDirectRawPredictRequest.java
new file mode 100644
index 000000000000..34981ab26347
--- /dev/null
+++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StreamDirectRawPredictRequest.java
@@ -0,0 +1,1002 @@
+/*
+ * Copyright 2024 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License 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/prediction_service.proto
+
+// Protobuf Java Version: 3.25.2
+package com.google.cloud.aiplatform.v1;
+
+/**
+ *
+ *
+ *
+ * Request message for
+ * [PredictionService.StreamDirectRawPredict][google.cloud.aiplatform.v1.PredictionService.StreamDirectRawPredict].
+ *
+ * The first message must contain
+ * [endpoint][google.cloud.aiplatform.v1.StreamDirectRawPredictRequest.endpoint]
+ * and
+ * [method_name][google.cloud.aiplatform.v1.StreamDirectRawPredictRequest.method_name]
+ * fields and optionally
+ * [input][google.cloud.aiplatform.v1.StreamDirectRawPredictRequest.input]. The
+ * subsequent messages must contain
+ * [input][google.cloud.aiplatform.v1.StreamDirectRawPredictRequest.input].
+ * [method_name][google.cloud.aiplatform.v1.StreamDirectRawPredictRequest.method_name]
+ * in the subsequent messages have no effect.
+ *
+ *
+ * Protobuf type {@code google.cloud.aiplatform.v1.StreamDirectRawPredictRequest}
+ */
+public final class StreamDirectRawPredictRequest extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.StreamDirectRawPredictRequest)
+ StreamDirectRawPredictRequestOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use StreamDirectRawPredictRequest.newBuilder() to construct.
+ private StreamDirectRawPredictRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private StreamDirectRawPredictRequest() {
+ endpoint_ = "";
+ methodName_ = "";
+ input_ = com.google.protobuf.ByteString.EMPTY;
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+ return new StreamDirectRawPredictRequest();
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.cloud.aiplatform.v1.PredictionServiceProto
+ .internal_static_google_cloud_aiplatform_v1_StreamDirectRawPredictRequest_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.aiplatform.v1.PredictionServiceProto
+ .internal_static_google_cloud_aiplatform_v1_StreamDirectRawPredictRequest_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.aiplatform.v1.StreamDirectRawPredictRequest.class,
+ com.google.cloud.aiplatform.v1.StreamDirectRawPredictRequest.Builder.class);
+ }
+
+ public static final int ENDPOINT_FIELD_NUMBER = 1;
+
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object endpoint_ = "";
+ /**
+ *
+ *
+ *
+ * Required. The name of the Endpoint requested to serve the prediction.
+ * Format:
+ * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+ *
+ *
+ *
+ * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The endpoint.
+ */
+ @java.lang.Override
+ public java.lang.String getEndpoint() {
+ java.lang.Object ref = endpoint_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ endpoint_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Required. The name of the Endpoint requested to serve the prediction.
+ * Format:
+ * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+ *
+ *
+ *
+ * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The bytes for endpoint.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getEndpointBytes() {
+ java.lang.Object ref = endpoint_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ endpoint_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int METHOD_NAME_FIELD_NUMBER = 2;
+
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object methodName_ = "";
+ /**
+ *
+ *
+ *
+ * Optional. Fully qualified name of the API method being invoked to perform
+ * predictions.
+ *
+ * Format:
+ * `/namespace.Service/Method/`
+ * Example:
+ * `/tensorflow.serving.PredictionService/Predict`
+ *
+ *
+ * string method_name = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The methodName.
+ */
+ @java.lang.Override
+ public java.lang.String getMethodName() {
+ java.lang.Object ref = methodName_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ methodName_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Optional. Fully qualified name of the API method being invoked to perform
+ * predictions.
+ *
+ * Format:
+ * `/namespace.Service/Method/`
+ * Example:
+ * `/tensorflow.serving.PredictionService/Predict`
+ *
+ *
+ * string method_name = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for methodName.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getMethodNameBytes() {
+ java.lang.Object ref = methodName_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ methodName_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int INPUT_FIELD_NUMBER = 3;
+ private com.google.protobuf.ByteString input_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ *
+ *
+ *
+ * Optional. The prediction input.
+ *
+ *
+ * bytes input = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The input.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getInput() {
+ return input_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpoint_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, endpoint_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(methodName_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, methodName_);
+ }
+ if (!input_.isEmpty()) {
+ output.writeBytes(3, input_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpoint_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, endpoint_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(methodName_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, methodName_);
+ }
+ if (!input_.isEmpty()) {
+ size += com.google.protobuf.CodedOutputStream.computeBytesSize(3, input_);
+ }
+ 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.StreamDirectRawPredictRequest)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.aiplatform.v1.StreamDirectRawPredictRequest other =
+ (com.google.cloud.aiplatform.v1.StreamDirectRawPredictRequest) obj;
+
+ if (!getEndpoint().equals(other.getEndpoint())) return false;
+ if (!getMethodName().equals(other.getMethodName())) return false;
+ if (!getInput().equals(other.getInput())) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + ENDPOINT_FIELD_NUMBER;
+ hash = (53 * hash) + getEndpoint().hashCode();
+ hash = (37 * hash) + METHOD_NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getMethodName().hashCode();
+ hash = (37 * hash) + INPUT_FIELD_NUMBER;
+ hash = (53 * hash) + getInput().hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.aiplatform.v1.StreamDirectRawPredictRequest parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.aiplatform.v1.StreamDirectRawPredictRequest 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.StreamDirectRawPredictRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.aiplatform.v1.StreamDirectRawPredictRequest 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.StreamDirectRawPredictRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.aiplatform.v1.StreamDirectRawPredictRequest 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.StreamDirectRawPredictRequest parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.aiplatform.v1.StreamDirectRawPredictRequest 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.StreamDirectRawPredictRequest parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.aiplatform.v1.StreamDirectRawPredictRequest 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.StreamDirectRawPredictRequest 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.StreamDirectRawPredictRequest 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.StreamDirectRawPredictRequest prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ *
+ * Request message for
+ * [PredictionService.StreamDirectRawPredict][google.cloud.aiplatform.v1.PredictionService.StreamDirectRawPredict].
+ *
+ * The first message must contain
+ * [endpoint][google.cloud.aiplatform.v1.StreamDirectRawPredictRequest.endpoint]
+ * and
+ * [method_name][google.cloud.aiplatform.v1.StreamDirectRawPredictRequest.method_name]
+ * fields and optionally
+ * [input][google.cloud.aiplatform.v1.StreamDirectRawPredictRequest.input]. The
+ * subsequent messages must contain
+ * [input][google.cloud.aiplatform.v1.StreamDirectRawPredictRequest.input].
+ * [method_name][google.cloud.aiplatform.v1.StreamDirectRawPredictRequest.method_name]
+ * in the subsequent messages have no effect.
+ *
+ *
+ * Protobuf type {@code google.cloud.aiplatform.v1.StreamDirectRawPredictRequest}
+ */
+ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Required. The name of the Endpoint requested to serve the prediction.
+ * Format:
+ * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+ *
+ *
+ *
+ * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The endpoint.
+ */
+ public java.lang.String getEndpoint() {
+ java.lang.Object ref = endpoint_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ endpoint_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Required. The name of the Endpoint requested to serve the prediction.
+ * Format:
+ * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+ *
+ *
+ *
+ * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The bytes for endpoint.
+ */
+ public com.google.protobuf.ByteString getEndpointBytes() {
+ java.lang.Object ref = endpoint_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ endpoint_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Required. The name of the Endpoint requested to serve the prediction.
+ * Format:
+ * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+ *
+ *
+ *
+ * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param value The endpoint to set.
+ * @return This builder for chaining.
+ */
+ public Builder setEndpoint(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ endpoint_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Required. The name of the Endpoint requested to serve the prediction.
+ * Format:
+ * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+ *
+ *
+ *
+ * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearEndpoint() {
+ endpoint_ = getDefaultInstance().getEndpoint();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Required. The name of the Endpoint requested to serve the prediction.
+ * Format:
+ * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+ *
+ *
+ *
+ * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param value The bytes for endpoint to set.
+ * @return This builder for chaining.
+ */
+ public Builder setEndpointBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ endpoint_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object methodName_ = "";
+ /**
+ *
+ *
+ *
+ * Optional. Fully qualified name of the API method being invoked to perform
+ * predictions.
+ *
+ * Format:
+ * `/namespace.Service/Method/`
+ * Example:
+ * `/tensorflow.serving.PredictionService/Predict`
+ *
+ *
+ * string method_name = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The methodName.
+ */
+ public java.lang.String getMethodName() {
+ java.lang.Object ref = methodName_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ methodName_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Optional. Fully qualified name of the API method being invoked to perform
+ * predictions.
+ *
+ * Format:
+ * `/namespace.Service/Method/`
+ * Example:
+ * `/tensorflow.serving.PredictionService/Predict`
+ *
+ *
+ * string method_name = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for methodName.
+ */
+ public com.google.protobuf.ByteString getMethodNameBytes() {
+ java.lang.Object ref = methodName_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ methodName_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Optional. Fully qualified name of the API method being invoked to perform
+ * predictions.
+ *
+ * Format:
+ * `/namespace.Service/Method/`
+ * Example:
+ * `/tensorflow.serving.PredictionService/Predict`
+ *
+ *
+ * string method_name = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param value The methodName to set.
+ * @return This builder for chaining.
+ */
+ public Builder setMethodName(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ methodName_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. Fully qualified name of the API method being invoked to perform
+ * predictions.
+ *
+ * Format:
+ * `/namespace.Service/Method/`
+ * Example:
+ * `/tensorflow.serving.PredictionService/Predict`
+ *
+ *
+ * string method_name = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearMethodName() {
+ methodName_ = getDefaultInstance().getMethodName();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. Fully qualified name of the API method being invoked to perform
+ * predictions.
+ *
+ * Format:
+ * `/namespace.Service/Method/`
+ * Example:
+ * `/tensorflow.serving.PredictionService/Predict`
+ *
+ *
+ * string method_name = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param value The bytes for methodName to set.
+ * @return This builder for chaining.
+ */
+ public Builder setMethodNameBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ methodName_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.ByteString input_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ *
+ *
+ *
+ * Optional. The prediction input.
+ *
+ *
+ * bytes input = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The input.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getInput() {
+ return input_;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The prediction input.
+ *
+ *
+ * bytes input = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param value The input to set.
+ * @return This builder for chaining.
+ */
+ public Builder setInput(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ input_ = value;
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The prediction input.
+ *
+ *
+ * bytes input = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearInput() {
+ bitField0_ = (bitField0_ & ~0x00000004);
+ input_ = getDefaultInstance().getInput();
+ 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.StreamDirectRawPredictRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.aiplatform.v1.StreamDirectRawPredictRequest)
+ private static final com.google.cloud.aiplatform.v1.StreamDirectRawPredictRequest
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.aiplatform.v1.StreamDirectRawPredictRequest();
+ }
+
+ public static com.google.cloud.aiplatform.v1.StreamDirectRawPredictRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ * Required. The name of the Endpoint requested to serve the prediction.
+ * Format:
+ * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+ *
+ *
+ *
+ * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The endpoint.
+ */
+ java.lang.String getEndpoint();
+ /**
+ *
+ *
+ *
+ * Required. The name of the Endpoint requested to serve the prediction.
+ * Format:
+ * `projects/{project}/locations/{location}/endpoints/{endpoint}`
+ *
+ *
+ *
+ * string endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The bytes for endpoint.
+ */
+ com.google.protobuf.ByteString getEndpointBytes();
+
+ /**
+ *
+ *
+ *
+ * Optional. Fully qualified name of the API method being invoked to perform
+ * predictions.
+ *
+ * Format:
+ * `/namespace.Service/Method/`
+ * Example:
+ * `/tensorflow.serving.PredictionService/Predict`
+ *
+ *
+ * string method_name = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The methodName.
+ */
+ java.lang.String getMethodName();
+ /**
+ *
+ *
+ *
+ * Optional. Fully qualified name of the API method being invoked to perform
+ * predictions.
+ *
+ * Format:
+ * `/namespace.Service/Method/`
+ * Example:
+ * `/tensorflow.serving.PredictionService/Predict`
+ *
+ *
+ * string method_name = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for methodName.
+ */
+ com.google.protobuf.ByteString getMethodNameBytes();
+
+ /**
+ *
+ *
+ *
+ * Optional. The prediction input.
+ *
+ *
+ * bytes input = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The input.
+ */
+ com.google.protobuf.ByteString getInput();
+}
diff --git a/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StreamDirectRawPredictResponse.java b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StreamDirectRawPredictResponse.java
new file mode 100644
index 000000000000..2c764921fcac
--- /dev/null
+++ b/java-aiplatform/proto-google-cloud-aiplatform-v1/src/main/java/com/google/cloud/aiplatform/v1/StreamDirectRawPredictResponse.java
@@ -0,0 +1,547 @@
+/*
+ * Copyright 2024 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License 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/prediction_service.proto
+
+// Protobuf Java Version: 3.25.2
+package com.google.cloud.aiplatform.v1;
+
+/**
+ *
+ *
+ *
+ * Response message for
+ * [PredictionService.StreamDirectRawPredict][google.cloud.aiplatform.v1.PredictionService.StreamDirectRawPredict].
+ *
+ *
+ * Protobuf type {@code google.cloud.aiplatform.v1.StreamDirectRawPredictResponse}
+ */
+public final class StreamDirectRawPredictResponse extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:google.cloud.aiplatform.v1.StreamDirectRawPredictResponse)
+ StreamDirectRawPredictResponseOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use StreamDirectRawPredictResponse.newBuilder() to construct.
+ private StreamDirectRawPredictResponse(
+ com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private StreamDirectRawPredictResponse() {
+ output_ = com.google.protobuf.ByteString.EMPTY;
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+ return new StreamDirectRawPredictResponse();
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.cloud.aiplatform.v1.PredictionServiceProto
+ .internal_static_google_cloud_aiplatform_v1_StreamDirectRawPredictResponse_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.aiplatform.v1.PredictionServiceProto
+ .internal_static_google_cloud_aiplatform_v1_StreamDirectRawPredictResponse_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.aiplatform.v1.StreamDirectRawPredictResponse.class,
+ com.google.cloud.aiplatform.v1.StreamDirectRawPredictResponse.Builder.class);
+ }
+
+ public static final int OUTPUT_FIELD_NUMBER = 1;
+ private com.google.protobuf.ByteString output_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ *
+ *
+ *
+ * The prediction output.
+ *
+ *
+ * bytes output = 1;
+ *
+ * @return The output.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getOutput() {
+ return output_;
+ }
+
+ 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 (!output_.isEmpty()) {
+ output.writeBytes(1, output_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!output_.isEmpty()) {
+ size += com.google.protobuf.CodedOutputStream.computeBytesSize(1, 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.StreamDirectRawPredictResponse)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.aiplatform.v1.StreamDirectRawPredictResponse other =
+ (com.google.cloud.aiplatform.v1.StreamDirectRawPredictResponse) obj;
+
+ if (!getOutput().equals(other.getOutput())) 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) + OUTPUT_FIELD_NUMBER;
+ hash = (53 * hash) + getOutput().hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.aiplatform.v1.StreamDirectRawPredictResponse parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.aiplatform.v1.StreamDirectRawPredictResponse 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.StreamDirectRawPredictResponse parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.aiplatform.v1.StreamDirectRawPredictResponse 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.StreamDirectRawPredictResponse parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.aiplatform.v1.StreamDirectRawPredictResponse 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.StreamDirectRawPredictResponse parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.aiplatform.v1.StreamDirectRawPredictResponse 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.StreamDirectRawPredictResponse parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.aiplatform.v1.StreamDirectRawPredictResponse 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.StreamDirectRawPredictResponse 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.StreamDirectRawPredictResponse 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.StreamDirectRawPredictResponse 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
+ * [PredictionService.StreamDirectRawPredict][google.cloud.aiplatform.v1.PredictionService.StreamDirectRawPredict].
+ *
+ *
+ * Protobuf type {@code google.cloud.aiplatform.v1.StreamDirectRawPredictResponse}
+ */
+ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder