diff --git a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/EndpointServiceClient.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/EndpointServiceClient.java index 4f923340d666..961eae0f1a7e 100644 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/EndpointServiceClient.java +++ b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/EndpointServiceClient.java @@ -73,19 +73,246 @@ * such as threads. In the example above, try-with-resources is used, which automatically calls * close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Methods
MethodDescriptionMethod Variants

CreateEndpoint

Creates an Endpoint.

+ *

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

+ *
    + *
  • createEndpointAsync(CreateEndpointRequest request) + *

+ *

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

+ *
    + *
  • createEndpointAsync(LocationName parent, Endpoint endpoint) + *

  • createEndpointAsync(String parent, Endpoint endpoint) + *

  • createEndpointAsync(LocationName parent, Endpoint endpoint, String endpointId) + *

  • createEndpointAsync(String parent, Endpoint endpoint, String endpointId) + *

+ *

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

+ *
    + *
  • createEndpointOperationCallable() + *

  • createEndpointCallable() + *

+ *

GetEndpoint

Gets an Endpoint.

+ *

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

+ *
    + *
  • getEndpoint(GetEndpointRequest request) + *

+ *

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

+ *
    + *
  • getEndpoint(EndpointName name) + *

  • getEndpoint(String name) + *

+ *

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

+ *
    + *
  • getEndpointCallable() + *

+ *

ListEndpoints

Lists Endpoints in a Location.

+ *

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

+ *
    + *
  • listEndpoints(ListEndpointsRequest request) + *

+ *

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

+ *
    + *
  • listEndpoints(LocationName parent) + *

  • listEndpoints(String parent) + *

+ *

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

+ *
    + *
  • listEndpointsPagedCallable() + *

  • listEndpointsCallable() + *

+ *

UpdateEndpoint

Updates an Endpoint.

+ *

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

+ *
    + *
  • updateEndpoint(UpdateEndpointRequest request) + *

+ *

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

+ *
    + *
  • updateEndpoint(Endpoint endpoint, FieldMask updateMask) + *

+ *

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

+ *
    + *
  • updateEndpointCallable() + *

+ *

DeleteEndpoint

Deletes an Endpoint.

+ *

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

+ *
    + *
  • deleteEndpointAsync(DeleteEndpointRequest request) + *

+ *

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

+ *
    + *
  • deleteEndpointAsync(EndpointName name) + *

  • deleteEndpointAsync(String name) + *

+ *

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

+ *
    + *
  • deleteEndpointOperationCallable() + *

  • deleteEndpointCallable() + *

+ *

DeployModel

Deploys a Model into this Endpoint, creating a DeployedModel within it.

+ *

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

+ *
    + *
  • deployModelAsync(DeployModelRequest request) + *

+ *

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

+ *
    + *
  • deployModelAsync(EndpointName endpoint, DeployedModel deployedModel, Map<String, Integer> trafficSplit) + *

  • deployModelAsync(String endpoint, DeployedModel deployedModel, Map<String, Integer> trafficSplit) + *

+ *

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

+ *
    + *
  • deployModelOperationCallable() + *

  • deployModelCallable() + *

+ *

UndeployModel

Undeploys a Model from an Endpoint, removing a DeployedModel from it, and freeing all resources it's using.

+ *

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

+ *
    + *
  • undeployModelAsync(UndeployModelRequest request) + *

+ *

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

+ *
    + *
  • undeployModelAsync(EndpointName endpoint, String deployedModelId, Map<String, Integer> trafficSplit) + *

  • undeployModelAsync(String endpoint, String deployedModelId, Map<String, Integer> trafficSplit) + *

+ *

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

+ *
    + *
  • undeployModelOperationCallable() + *

  • undeployModelCallable() + *

+ *

MutateDeployedModel

Updates an existing deployed model. Updatable fields include `min_replica_count`, `max_replica_count`, `autoscaling_metric_specs`, `disable_container_logging` (v1 only), and `enable_container_logging` (v1beta1 only).

+ *

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

+ *
    + *
  • mutateDeployedModelAsync(MutateDeployedModelRequest request) + *

+ *

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

+ *
    + *
  • mutateDeployedModelAsync(EndpointName endpoint, DeployedModel deployedModel, FieldMask updateMask) + *

  • mutateDeployedModelAsync(String endpoint, DeployedModel deployedModel, FieldMask updateMask) + *

+ *

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

+ *
    + *
  • mutateDeployedModelOperationCallable() + *

  • mutateDeployedModelCallable() + *

+ *

ListLocations

Lists information about the supported locations for this service.

+ *

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

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

+ *

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

+ *
    + *
  • listLocationsPagedCallable() + *

  • listLocationsCallable() + *

+ *

GetLocation

Gets information about a location.

+ *

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

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

+ *

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

+ *
    + *
  • getLocationCallable() + *

+ *

SetIamPolicy

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

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

+ *

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

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

+ *

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

+ *
    + *
  • setIamPolicyCallable() + *

+ *

GetIamPolicy

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

+ *

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

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

+ *

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

+ *
    + *
  • getIamPolicyCallable() + *

+ *

TestIamPermissions

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

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

+ *

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

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

+ *

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

+ *
    + *
  • testIamPermissionsCallable() + *

+ *
* *

See the individual methods for example code. * diff --git a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/EndpointServiceSettings.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/EndpointServiceSettings.java index ad6cf08bae36..82303d127407 100644 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/EndpointServiceSettings.java +++ b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/EndpointServiceSettings.java @@ -232,7 +232,6 @@ public static TransportChannelProvider defaultTransportChannelProvider() { return EndpointServiceStubSettings.defaultTransportChannelProvider(); } - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { return EndpointServiceStubSettings.defaultApiClientHeaderProviderBuilder(); } diff --git a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/LlmUtilityServiceClient.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/LlmUtilityServiceClient.java index 11605fca3e42..aca6a1d56e97 100644 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/LlmUtilityServiceClient.java +++ b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/LlmUtilityServiceClient.java @@ -67,19 +67,125 @@ * such as threads. In the example above, try-with-resources is used, which automatically calls * close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Methods
MethodDescriptionMethod Variants

CountTokens

Perform a token counting.

+ *

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

+ *
    + *
  • countTokens(CountTokensRequest request) + *

+ *

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

+ *
    + *
  • countTokens(EndpointName endpoint, List<Value> instances) + *

  • countTokens(String endpoint, List<Value> instances) + *

+ *

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

+ *
    + *
  • countTokensCallable() + *

+ *

ComputeTokens

Return a list of tokens based on the input text.

+ *

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

+ *
    + *
  • computeTokens(ComputeTokensRequest request) + *

+ *

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

+ *
    + *
  • computeTokens(EndpointName endpoint, List<Value> instances) + *

  • computeTokens(String endpoint, List<Value> instances) + *

+ *

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

+ *
    + *
  • computeTokensCallable() + *

+ *

ListLocations

Lists information about the supported locations for this service.

+ *

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

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

+ *

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

+ *
    + *
  • listLocationsPagedCallable() + *

  • listLocationsCallable() + *

+ *

GetLocation

Gets information about a location.

+ *

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

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

+ *

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

+ *
    + *
  • getLocationCallable() + *

+ *

SetIamPolicy

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

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

+ *

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

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

+ *

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

+ *
    + *
  • setIamPolicyCallable() + *

+ *

GetIamPolicy

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

+ *

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

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

+ *

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

+ *
    + *
  • getIamPolicyCallable() + *

+ *

TestIamPermissions

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

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

+ *

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

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

+ *

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

+ *
    + *
  • testIamPermissionsCallable() + *

+ *
* *

See the individual methods for example code. * diff --git a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/LlmUtilityServiceSettings.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/LlmUtilityServiceSettings.java index 0359e1da98d7..037071042839 100644 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/LlmUtilityServiceSettings.java +++ b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/LlmUtilityServiceSettings.java @@ -162,7 +162,6 @@ public static TransportChannelProvider defaultTransportChannelProvider() { return LlmUtilityServiceStubSettings.defaultTransportChannelProvider(); } - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { return LlmUtilityServiceStubSettings.defaultApiClientHeaderProviderBuilder(); } diff --git a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/PredictionServiceClient.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/PredictionServiceClient.java index 6432d7b04d84..dcd3fa135d65 100644 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/PredictionServiceClient.java +++ b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/PredictionServiceClient.java @@ -71,19 +71,268 @@ * such as threads. In the example above, try-with-resources is used, which automatically calls * close(). * - *

The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *

    - *
  1. A "flattened" method. With this type of method, the fields of the request type have been - * converted into function parameters. It may be the case that not all fields are available as - * parameters, and not every API method will have a flattened method entry point. - *
  2. A "request object" method. This type of method only takes one parameter, a request object, - * which must be constructed before the call. Not every API method will have a request object - * method. - *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API - * callable object, which can be used to initiate calls to the service. - *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Methods
MethodDescriptionMethod Variants

Predict

Perform an online prediction.

+ *

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

+ *
    + *
  • predict(PredictRequest request) + *

+ *

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

+ *
    + *
  • predict(EndpointName endpoint, List<Value> instances, Value parameters) + *

  • predict(String endpoint, List<Value> instances, Value parameters) + *

+ *

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

+ *
    + *
  • predictCallable() + *

+ *

RawPredict

Perform an online prediction with an arbitrary HTTP payload. + *

The response includes the following HTTP headers: + *

    + *
  • `X-Vertex-AI-Endpoint-Id`: ID of the [Endpoint][google.cloud.aiplatform.v1.Endpoint] that served this prediction. + *
+ *
    + *
  • `X-Vertex-AI-Deployed-Model-Id`: ID of the Endpoint's [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] that served this prediction. + *
+ *

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

+ *
    + *
  • rawPredict(RawPredictRequest request) + *

+ *

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

+ *
    + *
  • rawPredict(EndpointName endpoint, HttpBody httpBody) + *

  • rawPredict(String endpoint, HttpBody httpBody) + *

+ *

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

+ *
    + *
  • rawPredictCallable() + *

+ *

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 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.

+ *
    + *
  • directPredict(DirectPredictRequest request) + *

+ *

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

+ *
    + *
  • directPredictCallable() + *

+ *

DirectRawPredict

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.

+ *
    + *
  • directRawPredict(DirectRawPredictRequest request) + *

+ *

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

+ *
    + *
  • directRawPredictCallable() + *

+ *

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.

+ *

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

+ *
    + *
  • streamingPredictCallable() + *

+ *

ServerStreamingPredict

Perform a server-side streaming online prediction request for Vertex LLM streaming.

+ *

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

+ *
    + *
  • serverStreamingPredictCallable() + *

+ *

StreamingRawPredict

Perform a streaming online prediction request through gRPC.

+ *

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

+ *
    + *
  • streamingRawPredictCallable() + *

+ *

Explain

Perform an online explanation. + *

If [deployed_model_id][google.cloud.aiplatform.v1.ExplainRequest.deployed_model_id] is specified, the corresponding DeployModel must have [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec] populated. If [deployed_model_id][google.cloud.aiplatform.v1.ExplainRequest.deployed_model_id] is not specified, all DeployedModels must have [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec] populated.

+ *

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

+ *
    + *
  • explain(ExplainRequest request) + *

+ *

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

+ *
    + *
  • explain(EndpointName endpoint, List<Value> instances, Value parameters, String deployedModelId) + *

  • explain(String endpoint, List<Value> instances, Value parameters, String deployedModelId) + *

+ *

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

+ *
    + *
  • explainCallable() + *

+ *

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.

+ *

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

+ *
    + *
  • streamGenerateContentCallable() + *

+ *

ListLocations

Lists information about the supported locations for this service.

+ *

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

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

+ *

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

+ *
    + *
  • listLocationsPagedCallable() + *

  • listLocationsCallable() + *

+ *

GetLocation

Gets information about a location.

+ *

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

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

+ *

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

+ *
    + *
  • getLocationCallable() + *

+ *

SetIamPolicy

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

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

+ *

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

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

+ *

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

+ *
    + *
  • setIamPolicyCallable() + *

+ *

GetIamPolicy

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

+ *

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

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

+ *

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

+ *
    + *
  • getIamPolicyCallable() + *

+ *

TestIamPermissions

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

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

+ *

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

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

+ *

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

+ *
    + *
  • testIamPermissionsCallable() + *

+ *
* *

See the individual methods for example code. * @@ -554,7 +803,42 @@ public final UnaryCallable rawPredictCallable() { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** - * Perform an unary online prediction request for Vertex first-party products and frameworks. + * Perform a streaming online prediction with an arbitrary HTTP payload. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying 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 stream =
+   *       predictionServiceClient.streamRawPredictCallable().call(request);
+   *   for (HttpBody response : stream) {
+   *     // Do something when a response is received.
+   *   }
+   * }
+   * }
+ */ + public final ServerStreamingCallable + streamRawPredictCallable() { + return stub.streamRawPredictCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Perform an unary online prediction request to a gRPC model server for Vertex first-party + * products and frameworks. * *

Sample code: * @@ -587,7 +871,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: * @@ -620,7 +905,7 @@ public final UnaryCallable directPr // 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: * @@ -653,7 +938,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: * @@ -685,6 +970,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: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying 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 bidiStream =
+   *       predictionServiceClient.streamDirectPredictCallable().call();
+   *   StreamDirectPredictRequest request =
+   *       StreamDirectPredictRequest.newBuilder()
+   *           .setEndpoint(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .addAllInputs(new ArrayList())
+   *           .setParameters(Tensor.newBuilder().build())
+   *           .build();
+   *   bidiStream.send(request);
+   *   for (StreamDirectPredictResponse response : bidiStream) {
+   *     // Do something when a response is received.
+   *   }
+   * }
+   * }
+ */ + public final BidiStreamingCallable + streamDirectPredictCallable() { + return stub.streamDirectPredictCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Perform a streaming online prediction request to a gRPC model server for custom containers. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying 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 bidiStream =
+   *       predictionServiceClient.streamDirectRawPredictCallable().call();
+   *   StreamDirectRawPredictRequest request =
+   *       StreamDirectRawPredictRequest.newBuilder()
+   *           .setEndpoint(
+   *               EndpointName.ofProjectLocationEndpointName(
+   *                       "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
+   *                   .toString())
+   *           .setMethodName("methodName-723163380")
+   *           .setInput(ByteString.EMPTY)
+   *           .build();
+   *   bidiStream.send(request);
+   *   for (StreamDirectRawPredictResponse response : bidiStream) {
+   *     // Do something when a response is received.
+   *   }
+   * }
+   * }
+ */ + public final BidiStreamingCallable + streamDirectRawPredictCallable() { + return stub.streamDirectRawPredictCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Perform a streaming online prediction request for Vertex first-party products and frameworks. @@ -1001,6 +1359,103 @@ public final UnaryCallable explainCallable() { return stub.explainCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Generate content with multimodal inputs. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying 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 contents = new ArrayList<>();
+   *   GenerateContentResponse response = predictionServiceClient.generateContent(model, contents);
+   * }
+   * }
+ * + * @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. + *

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 contents) { + GenerateContentRequest request = + GenerateContentRequest.newBuilder().setModel(model).addAllContents(contents).build(); + return generateContent(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Generate content with multimodal inputs. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying 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())
+   *           .addAllTools(new ArrayList())
+   *           .addAllSafetySettings(new ArrayList())
+   *           .setGenerationConfig(GenerationConfig.newBuilder().build())
+   *           .build();
+   *   GenerateContentResponse response = predictionServiceClient.generateContent(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final GenerateContentResponse generateContent(GenerateContentRequest request) { + return generateContentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Generate content with multimodal inputs. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying 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())
+   *           .addAllTools(new ArrayList())
+   *           .addAllSafetySettings(new ArrayList())
+   *           .setGenerationConfig(GenerationConfig.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       predictionServiceClient.generateContentCallable().futureCall(request);
+   *   // Do something.
+   *   GenerateContentResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + generateContentCallable() { + return stub.generateContentCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Generate content with multimodal inputs with streaming support. diff --git a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/PredictionServiceSettings.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/PredictionServiceSettings.java index 05a9f5e480d7..7c24e5b9fe32 100644 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/PredictionServiceSettings.java +++ b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/PredictionServiceSettings.java @@ -97,6 +97,11 @@ public UnaryCallSettings rawPredictSettings() { return ((PredictionServiceStubSettings) getStubSettings()).rawPredictSettings(); } + /** Returns the object with the settings used for calls to streamRawPredict. */ + public ServerStreamingCallSettings streamRawPredictSettings() { + return ((PredictionServiceStubSettings) getStubSettings()).streamRawPredictSettings(); + } + /** Returns the object with the settings used for calls to directPredict. */ public UnaryCallSettings directPredictSettings() { return ((PredictionServiceStubSettings) getStubSettings()).directPredictSettings(); @@ -108,6 +113,18 @@ public UnaryCallSettings directPred return ((PredictionServiceStubSettings) getStubSettings()).directRawPredictSettings(); } + /** Returns the object with the settings used for calls to streamDirectPredict. */ + public StreamingCallSettings + streamDirectPredictSettings() { + return ((PredictionServiceStubSettings) getStubSettings()).streamDirectPredictSettings(); + } + + /** Returns the object with the settings used for calls to streamDirectRawPredict. */ + public StreamingCallSettings + streamDirectRawPredictSettings() { + return ((PredictionServiceStubSettings) getStubSettings()).streamDirectRawPredictSettings(); + } + /** Returns the object with the settings used for calls to streamingPredict. */ public StreamingCallSettings streamingPredictSettings() { @@ -131,6 +148,12 @@ public UnaryCallSettings explainSettings() { return ((PredictionServiceStubSettings) getStubSettings()).explainSettings(); } + /** Returns the object with the settings used for calls to generateContent. */ + public UnaryCallSettings + generateContentSettings() { + return ((PredictionServiceStubSettings) getStubSettings()).generateContentSettings(); + } + /** Returns the object with the settings used for calls to streamGenerateContent. */ public ServerStreamingCallSettings streamGenerateContentSettings() { @@ -205,7 +228,6 @@ public static TransportChannelProvider defaultTransportChannelProvider() { return PredictionServiceStubSettings.defaultTransportChannelProvider(); } - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { return PredictionServiceStubSettings.defaultApiClientHeaderProviderBuilder(); } @@ -289,6 +311,12 @@ public UnaryCallSettings.Builder rawPredictSettings return getStubSettingsBuilder().rawPredictSettings(); } + /** Returns the builder for the settings used for calls to streamRawPredict. */ + public ServerStreamingCallSettings.Builder + streamRawPredictSettings() { + return getStubSettingsBuilder().streamRawPredictSettings(); + } + /** Returns the builder for the settings used for calls to directPredict. */ public UnaryCallSettings.Builder directPredictSettings() { @@ -301,6 +329,19 @@ public UnaryCallSettings.Builder rawPredictSettings return getStubSettingsBuilder().directRawPredictSettings(); } + /** Returns the builder for the settings used for calls to streamDirectPredict. */ + public StreamingCallSettings.Builder + streamDirectPredictSettings() { + return getStubSettingsBuilder().streamDirectPredictSettings(); + } + + /** Returns the builder for the settings used for calls to streamDirectRawPredict. */ + public StreamingCallSettings.Builder< + StreamDirectRawPredictRequest, StreamDirectRawPredictResponse> + streamDirectRawPredictSettings() { + return getStubSettingsBuilder().streamDirectRawPredictSettings(); + } + /** Returns the builder for the settings used for calls to streamingPredict. */ public StreamingCallSettings.Builder streamingPredictSettings() { @@ -324,6 +365,12 @@ public UnaryCallSettings.Builder explainSetting return getStubSettingsBuilder().explainSettings(); } + /** Returns the builder for the settings used for calls to generateContent. */ + public UnaryCallSettings.Builder + generateContentSettings() { + return getStubSettingsBuilder().generateContentSettings(); + } + /** Returns the builder for the settings used for calls to streamGenerateContent. */ public ServerStreamingCallSettings.Builder streamGenerateContentSettings() { diff --git a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/gapic_metadata.json b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/gapic_metadata.json index 6ad25921cf71..1b5c68bb76b2 100644 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/gapic_metadata.json +++ b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/gapic_metadata.json @@ -97,6 +97,9 @@ "Explain": { "methods": ["explain", "explain", "explain", "explainCallable"] }, + "GenerateContent": { + "methods": ["generateContent", "generateContent", "generateContentCallable"] + }, "GetIamPolicy": { "methods": ["getIamPolicy", "getIamPolicyCallable"] }, @@ -118,9 +121,18 @@ "SetIamPolicy": { "methods": ["setIamPolicy", "setIamPolicyCallable"] }, + "StreamDirectPredict": { + "methods": ["streamDirectPredictCallable"] + }, + "StreamDirectRawPredict": { + "methods": ["streamDirectRawPredictCallable"] + }, "StreamGenerateContent": { "methods": ["streamGenerateContentCallable"] }, + "StreamRawPredict": { + "methods": ["streamRawPredictCallable"] + }, "StreamingPredict": { "methods": ["streamingPredictCallable"] }, diff --git a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/EndpointServiceStubSettings.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/EndpointServiceStubSettings.java index b0068895ebd0..8bdb2e4301f1 100644 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/EndpointServiceStubSettings.java +++ b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/EndpointServiceStubSettings.java @@ -390,6 +390,21 @@ public EndpointServiceStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the endpoint set by the user or the the service's default endpoint. */ + @Override + public String getEndpoint() { + if (super.getEndpoint() != null) { + return super.getEndpoint(); + } + return getDefaultEndpoint(); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "aiplatform"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); @@ -434,7 +449,6 @@ public static TransportChannelProvider defaultTransportChannelProvider() { return defaultGrpcTransportProviderBuilder().build(); } - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { return ApiClientHeaderProvider.newBuilder() .setGeneratedLibToken( @@ -443,7 +457,6 @@ public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProvider GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); } - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { return ApiClientHeaderProvider.newBuilder() .setGeneratedLibToken( @@ -652,7 +665,6 @@ private static Builder createDefault() { builder.setTransportChannelProvider(defaultTransportChannelProvider()); builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); builder.setSwitchToMtlsEndpointAllowed(true); @@ -665,7 +677,6 @@ private static Builder createHttpJsonDefault() { builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); builder.setSwitchToMtlsEndpointAllowed(true); @@ -997,6 +1008,15 @@ public UnaryCallSettings.Builder getIamPolicySettin return testIamPermissionsSettings; } + /** Returns the endpoint set by the user or the the service's default endpoint. */ + @Override + public String getEndpoint() { + if (super.getEndpoint() != null) { + return super.getEndpoint(); + } + return getDefaultEndpoint(); + } + @Override public EndpointServiceStubSettings build() throws IOException { return new EndpointServiceStubSettings(this); diff --git a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/GrpcPredictionServiceStub.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/GrpcPredictionServiceStub.java index 2ac6080d43be..7b0843c0f1ae 100644 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/GrpcPredictionServiceStub.java +++ b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/GrpcPredictionServiceStub.java @@ -43,6 +43,11 @@ import com.google.cloud.vertexai.api.PredictRequest; import com.google.cloud.vertexai.api.PredictResponse; import com.google.cloud.vertexai.api.RawPredictRequest; +import com.google.cloud.vertexai.api.StreamDirectPredictRequest; +import com.google.cloud.vertexai.api.StreamDirectPredictResponse; +import com.google.cloud.vertexai.api.StreamDirectRawPredictRequest; +import com.google.cloud.vertexai.api.StreamDirectRawPredictResponse; +import com.google.cloud.vertexai.api.StreamRawPredictRequest; import com.google.cloud.vertexai.api.StreamingPredictRequest; import com.google.cloud.vertexai.api.StreamingPredictResponse; import com.google.cloud.vertexai.api.StreamingRawPredictRequest; @@ -83,6 +88,16 @@ public class GrpcPredictionServiceStub extends PredictionServiceStub { .setResponseMarshaller(ProtoUtils.marshaller(HttpBody.getDefaultInstance())) .build(); + private static final MethodDescriptor + streamRawPredictMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName("google.cloud.aiplatform.v1.PredictionService/StreamRawPredict") + .setRequestMarshaller( + ProtoUtils.marshaller(StreamRawPredictRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(HttpBody.getDefaultInstance())) + .build(); + private static final MethodDescriptor directPredictMethodDescriptor = MethodDescriptor.newBuilder() @@ -105,6 +120,31 @@ public class GrpcPredictionServiceStub extends PredictionServiceStub { ProtoUtils.marshaller(DirectRawPredictResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor + streamDirectPredictMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.BIDI_STREAMING) + .setFullMethodName("google.cloud.aiplatform.v1.PredictionService/StreamDirectPredict") + .setRequestMarshaller( + ProtoUtils.marshaller(StreamDirectPredictRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(StreamDirectPredictResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + StreamDirectRawPredictRequest, StreamDirectRawPredictResponse> + streamDirectRawPredictMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.BIDI_STREAMING) + .setFullMethodName( + "google.cloud.aiplatform.v1.PredictionService/StreamDirectRawPredict") + .setRequestMarshaller( + ProtoUtils.marshaller(StreamDirectRawPredictRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(StreamDirectRawPredictResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor streamingPredictMethodDescriptor = MethodDescriptor.newBuilder() @@ -147,6 +187,17 @@ public class GrpcPredictionServiceStub extends PredictionServiceStub { .setResponseMarshaller(ProtoUtils.marshaller(ExplainResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor + generateContentMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.aiplatform.v1.PredictionService/GenerateContent") + .setRequestMarshaller( + ProtoUtils.marshaller(GenerateContentRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(GenerateContentResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor streamGenerateContentMethodDescriptor = MethodDescriptor.newBuilder() @@ -207,9 +258,14 @@ public class GrpcPredictionServiceStub extends PredictionServiceStub { private final UnaryCallable predictCallable; private final UnaryCallable rawPredictCallable; + private final ServerStreamingCallable streamRawPredictCallable; private final UnaryCallable directPredictCallable; private final UnaryCallable directRawPredictCallable; + private final BidiStreamingCallable + streamDirectPredictCallable; + private final BidiStreamingCallable + streamDirectRawPredictCallable; private final BidiStreamingCallable streamingPredictCallable; private final ServerStreamingCallable @@ -217,6 +273,8 @@ public class GrpcPredictionServiceStub extends PredictionServiceStub { private final BidiStreamingCallable streamingRawPredictCallable; private final UnaryCallable explainCallable; + private final UnaryCallable + generateContentCallable; private final ServerStreamingCallable streamGenerateContentCallable; private final UnaryCallable listLocationsCallable; @@ -292,6 +350,16 @@ protected GrpcPredictionServiceStub( return builder.build(); }) .build(); + GrpcCallSettings streamRawPredictTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(streamRawPredictMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("endpoint", String.valueOf(request.getEndpoint())); + return builder.build(); + }) + .build(); GrpcCallSettings directPredictTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(directPredictMethodDescriptor) @@ -313,6 +381,17 @@ protected GrpcPredictionServiceStub( return builder.build(); }) .build(); + GrpcCallSettings + streamDirectPredictTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(streamDirectPredictMethodDescriptor) + .build(); + GrpcCallSettings + streamDirectRawPredictTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(streamDirectRawPredictMethodDescriptor) + .build(); GrpcCallSettings streamingPredictTransportSettings = GrpcCallSettings.newBuilder() @@ -344,6 +423,17 @@ protected GrpcPredictionServiceStub( return builder.build(); }) .build(); + GrpcCallSettings + generateContentTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(generateContentMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("model", String.valueOf(request.getModel())); + return builder.build(); + }) + .build(); GrpcCallSettings streamGenerateContentTransportSettings = GrpcCallSettings.newBuilder() @@ -413,12 +503,25 @@ protected GrpcPredictionServiceStub( this.rawPredictCallable = callableFactory.createUnaryCallable( rawPredictTransportSettings, settings.rawPredictSettings(), clientContext); + this.streamRawPredictCallable = + callableFactory.createServerStreamingCallable( + streamRawPredictTransportSettings, settings.streamRawPredictSettings(), clientContext); this.directPredictCallable = callableFactory.createUnaryCallable( directPredictTransportSettings, settings.directPredictSettings(), clientContext); this.directRawPredictCallable = callableFactory.createUnaryCallable( directRawPredictTransportSettings, settings.directRawPredictSettings(), clientContext); + this.streamDirectPredictCallable = + callableFactory.createBidiStreamingCallable( + streamDirectPredictTransportSettings, + settings.streamDirectPredictSettings(), + clientContext); + this.streamDirectRawPredictCallable = + callableFactory.createBidiStreamingCallable( + streamDirectRawPredictTransportSettings, + settings.streamDirectRawPredictSettings(), + clientContext); this.streamingPredictCallable = callableFactory.createBidiStreamingCallable( streamingPredictTransportSettings, settings.streamingPredictSettings(), clientContext); @@ -435,6 +538,9 @@ protected GrpcPredictionServiceStub( this.explainCallable = callableFactory.createUnaryCallable( explainTransportSettings, settings.explainSettings(), clientContext); + this.generateContentCallable = + callableFactory.createUnaryCallable( + generateContentTransportSettings, settings.generateContentSettings(), clientContext); this.streamGenerateContentCallable = callableFactory.createServerStreamingCallable( streamGenerateContentTransportSettings, @@ -479,6 +585,11 @@ public UnaryCallable rawPredictCallable() { return rawPredictCallable; } + @Override + public ServerStreamingCallable streamRawPredictCallable() { + return streamRawPredictCallable; + } + @Override public UnaryCallable directPredictCallable() { return directPredictCallable; @@ -490,6 +601,18 @@ public UnaryCallable directPredictC return directRawPredictCallable; } + @Override + public BidiStreamingCallable + streamDirectPredictCallable() { + return streamDirectPredictCallable; + } + + @Override + public BidiStreamingCallable + streamDirectRawPredictCallable() { + return streamDirectRawPredictCallable; + } + @Override public BidiStreamingCallable streamingPredictCallable() { @@ -513,6 +636,11 @@ public UnaryCallable explainCallable() { return explainCallable; } + @Override + public UnaryCallable generateContentCallable() { + return generateContentCallable; + } + @Override public ServerStreamingCallable streamGenerateContentCallable() { diff --git a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/HttpJsonEndpointServiceStub.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/HttpJsonEndpointServiceStub.java index 56155d4b078f..cbf0e7c7aded 100644 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/HttpJsonEndpointServiceStub.java +++ b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/HttpJsonEndpointServiceStub.java @@ -487,6 +487,7 @@ public class HttpJsonEndpointServiceStub extends EndpointServiceStub { }) .setAdditionalPaths( "/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:setIamPolicy", + "/v1/{resource=projects/*/locations/*/models/*}:setIamPolicy", "/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy", "/ui/{resource=projects/*/locations/*/featurestores/*}:setIamPolicy", "/ui/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:setIamPolicy", @@ -531,6 +532,7 @@ public class HttpJsonEndpointServiceStub extends EndpointServiceStub { }) .setAdditionalPaths( "/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:getIamPolicy", + "/v1/{resource=projects/*/locations/*/models/*}:getIamPolicy", "/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy", "/ui/{resource=projects/*/locations/*/featurestores/*}:getIamPolicy", "/ui/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:getIamPolicy", @@ -573,6 +575,7 @@ public class HttpJsonEndpointServiceStub extends EndpointServiceStub { }) .setAdditionalPaths( "/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:testIamPermissions", + "/v1/{resource=projects/*/locations/*/models/*}:testIamPermissions", "/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions", "/ui/{resource=projects/*/locations/*/featurestores/*}:testIamPermissions", "/ui/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:testIamPermissions", @@ -771,6 +774,26 @@ protected HttpJsonEndpointServiceStub( .setPost( "/ui/{name=projects/*/locations/*/indexEndpoints/*/operations/*}:cancel") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setPost( + "/ui/{name=projects/*/locations/*/metadataStores/*/operations/*}:cancel") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setPost( + "/ui/{name=projects/*/locations/*/metadataStores/*/artifacts/*/operations/*}:cancel") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setPost( + "/ui/{name=projects/*/locations/*/metadataStores/*/contexts/*/operations/*}:cancel") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setPost( + "/ui/{name=projects/*/locations/*/metadataStores/*/executions/*/operations/*}:cancel") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setPost( @@ -925,6 +948,26 @@ protected HttpJsonEndpointServiceStub( .setPost( "/v1/{name=projects/*/locations/*/indexEndpoints/*/operations/*}:cancel") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setPost( + "/v1/{name=projects/*/locations/*/metadataStores/*/operations/*}:cancel") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setPost( + "/v1/{name=projects/*/locations/*/metadataStores/*/artifacts/*/operations/*}:cancel") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setPost( + "/v1/{name=projects/*/locations/*/metadataStores/*/contexts/*/operations/*}:cancel") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setPost( + "/v1/{name=projects/*/locations/*/metadataStores/*/executions/*/operations/*}:cancel") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setPost( @@ -1090,6 +1133,26 @@ protected HttpJsonEndpointServiceStub( .setDelete( "/ui/{name=projects/*/locations/*/indexEndpoints/*/operations/*}") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setDelete( + "/ui/{name=projects/*/locations/*/metadataStores/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setDelete( + "/ui/{name=projects/*/locations/*/metadataStores/*/artifacts/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setDelete( + "/ui/{name=projects/*/locations/*/metadataStores/*/contexts/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setDelete( + "/ui/{name=projects/*/locations/*/metadataStores/*/executions/*/operations/*}") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setDelete( @@ -1264,6 +1327,26 @@ protected HttpJsonEndpointServiceStub( .setDelete( "/v1/{name=projects/*/locations/*/indexEndpoints/*/operations/*}") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setDelete( + "/v1/{name=projects/*/locations/*/metadataStores/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setDelete( + "/v1/{name=projects/*/locations/*/metadataStores/*/artifacts/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setDelete( + "/v1/{name=projects/*/locations/*/metadataStores/*/contexts/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setDelete( + "/v1/{name=projects/*/locations/*/metadataStores/*/executions/*/operations/*}") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setDelete( @@ -1452,6 +1535,26 @@ protected HttpJsonEndpointServiceStub( .setGet( "/ui/{name=projects/*/locations/*/indexEndpoints/*/operations/*}") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/ui/{name=projects/*/locations/*/metadataStores/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/ui/{name=projects/*/locations/*/metadataStores/*/artifacts/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/ui/{name=projects/*/locations/*/metadataStores/*/contexts/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/ui/{name=projects/*/locations/*/metadataStores/*/executions/*/operations/*}") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setGet( @@ -1622,6 +1725,26 @@ protected HttpJsonEndpointServiceStub( .setGet( "/v1/{name=projects/*/locations/*/indexEndpoints/*/operations/*}") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1/{name=projects/*/locations/*/metadataStores/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1/{name=projects/*/locations/*/metadataStores/*/artifacts/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1/{name=projects/*/locations/*/metadataStores/*/contexts/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1/{name=projects/*/locations/*/metadataStores/*/executions/*/operations/*}") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setGet( @@ -1800,6 +1923,26 @@ protected HttpJsonEndpointServiceStub( .setGet( "/ui/{name=projects/*/locations/*/indexEndpoints/*}/operations") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/ui/{name=projects/*/locations/*/metadataStores/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/ui/{name=projects/*/locations/*/metadataStores/*/artifacts/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/ui/{name=projects/*/locations/*/metadataStores/*/contexts/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/ui/{name=projects/*/locations/*/metadataStores/*/executions/*}/operations") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setGet( @@ -1967,6 +2110,26 @@ protected HttpJsonEndpointServiceStub( .setGet( "/v1/{name=projects/*/locations/*/indexEndpoints/*}/operations") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1/{name=projects/*/locations/*/metadataStores/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1/{name=projects/*/locations/*/metadataStores/*/artifacts/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1/{name=projects/*/locations/*/metadataStores/*/contexts/*}/operations") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1/{name=projects/*/locations/*/metadataStores/*/executions/*}/operations") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setGet( @@ -2149,6 +2312,26 @@ protected HttpJsonEndpointServiceStub( .setPost( "/ui/{name=projects/*/locations/*/indexEndpoints/*/operations/*}:wait") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setPost( + "/ui/{name=projects/*/locations/*/metadataStores/*/operations/*}:wait") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setPost( + "/ui/{name=projects/*/locations/*/metadataStores/*/artifacts/*/operations/*}:wait") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setPost( + "/ui/{name=projects/*/locations/*/metadataStores/*/contexts/*/operations/*}:wait") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setPost( + "/ui/{name=projects/*/locations/*/metadataStores/*/executions/*/operations/*}:wait") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setPost( @@ -2323,6 +2506,26 @@ protected HttpJsonEndpointServiceStub( .setPost( "/v1/{name=projects/*/locations/*/indexEndpoints/*/operations/*}:wait") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setPost( + "/v1/{name=projects/*/locations/*/metadataStores/*/operations/*}:wait") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setPost( + "/v1/{name=projects/*/locations/*/metadataStores/*/artifacts/*/operations/*}:wait") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setPost( + "/v1/{name=projects/*/locations/*/metadataStores/*/contexts/*/operations/*}:wait") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setPost( + "/v1/{name=projects/*/locations/*/metadataStores/*/executions/*/operations/*}:wait") + .build()) .addAdditionalBindings( HttpRule.newBuilder() .setPost( diff --git a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/HttpJsonLlmUtilityServiceStub.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/HttpJsonLlmUtilityServiceStub.java index 9de9fb12be0e..af7d16495cec 100644 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/HttpJsonLlmUtilityServiceStub.java +++ b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/HttpJsonLlmUtilityServiceStub.java @@ -228,6 +228,7 @@ public class HttpJsonLlmUtilityServiceStub extends LlmUtilityServiceStub { }) .setAdditionalPaths( "/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:setIamPolicy", + "/v1/{resource=projects/*/locations/*/models/*}:setIamPolicy", "/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy", "/ui/{resource=projects/*/locations/*/featurestores/*}:setIamPolicy", "/ui/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:setIamPolicy", @@ -272,6 +273,7 @@ public class HttpJsonLlmUtilityServiceStub extends LlmUtilityServiceStub { }) .setAdditionalPaths( "/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:getIamPolicy", + "/v1/{resource=projects/*/locations/*/models/*}:getIamPolicy", "/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy", "/ui/{resource=projects/*/locations/*/featurestores/*}:getIamPolicy", "/ui/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:getIamPolicy", @@ -314,6 +316,7 @@ public class HttpJsonLlmUtilityServiceStub extends LlmUtilityServiceStub { }) .setAdditionalPaths( "/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:testIamPermissions", + "/v1/{resource=projects/*/locations/*/models/*}:testIamPermissions", "/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions", "/ui/{resource=projects/*/locations/*/featurestores/*}:testIamPermissions", "/ui/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:testIamPermissions", diff --git a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/HttpJsonPredictionServiceStub.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/HttpJsonPredictionServiceStub.java index ba2a926fc0b9..f609806585d7 100644 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/HttpJsonPredictionServiceStub.java +++ b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/HttpJsonPredictionServiceStub.java @@ -49,6 +49,11 @@ import com.google.cloud.vertexai.api.PredictRequest; import com.google.cloud.vertexai.api.PredictResponse; import com.google.cloud.vertexai.api.RawPredictRequest; +import com.google.cloud.vertexai.api.StreamDirectPredictRequest; +import com.google.cloud.vertexai.api.StreamDirectPredictResponse; +import com.google.cloud.vertexai.api.StreamDirectRawPredictRequest; +import com.google.cloud.vertexai.api.StreamDirectRawPredictResponse; +import com.google.cloud.vertexai.api.StreamRawPredictRequest; import com.google.cloud.vertexai.api.StreamingPredictRequest; import com.google.cloud.vertexai.api.StreamingPredictResponse; import com.google.cloud.vertexai.api.StreamingRawPredictRequest; @@ -153,6 +158,44 @@ public class HttpJsonPredictionServiceStub extends PredictionServiceStub { .build()) .build(); + private static final ApiMethodDescriptor + streamRawPredictMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.aiplatform.v1.PredictionService/StreamRawPredict") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.SERVER_STREAMING) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{endpoint=projects/*/locations/*/endpoints/*}:streamRawPredict", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "endpoint", request.getEndpoint()); + return fields; + }) + .setAdditionalPaths( + "/v1/{endpoint=projects/*/locations/*/publishers/*/models/*}:streamRawPredict") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearEndpoint().build(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(HttpBody.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private static final ApiMethodDescriptor directPredictMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -300,6 +343,44 @@ public class HttpJsonPredictionServiceStub extends PredictionServiceStub { .build()) .build(); + private static final ApiMethodDescriptor + generateContentMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.aiplatform.v1.PredictionService/GenerateContent") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{model=projects/*/locations/*/endpoints/*}:generateContent", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "model", request.getModel()); + return fields; + }) + .setAdditionalPaths( + "/v1/{model=projects/*/locations/*/publishers/*/models/*}:generateContent") + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearModel().build(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(GenerateContentResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private static final ApiMethodDescriptor streamGenerateContentMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -426,6 +507,7 @@ public class HttpJsonPredictionServiceStub extends PredictionServiceStub { }) .setAdditionalPaths( "/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:setIamPolicy", + "/v1/{resource=projects/*/locations/*/models/*}:setIamPolicy", "/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy", "/ui/{resource=projects/*/locations/*/featurestores/*}:setIamPolicy", "/ui/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:setIamPolicy", @@ -470,6 +552,7 @@ public class HttpJsonPredictionServiceStub extends PredictionServiceStub { }) .setAdditionalPaths( "/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:getIamPolicy", + "/v1/{resource=projects/*/locations/*/models/*}:getIamPolicy", "/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy", "/ui/{resource=projects/*/locations/*/featurestores/*}:getIamPolicy", "/ui/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:getIamPolicy", @@ -512,6 +595,7 @@ public class HttpJsonPredictionServiceStub extends PredictionServiceStub { }) .setAdditionalPaths( "/v1/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:testIamPermissions", + "/v1/{resource=projects/*/locations/*/models/*}:testIamPermissions", "/v1/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions", "/ui/{resource=projects/*/locations/*/featurestores/*}:testIamPermissions", "/ui/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:testIamPermissions", @@ -536,12 +620,15 @@ public class HttpJsonPredictionServiceStub extends PredictionServiceStub { private final UnaryCallable predictCallable; private final UnaryCallable rawPredictCallable; + private final ServerStreamingCallable streamRawPredictCallable; private final UnaryCallable directPredictCallable; private final UnaryCallable directRawPredictCallable; private final ServerStreamingCallable serverStreamingPredictCallable; private final UnaryCallable explainCallable; + private final UnaryCallable + generateContentCallable; private final ServerStreamingCallable streamGenerateContentCallable; private final UnaryCallable listLocationsCallable; @@ -617,6 +704,17 @@ protected HttpJsonPredictionServiceStub( return builder.build(); }) .build(); + HttpJsonCallSettings streamRawPredictTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(streamRawPredictMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("endpoint", String.valueOf(request.getEndpoint())); + return builder.build(); + }) + .build(); HttpJsonCallSettings directPredictTransportSettings = HttpJsonCallSettings.newBuilder() @@ -664,6 +762,18 @@ protected HttpJsonPredictionServiceStub( return builder.build(); }) .build(); + HttpJsonCallSettings + generateContentTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(generateContentMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("model", String.valueOf(request.getModel())); + return builder.build(); + }) + .build(); HttpJsonCallSettings streamGenerateContentTransportSettings = HttpJsonCallSettings.newBuilder() @@ -740,6 +850,9 @@ protected HttpJsonPredictionServiceStub( this.rawPredictCallable = callableFactory.createUnaryCallable( rawPredictTransportSettings, settings.rawPredictSettings(), clientContext); + this.streamRawPredictCallable = + callableFactory.createServerStreamingCallable( + streamRawPredictTransportSettings, settings.streamRawPredictSettings(), clientContext); this.directPredictCallable = callableFactory.createUnaryCallable( directPredictTransportSettings, settings.directPredictSettings(), clientContext); @@ -754,6 +867,9 @@ protected HttpJsonPredictionServiceStub( this.explainCallable = callableFactory.createUnaryCallable( explainTransportSettings, settings.explainSettings(), clientContext); + this.generateContentCallable = + callableFactory.createUnaryCallable( + generateContentTransportSettings, settings.generateContentSettings(), clientContext); this.streamGenerateContentCallable = callableFactory.createServerStreamingCallable( streamGenerateContentTransportSettings, @@ -789,10 +905,12 @@ public static List getMethodDescriptors() { List methodDescriptors = new ArrayList<>(); methodDescriptors.add(predictMethodDescriptor); methodDescriptors.add(rawPredictMethodDescriptor); + methodDescriptors.add(streamRawPredictMethodDescriptor); methodDescriptors.add(directPredictMethodDescriptor); methodDescriptors.add(directRawPredictMethodDescriptor); methodDescriptors.add(serverStreamingPredictMethodDescriptor); methodDescriptors.add(explainMethodDescriptor); + methodDescriptors.add(generateContentMethodDescriptor); methodDescriptors.add(streamGenerateContentMethodDescriptor); methodDescriptors.add(listLocationsMethodDescriptor); methodDescriptors.add(getLocationMethodDescriptor); @@ -812,6 +930,11 @@ public UnaryCallable rawPredictCallable() { return rawPredictCallable; } + @Override + public ServerStreamingCallable streamRawPredictCallable() { + return streamRawPredictCallable; + } + @Override public UnaryCallable directPredictCallable() { return directPredictCallable; @@ -834,6 +957,11 @@ public UnaryCallable explainCallable() { return explainCallable; } + @Override + public UnaryCallable generateContentCallable() { + return generateContentCallable; + } + @Override public ServerStreamingCallable streamGenerateContentCallable() { @@ -872,6 +1000,20 @@ public UnaryCallable getIamPolicyCallable() { return testIamPermissionsCallable; } + @Override + public BidiStreamingCallable + streamDirectPredictCallable() { + throw new UnsupportedOperationException( + "Not implemented: streamDirectPredictCallable(). REST transport is not implemented for this method yet."); + } + + @Override + public BidiStreamingCallable + streamDirectRawPredictCallable() { + throw new UnsupportedOperationException( + "Not implemented: streamDirectRawPredictCallable(). REST transport is not implemented for this method yet."); + } + @Override public BidiStreamingCallable streamingPredictCallable() { diff --git a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/LlmUtilityServiceStubSettings.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/LlmUtilityServiceStubSettings.java index 7ba1e1bf5c4c..afc0792f076c 100644 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/LlmUtilityServiceStubSettings.java +++ b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/LlmUtilityServiceStubSettings.java @@ -226,6 +226,21 @@ public LlmUtilityServiceStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the endpoint set by the user or the the service's default endpoint. */ + @Override + public String getEndpoint() { + if (super.getEndpoint() != null) { + return super.getEndpoint(); + } + return getDefaultEndpoint(); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "aiplatform"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); @@ -270,7 +285,6 @@ public static TransportChannelProvider defaultTransportChannelProvider() { return defaultGrpcTransportProviderBuilder().build(); } - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { return ApiClientHeaderProvider.newBuilder() .setGeneratedLibToken( @@ -279,7 +293,6 @@ public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProvider GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); } - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { return ApiClientHeaderProvider.newBuilder() .setGeneratedLibToken( @@ -415,7 +428,6 @@ private static Builder createDefault() { builder.setTransportChannelProvider(defaultTransportChannelProvider()); builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); builder.setSwitchToMtlsEndpointAllowed(true); @@ -428,7 +440,6 @@ private static Builder createHttpJsonDefault() { builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); builder.setSwitchToMtlsEndpointAllowed(true); @@ -529,6 +540,15 @@ public UnaryCallSettings.Builder getIamPolicySettin return testIamPermissionsSettings; } + /** Returns the endpoint set by the user or the the service's default endpoint. */ + @Override + public String getEndpoint() { + if (super.getEndpoint() != null) { + return super.getEndpoint(); + } + return getDefaultEndpoint(); + } + @Override public LlmUtilityServiceStubSettings build() throws IOException { return new LlmUtilityServiceStubSettings(this); diff --git a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/PredictionServiceStub.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/PredictionServiceStub.java index 103ab9743d4f..368c3ef411a1 100644 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/PredictionServiceStub.java +++ b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/PredictionServiceStub.java @@ -38,6 +38,11 @@ import com.google.cloud.vertexai.api.PredictRequest; import com.google.cloud.vertexai.api.PredictResponse; import com.google.cloud.vertexai.api.RawPredictRequest; +import com.google.cloud.vertexai.api.StreamDirectPredictRequest; +import com.google.cloud.vertexai.api.StreamDirectPredictResponse; +import com.google.cloud.vertexai.api.StreamDirectRawPredictRequest; +import com.google.cloud.vertexai.api.StreamDirectRawPredictResponse; +import com.google.cloud.vertexai.api.StreamRawPredictRequest; import com.google.cloud.vertexai.api.StreamingPredictRequest; import com.google.cloud.vertexai.api.StreamingPredictResponse; import com.google.cloud.vertexai.api.StreamingRawPredictRequest; @@ -66,6 +71,10 @@ public UnaryCallable rawPredictCallable() { throw new UnsupportedOperationException("Not implemented: rawPredictCallable()"); } + public ServerStreamingCallable streamRawPredictCallable() { + throw new UnsupportedOperationException("Not implemented: streamRawPredictCallable()"); + } + public UnaryCallable directPredictCallable() { throw new UnsupportedOperationException("Not implemented: directPredictCallable()"); } @@ -75,6 +84,16 @@ public UnaryCallable directPredictC throw new UnsupportedOperationException("Not implemented: directRawPredictCallable()"); } + public BidiStreamingCallable + streamDirectPredictCallable() { + throw new UnsupportedOperationException("Not implemented: streamDirectPredictCallable()"); + } + + public BidiStreamingCallable + streamDirectRawPredictCallable() { + throw new UnsupportedOperationException("Not implemented: streamDirectRawPredictCallable()"); + } + public BidiStreamingCallable streamingPredictCallable() { throw new UnsupportedOperationException("Not implemented: streamingPredictCallable()"); @@ -94,6 +113,10 @@ public UnaryCallable explainCallable() { throw new UnsupportedOperationException("Not implemented: explainCallable()"); } + public UnaryCallable generateContentCallable() { + throw new UnsupportedOperationException("Not implemented: generateContentCallable()"); + } + public ServerStreamingCallable streamGenerateContentCallable() { throw new UnsupportedOperationException("Not implemented: streamGenerateContentCallable()"); diff --git a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/PredictionServiceStubSettings.java b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/PredictionServiceStubSettings.java index 11f4bf8daf29..31d4683d731f 100644 --- a/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/PredictionServiceStubSettings.java +++ b/java-vertexai/google-cloud-vertexai/src/main/java/com/google/cloud/vertexai/api/stub/PredictionServiceStubSettings.java @@ -61,6 +61,11 @@ import com.google.cloud.vertexai.api.PredictRequest; import com.google.cloud.vertexai.api.PredictResponse; import com.google.cloud.vertexai.api.RawPredictRequest; +import com.google.cloud.vertexai.api.StreamDirectPredictRequest; +import com.google.cloud.vertexai.api.StreamDirectPredictResponse; +import com.google.cloud.vertexai.api.StreamDirectRawPredictRequest; +import com.google.cloud.vertexai.api.StreamDirectRawPredictResponse; +import com.google.cloud.vertexai.api.StreamRawPredictRequest; import com.google.cloud.vertexai.api.StreamingPredictRequest; import com.google.cloud.vertexai.api.StreamingPredictResponse; import com.google.cloud.vertexai.api.StreamingRawPredictRequest; @@ -124,10 +129,16 @@ public class PredictionServiceStubSettings extends StubSettings predictSettings; private final UnaryCallSettings rawPredictSettings; + private final ServerStreamingCallSettings + streamRawPredictSettings; private final UnaryCallSettings directPredictSettings; private final UnaryCallSettings directRawPredictSettings; + private final StreamingCallSettings + streamDirectPredictSettings; + private final StreamingCallSettings + streamDirectRawPredictSettings; private final StreamingCallSettings streamingPredictSettings; private final ServerStreamingCallSettings @@ -135,6 +146,8 @@ public class PredictionServiceStubSettings extends StubSettings streamingRawPredictSettings; private final UnaryCallSettings explainSettings; + private final UnaryCallSettings + generateContentSettings; private final ServerStreamingCallSettings streamGenerateContentSettings; private final PagedCallSettings< @@ -209,6 +222,11 @@ public UnaryCallSettings rawPredictSettings() { return rawPredictSettings; } + /** Returns the object with the settings used for calls to streamRawPredict. */ + public ServerStreamingCallSettings streamRawPredictSettings() { + return streamRawPredictSettings; + } + /** Returns the object with the settings used for calls to directPredict. */ public UnaryCallSettings directPredictSettings() { return directPredictSettings; @@ -220,6 +238,18 @@ public UnaryCallSettings directPred return directRawPredictSettings; } + /** Returns the object with the settings used for calls to streamDirectPredict. */ + public StreamingCallSettings + streamDirectPredictSettings() { + return streamDirectPredictSettings; + } + + /** Returns the object with the settings used for calls to streamDirectRawPredict. */ + public StreamingCallSettings + streamDirectRawPredictSettings() { + return streamDirectRawPredictSettings; + } + /** Returns the object with the settings used for calls to streamingPredict. */ public StreamingCallSettings streamingPredictSettings() { @@ -243,6 +273,12 @@ public UnaryCallSettings explainSettings() { return explainSettings; } + /** Returns the object with the settings used for calls to generateContent. */ + public UnaryCallSettings + generateContentSettings() { + return generateContentSettings; + } + /** Returns the object with the settings used for calls to streamGenerateContent. */ public ServerStreamingCallSettings streamGenerateContentSettings() { @@ -292,6 +328,21 @@ public PredictionServiceStub createStub() throws IOException { "Transport not supported: %s", getTransportChannelProvider().getTransportName())); } + /** Returns the endpoint set by the user or the the service's default endpoint. */ + @Override + public String getEndpoint() { + if (super.getEndpoint() != null) { + return super.getEndpoint(); + } + return getDefaultEndpoint(); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "aiplatform"; + } + /** Returns a builder for the default ExecutorProvider for this service. */ public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { return InstantiatingExecutorProvider.newBuilder(); @@ -336,7 +387,6 @@ public static TransportChannelProvider defaultTransportChannelProvider() { return defaultGrpcTransportProviderBuilder().build(); } - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { return ApiClientHeaderProvider.newBuilder() .setGeneratedLibToken( @@ -345,7 +395,6 @@ public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProvider GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); } - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { return ApiClientHeaderProvider.newBuilder() .setGeneratedLibToken( @@ -384,12 +433,16 @@ protected PredictionServiceStubSettings(Builder settingsBuilder) throws IOExcept predictSettings = settingsBuilder.predictSettings().build(); rawPredictSettings = settingsBuilder.rawPredictSettings().build(); + streamRawPredictSettings = settingsBuilder.streamRawPredictSettings().build(); directPredictSettings = settingsBuilder.directPredictSettings().build(); directRawPredictSettings = settingsBuilder.directRawPredictSettings().build(); + streamDirectPredictSettings = settingsBuilder.streamDirectPredictSettings().build(); + streamDirectRawPredictSettings = settingsBuilder.streamDirectRawPredictSettings().build(); streamingPredictSettings = settingsBuilder.streamingPredictSettings().build(); serverStreamingPredictSettings = settingsBuilder.serverStreamingPredictSettings().build(); streamingRawPredictSettings = settingsBuilder.streamingRawPredictSettings().build(); explainSettings = settingsBuilder.explainSettings().build(); + generateContentSettings = settingsBuilder.generateContentSettings().build(); streamGenerateContentSettings = settingsBuilder.streamGenerateContentSettings().build(); listLocationsSettings = settingsBuilder.listLocationsSettings().build(); getLocationSettings = settingsBuilder.getLocationSettings().build(); @@ -403,10 +456,18 @@ public static class Builder extends StubSettings.Builder> unaryMethodSettingsBuilders; private final UnaryCallSettings.Builder predictSettings; private final UnaryCallSettings.Builder rawPredictSettings; + private final ServerStreamingCallSettings.Builder + streamRawPredictSettings; private final UnaryCallSettings.Builder directPredictSettings; private final UnaryCallSettings.Builder directRawPredictSettings; + private final StreamingCallSettings.Builder< + StreamDirectPredictRequest, StreamDirectPredictResponse> + streamDirectPredictSettings; + private final StreamingCallSettings.Builder< + StreamDirectRawPredictRequest, StreamDirectRawPredictResponse> + streamDirectRawPredictSettings; private final StreamingCallSettings.Builder streamingPredictSettings; private final ServerStreamingCallSettings.Builder< @@ -416,6 +477,8 @@ public static class Builder extends StubSettings.Builder streamingRawPredictSettings; private final UnaryCallSettings.Builder explainSettings; + private final UnaryCallSettings.Builder + generateContentSettings; private final ServerStreamingCallSettings.Builder< GenerateContentRequest, GenerateContentResponse> streamGenerateContentSettings; @@ -456,12 +519,16 @@ protected Builder(ClientContext clientContext) { predictSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); rawPredictSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + streamRawPredictSettings = ServerStreamingCallSettings.newBuilder(); directPredictSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); directRawPredictSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + streamDirectPredictSettings = StreamingCallSettings.newBuilder(); + streamDirectRawPredictSettings = StreamingCallSettings.newBuilder(); streamingPredictSettings = StreamingCallSettings.newBuilder(); serverStreamingPredictSettings = ServerStreamingCallSettings.newBuilder(); streamingRawPredictSettings = StreamingCallSettings.newBuilder(); explainSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + generateContentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); streamGenerateContentSettings = ServerStreamingCallSettings.newBuilder(); listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -476,6 +543,7 @@ protected Builder(ClientContext clientContext) { directPredictSettings, directRawPredictSettings, explainSettings, + generateContentSettings, listLocationsSettings, getLocationSettings, setIamPolicySettings, @@ -489,12 +557,16 @@ protected Builder(PredictionServiceStubSettings settings) { predictSettings = settings.predictSettings.toBuilder(); rawPredictSettings = settings.rawPredictSettings.toBuilder(); + streamRawPredictSettings = settings.streamRawPredictSettings.toBuilder(); directPredictSettings = settings.directPredictSettings.toBuilder(); directRawPredictSettings = settings.directRawPredictSettings.toBuilder(); + streamDirectPredictSettings = settings.streamDirectPredictSettings.toBuilder(); + streamDirectRawPredictSettings = settings.streamDirectRawPredictSettings.toBuilder(); streamingPredictSettings = settings.streamingPredictSettings.toBuilder(); serverStreamingPredictSettings = settings.serverStreamingPredictSettings.toBuilder(); streamingRawPredictSettings = settings.streamingRawPredictSettings.toBuilder(); explainSettings = settings.explainSettings.toBuilder(); + generateContentSettings = settings.generateContentSettings.toBuilder(); streamGenerateContentSettings = settings.streamGenerateContentSettings.toBuilder(); listLocationsSettings = settings.listLocationsSettings.toBuilder(); getLocationSettings = settings.getLocationSettings.toBuilder(); @@ -509,6 +581,7 @@ protected Builder(PredictionServiceStubSettings settings) { directPredictSettings, directRawPredictSettings, explainSettings, + generateContentSettings, listLocationsSettings, getLocationSettings, setIamPolicySettings, @@ -522,7 +595,6 @@ private static Builder createDefault() { builder.setTransportChannelProvider(defaultTransportChannelProvider()); builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); builder.setSwitchToMtlsEndpointAllowed(true); @@ -535,7 +607,6 @@ private static Builder createHttpJsonDefault() { builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); builder.setSwitchToMtlsEndpointAllowed(true); @@ -553,6 +624,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder + .streamRawPredictSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder .directPredictSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) @@ -573,6 +649,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder + .generateContentSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + builder .streamGenerateContentSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) @@ -631,6 +712,12 @@ public UnaryCallSettings.Builder rawPredictSettings return rawPredictSettings; } + /** Returns the builder for the settings used for calls to streamRawPredict. */ + public ServerStreamingCallSettings.Builder + streamRawPredictSettings() { + return streamRawPredictSettings; + } + /** Returns the builder for the settings used for calls to directPredict. */ public UnaryCallSettings.Builder directPredictSettings() { @@ -643,6 +730,19 @@ public UnaryCallSettings.Builder rawPredictSettings return directRawPredictSettings; } + /** Returns the builder for the settings used for calls to streamDirectPredict. */ + public StreamingCallSettings.Builder + streamDirectPredictSettings() { + return streamDirectPredictSettings; + } + + /** Returns the builder for the settings used for calls to streamDirectRawPredict. */ + public StreamingCallSettings.Builder< + StreamDirectRawPredictRequest, StreamDirectRawPredictResponse> + streamDirectRawPredictSettings() { + return streamDirectRawPredictSettings; + } + /** Returns the builder for the settings used for calls to streamingPredict. */ public StreamingCallSettings.Builder streamingPredictSettings() { @@ -666,6 +766,12 @@ public UnaryCallSettings.Builder explainSetting return explainSettings; } + /** Returns the builder for the settings used for calls to generateContent. */ + public UnaryCallSettings.Builder + generateContentSettings() { + return generateContentSettings; + } + /** Returns the builder for the settings used for calls to streamGenerateContent. */ public ServerStreamingCallSettings.Builder streamGenerateContentSettings() { @@ -700,6 +806,15 @@ public UnaryCallSettings.Builder getIamPolicySettin return testIamPermissionsSettings; } + /** Returns the endpoint set by the user or the the service's default endpoint. */ + @Override + public String getEndpoint() { + if (super.getEndpoint() != null) { + return super.getEndpoint(); + } + return getDefaultEndpoint(); + } + @Override public PredictionServiceStubSettings build() throws IOException { return new PredictionServiceStubSettings(this); diff --git a/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/MockPredictionServiceImpl.java b/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/MockPredictionServiceImpl.java index 4e05a2e5ef7a..edb08c93a6ec 100644 --- a/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/MockPredictionServiceImpl.java +++ b/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/MockPredictionServiceImpl.java @@ -99,6 +99,27 @@ public void rawPredict(RawPredictRequest request, StreamObserver respo } } + @Override + public void streamRawPredict( + StreamRawPredictRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof HttpBody) { + requests.add(request); + responseObserver.onNext(((HttpBody) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method StreamRawPredict, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + HttpBody.class.getName(), + Exception.class.getName()))); + } + } + @Override public void directPredict( DirectPredictRequest request, StreamObserver responseObserver) { @@ -141,6 +162,80 @@ public void directRawPredict( } } + @Override + public StreamObserver streamDirectPredict( + final StreamObserver responseObserver) { + StreamObserver requestObserver = + new StreamObserver() { + @Override + public void onNext(StreamDirectPredictRequest value) { + requests.add(value); + final Object response = responses.remove(); + if (response instanceof StreamDirectPredictResponse) { + responseObserver.onNext(((StreamDirectPredictResponse) response)); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method StreamDirectPredict, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + StreamDirectPredictResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void onError(Throwable t) { + responseObserver.onError(t); + } + + @Override + public void onCompleted() { + responseObserver.onCompleted(); + } + }; + return requestObserver; + } + + @Override + public StreamObserver streamDirectRawPredict( + final StreamObserver responseObserver) { + StreamObserver requestObserver = + new StreamObserver() { + @Override + public void onNext(StreamDirectRawPredictRequest value) { + requests.add(value); + final Object response = responses.remove(); + if (response instanceof StreamDirectRawPredictResponse) { + responseObserver.onNext(((StreamDirectRawPredictResponse) response)); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method StreamDirectRawPredict, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + StreamDirectRawPredictResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void onError(Throwable t) { + responseObserver.onError(t); + } + + @Override + public void onCompleted() { + responseObserver.onCompleted(); + } + }; + return requestObserver; + } + @Override public StreamObserver streamingPredict( final StreamObserver responseObserver) { @@ -256,6 +351,27 @@ public void explain(ExplainRequest request, StreamObserver resp } } + @Override + public void generateContent( + GenerateContentRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof GenerateContentResponse) { + requests.add(request); + responseObserver.onNext(((GenerateContentResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GenerateContent, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + GenerateContentResponse.class.getName(), + Exception.class.getName()))); + } + } + @Override public void streamGenerateContent( GenerateContentRequest request, StreamObserver responseObserver) { diff --git a/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/PredictionServiceClientHttpJsonTest.java b/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/PredictionServiceClientHttpJsonTest.java index 14229d7109f7..382859a696ca 100644 --- a/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/PredictionServiceClientHttpJsonTest.java +++ b/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/PredictionServiceClientHttpJsonTest.java @@ -300,6 +300,17 @@ public void rawPredictExceptionTest2() throws Exception { } } + @Test + public void streamRawPredictTest() throws Exception {} + + @Test + public void streamRawPredictExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + } + @Test public void directPredictTest() throws Exception { DirectPredictResponse expectedResponse = @@ -417,6 +428,18 @@ public void directRawPredictExceptionTest() throws Exception { } } + @Test + public void streamDirectPredictUnsupportedMethodTest() throws Exception { + // The streamDirectPredict() method is not supported in REST transport. + // This empty test is generated for technical reasons. + } + + @Test + public void streamDirectRawPredictUnsupportedMethodTest() throws Exception { + // The streamDirectRawPredict() method is not supported in REST transport. + // This empty test is generated for technical reasons. + } + @Test public void streamingPredictUnsupportedMethodTest() throws Exception { // The streamingPredict() method is not supported in REST transport. @@ -548,6 +571,54 @@ public void explainExceptionTest2() throws Exception { } } + @Test + public void generateContentTest() throws Exception { + GenerateContentResponse expectedResponse = + GenerateContentResponse.newBuilder() + .addAllCandidates(new ArrayList()) + .setPromptFeedback(GenerateContentResponse.PromptFeedback.newBuilder().build()) + .setUsageMetadata(GenerateContentResponse.UsageMetadata.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String model = "projects/project-1054/locations/location-1054/endpoints/endpoint-1054"; + List contents = new ArrayList<>(); + + GenerateContentResponse actualResponse = client.generateContent(model, contents); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void generateContentExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String model = "projects/project-1054/locations/location-1054/endpoints/endpoint-1054"; + List contents = new ArrayList<>(); + client.generateContent(model, contents); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void streamGenerateContentTest() throws Exception {} diff --git a/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/PredictionServiceClientTest.java b/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/PredictionServiceClientTest.java index d8d23634db72..f61809b6dca1 100644 --- a/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/PredictionServiceClientTest.java +++ b/java-vertexai/google-cloud-vertexai/src/test/java/com/google/cloud/vertexai/api/PredictionServiceClientTest.java @@ -296,6 +296,62 @@ public void rawPredictExceptionTest2() throws Exception { } } + @Test + public void streamRawPredictTest() throws Exception { + HttpBody expectedResponse = + HttpBody.newBuilder() + .setContentType("contentType-389131437") + .setData(ByteString.EMPTY) + .addAllExtensions(new ArrayList()) + .build(); + mockPredictionService.addResponse(expectedResponse); + StreamRawPredictRequest request = + StreamRawPredictRequest.newBuilder() + .setEndpoint( + EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setHttpBody(HttpBody.newBuilder().build()) + .build(); + + MockStreamObserver responseObserver = new MockStreamObserver<>(); + + ServerStreamingCallable callable = + client.streamRawPredictCallable(); + callable.serverStreamingCall(request, responseObserver); + + List actualResponses = responseObserver.future().get(); + Assert.assertEquals(1, actualResponses.size()); + Assert.assertEquals(expectedResponse, actualResponses.get(0)); + } + + @Test + public void streamRawPredictExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPredictionService.addException(exception); + StreamRawPredictRequest request = + StreamRawPredictRequest.newBuilder() + .setEndpoint( + EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setHttpBody(HttpBody.newBuilder().build()) + .build(); + + MockStreamObserver responseObserver = new MockStreamObserver<>(); + + ServerStreamingCallable callable = + client.streamRawPredictCallable(); + callable.serverStreamingCall(request, responseObserver); + + try { + List actualResponses = responseObserver.future().get(); + Assert.fail("No exception thrown"); + } catch (ExecutionException e) { + Assert.assertTrue(e.getCause() instanceof InvalidArgumentException); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + @Test public void directPredictTest() throws Exception { DirectPredictResponse expectedResponse = @@ -405,6 +461,133 @@ public void directRawPredictExceptionTest() throws Exception { } } + @Test + public void streamDirectPredictTest() throws Exception { + StreamDirectPredictResponse expectedResponse = + StreamDirectPredictResponse.newBuilder() + .addAllOutputs(new ArrayList()) + .setParameters(Tensor.newBuilder().build()) + .build(); + mockPredictionService.addResponse(expectedResponse); + StreamDirectPredictRequest request = + StreamDirectPredictRequest.newBuilder() + .setEndpoint( + EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .addAllInputs(new ArrayList()) + .setParameters(Tensor.newBuilder().build()) + .build(); + + MockStreamObserver responseObserver = new MockStreamObserver<>(); + + BidiStreamingCallable callable = + client.streamDirectPredictCallable(); + ApiStreamObserver requestObserver = + callable.bidiStreamingCall(responseObserver); + + requestObserver.onNext(request); + requestObserver.onCompleted(); + + List actualResponses = responseObserver.future().get(); + Assert.assertEquals(1, actualResponses.size()); + Assert.assertEquals(expectedResponse, actualResponses.get(0)); + } + + @Test + public void streamDirectPredictExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPredictionService.addException(exception); + StreamDirectPredictRequest request = + StreamDirectPredictRequest.newBuilder() + .setEndpoint( + EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .addAllInputs(new ArrayList()) + .setParameters(Tensor.newBuilder().build()) + .build(); + + MockStreamObserver responseObserver = new MockStreamObserver<>(); + + BidiStreamingCallable callable = + client.streamDirectPredictCallable(); + ApiStreamObserver requestObserver = + callable.bidiStreamingCall(responseObserver); + + requestObserver.onNext(request); + + try { + List actualResponses = responseObserver.future().get(); + Assert.fail("No exception thrown"); + } catch (ExecutionException e) { + Assert.assertTrue(e.getCause() instanceof InvalidArgumentException); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void streamDirectRawPredictTest() throws Exception { + StreamDirectRawPredictResponse expectedResponse = + StreamDirectRawPredictResponse.newBuilder().setOutput(ByteString.EMPTY).build(); + mockPredictionService.addResponse(expectedResponse); + StreamDirectRawPredictRequest request = + StreamDirectRawPredictRequest.newBuilder() + .setEndpoint( + EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setMethodName("methodName-723163380") + .setInput(ByteString.EMPTY) + .build(); + + MockStreamObserver responseObserver = + new MockStreamObserver<>(); + + BidiStreamingCallable callable = + client.streamDirectRawPredictCallable(); + ApiStreamObserver requestObserver = + callable.bidiStreamingCall(responseObserver); + + requestObserver.onNext(request); + requestObserver.onCompleted(); + + List actualResponses = responseObserver.future().get(); + Assert.assertEquals(1, actualResponses.size()); + Assert.assertEquals(expectedResponse, actualResponses.get(0)); + } + + @Test + public void streamDirectRawPredictExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPredictionService.addException(exception); + StreamDirectRawPredictRequest request = + StreamDirectRawPredictRequest.newBuilder() + .setEndpoint( + EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]") + .toString()) + .setMethodName("methodName-723163380") + .setInput(ByteString.EMPTY) + .build(); + + MockStreamObserver responseObserver = + new MockStreamObserver<>(); + + BidiStreamingCallable callable = + client.streamDirectRawPredictCallable(); + ApiStreamObserver requestObserver = + callable.bidiStreamingCall(responseObserver); + + requestObserver.onNext(request); + + try { + List actualResponses = responseObserver.future().get(); + Assert.fail("No exception thrown"); + } catch (ExecutionException e) { + Assert.assertTrue(e.getCause() instanceof InvalidArgumentException); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + @Test public void streamingPredictTest() throws Exception { StreamingPredictResponse expectedResponse = @@ -689,6 +872,49 @@ public void explainExceptionTest2() throws Exception { } } + @Test + public void generateContentTest() throws Exception { + GenerateContentResponse expectedResponse = + GenerateContentResponse.newBuilder() + .addAllCandidates(new ArrayList()) + .setPromptFeedback(GenerateContentResponse.PromptFeedback.newBuilder().build()) + .setUsageMetadata(GenerateContentResponse.UsageMetadata.newBuilder().build()) + .build(); + mockPredictionService.addResponse(expectedResponse); + + String model = "model104069929"; + List contents = new ArrayList<>(); + + GenerateContentResponse actualResponse = client.generateContent(model, contents); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockPredictionService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GenerateContentRequest actualRequest = ((GenerateContentRequest) actualRequests.get(0)); + + Assert.assertEquals(model, actualRequest.getModel()); + Assert.assertEquals(contents, actualRequest.getContentsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void generateContentExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockPredictionService.addException(exception); + + try { + String model = "model104069929"; + List contents = new ArrayList<>(); + client.generateContent(model, contents); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void streamGenerateContentTest() throws Exception { GenerateContentResponse expectedResponse = diff --git a/java-vertexai/grpc-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PredictionServiceGrpc.java b/java-vertexai/grpc-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PredictionServiceGrpc.java index 287fa136b00f..a9cf1a910b55 100644 --- a/java-vertexai/grpc-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PredictionServiceGrpc.java +++ b/java-vertexai/grpc-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PredictionServiceGrpc.java @@ -121,6 +121,49 @@ private PredictionServiceGrpc() {} return getRawPredictMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.vertexai.api.StreamRawPredictRequest, com.google.api.HttpBody> + getStreamRawPredictMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "StreamRawPredict", + requestType = com.google.cloud.vertexai.api.StreamRawPredictRequest.class, + responseType = com.google.api.HttpBody.class, + methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor< + com.google.cloud.vertexai.api.StreamRawPredictRequest, com.google.api.HttpBody> + getStreamRawPredictMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.vertexai.api.StreamRawPredictRequest, com.google.api.HttpBody> + getStreamRawPredictMethod; + if ((getStreamRawPredictMethod = PredictionServiceGrpc.getStreamRawPredictMethod) == null) { + synchronized (PredictionServiceGrpc.class) { + if ((getStreamRawPredictMethod = PredictionServiceGrpc.getStreamRawPredictMethod) == null) { + PredictionServiceGrpc.getStreamRawPredictMethod = + getStreamRawPredictMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "StreamRawPredict")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vertexai.api.StreamRawPredictRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.api.HttpBody.getDefaultInstance())) + .setSchemaDescriptor( + new PredictionServiceMethodDescriptorSupplier("StreamRawPredict")) + .build(); + } + } + } + return getStreamRawPredictMethod; + } + private static volatile io.grpc.MethodDescriptor< com.google.cloud.vertexai.api.DirectPredictRequest, com.google.cloud.vertexai.api.DirectPredictResponse> @@ -215,6 +258,107 @@ private PredictionServiceGrpc() {} return getDirectRawPredictMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.vertexai.api.StreamDirectPredictRequest, + com.google.cloud.vertexai.api.StreamDirectPredictResponse> + getStreamDirectPredictMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "StreamDirectPredict", + requestType = com.google.cloud.vertexai.api.StreamDirectPredictRequest.class, + responseType = com.google.cloud.vertexai.api.StreamDirectPredictResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) + public static io.grpc.MethodDescriptor< + com.google.cloud.vertexai.api.StreamDirectPredictRequest, + com.google.cloud.vertexai.api.StreamDirectPredictResponse> + getStreamDirectPredictMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.vertexai.api.StreamDirectPredictRequest, + com.google.cloud.vertexai.api.StreamDirectPredictResponse> + getStreamDirectPredictMethod; + if ((getStreamDirectPredictMethod = PredictionServiceGrpc.getStreamDirectPredictMethod) + == null) { + synchronized (PredictionServiceGrpc.class) { + if ((getStreamDirectPredictMethod = PredictionServiceGrpc.getStreamDirectPredictMethod) + == null) { + PredictionServiceGrpc.getStreamDirectPredictMethod = + getStreamDirectPredictMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "StreamDirectPredict")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vertexai.api.StreamDirectPredictRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vertexai.api.StreamDirectPredictResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new PredictionServiceMethodDescriptorSupplier("StreamDirectPredict")) + .build(); + } + } + } + return getStreamDirectPredictMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.vertexai.api.StreamDirectRawPredictRequest, + com.google.cloud.vertexai.api.StreamDirectRawPredictResponse> + getStreamDirectRawPredictMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "StreamDirectRawPredict", + requestType = com.google.cloud.vertexai.api.StreamDirectRawPredictRequest.class, + responseType = com.google.cloud.vertexai.api.StreamDirectRawPredictResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) + public static io.grpc.MethodDescriptor< + com.google.cloud.vertexai.api.StreamDirectRawPredictRequest, + com.google.cloud.vertexai.api.StreamDirectRawPredictResponse> + getStreamDirectRawPredictMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.vertexai.api.StreamDirectRawPredictRequest, + com.google.cloud.vertexai.api.StreamDirectRawPredictResponse> + getStreamDirectRawPredictMethod; + if ((getStreamDirectRawPredictMethod = PredictionServiceGrpc.getStreamDirectRawPredictMethod) + == null) { + synchronized (PredictionServiceGrpc.class) { + if ((getStreamDirectRawPredictMethod = + PredictionServiceGrpc.getStreamDirectRawPredictMethod) + == null) { + PredictionServiceGrpc.getStreamDirectRawPredictMethod = + getStreamDirectRawPredictMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "StreamDirectRawPredict")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vertexai.api.StreamDirectRawPredictRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vertexai.api.StreamDirectRawPredictResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new PredictionServiceMethodDescriptorSupplier("StreamDirectRawPredict")) + .build(); + } + } + } + return getStreamDirectRawPredictMethod; + } + private static volatile io.grpc.MethodDescriptor< com.google.cloud.vertexai.api.StreamingPredictRequest, com.google.cloud.vertexai.api.StreamingPredictResponse> @@ -407,6 +551,53 @@ private PredictionServiceGrpc() {} return getExplainMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.vertexai.api.GenerateContentRequest, + com.google.cloud.vertexai.api.GenerateContentResponse> + getGenerateContentMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GenerateContent", + requestType = com.google.cloud.vertexai.api.GenerateContentRequest.class, + responseType = com.google.cloud.vertexai.api.GenerateContentResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.vertexai.api.GenerateContentRequest, + com.google.cloud.vertexai.api.GenerateContentResponse> + getGenerateContentMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.vertexai.api.GenerateContentRequest, + com.google.cloud.vertexai.api.GenerateContentResponse> + getGenerateContentMethod; + if ((getGenerateContentMethod = PredictionServiceGrpc.getGenerateContentMethod) == null) { + synchronized (PredictionServiceGrpc.class) { + if ((getGenerateContentMethod = PredictionServiceGrpc.getGenerateContentMethod) == null) { + PredictionServiceGrpc.getGenerateContentMethod = + getGenerateContentMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GenerateContent")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vertexai.api.GenerateContentRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.vertexai.api.GenerateContentResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new PredictionServiceMethodDescriptorSupplier("GenerateContent")) + .build(); + } + } + } + return getGenerateContentMethod; + } + private static volatile io.grpc.MethodDescriptor< com.google.cloud.vertexai.api.GenerateContentRequest, com.google.cloud.vertexai.api.GenerateContentResponse> @@ -545,8 +736,22 @@ default void rawPredict( * * *
-     * 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.vertexai.api.StreamRawPredictRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getStreamRawPredictMethod(), responseObserver); + } + + /** + * + * + *
+     * Perform an unary online prediction request to a gRPC model server for
+     * Vertex first-party products and frameworks.
      * 
*/ default void directPredict( @@ -561,7 +766,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( @@ -572,6 +778,39 @@ 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 + streamDirectPredict( + io.grpc.stub.StreamObserver + 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 + streamDirectRawPredict( + io.grpc.stub.StreamObserver< + com.google.cloud.vertexai.api.StreamDirectRawPredictResponse> + responseObserver) { + return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall( + getStreamDirectRawPredictMethod(), responseObserver); + } + /** * * @@ -642,6 +881,21 @@ default void explain( io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getExplainMethod(), responseObserver); } + /** + * + * + *
+     * Generate content with multimodal inputs.
+     * 
+ */ + default void generateContent( + com.google.cloud.vertexai.api.GenerateContentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGenerateContentMethod(), responseObserver); + } + /** * * @@ -733,8 +987,24 @@ public void rawPredict( * * *
-     * 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.vertexai.api.StreamRawPredictRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncServerStreamingCall( + getChannel().newCall(getStreamRawPredictMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Perform an unary online prediction request to a gRPC model server for
+     * Vertex first-party products and frameworks.
      * 
*/ public void directPredict( @@ -751,7 +1021,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( @@ -764,6 +1035,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 + streamDirectPredict( + io.grpc.stub.StreamObserver + 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 + streamDirectRawPredict( + io.grpc.stub.StreamObserver< + com.google.cloud.vertexai.api.StreamDirectRawPredictResponse> + responseObserver) { + return io.grpc.stub.ClientCalls.asyncBidiStreamingCall( + getChannel().newCall(getStreamDirectRawPredictMethod(), getCallOptions()), + responseObserver); + } + /** * * @@ -837,6 +1142,23 @@ public void explain( getChannel().newCall(getExplainMethod(), getCallOptions()), request, responseObserver); } + /** + * + * + *
+     * Generate content with multimodal inputs.
+     * 
+ */ + public void generateContent( + com.google.cloud.vertexai.api.GenerateContentRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGenerateContentMethod(), getCallOptions()), + request, + responseObserver); + } + /** * * @@ -912,8 +1234,21 @@ public com.google.api.HttpBody rawPredict( * * *
-     * 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 streamRawPredict( + com.google.cloud.vertexai.api.StreamRawPredictRequest request) { + return io.grpc.stub.ClientCalls.blockingServerStreamingCall( + getChannel(), getStreamRawPredictMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Perform an unary online prediction request to a gRPC model server for
+     * Vertex first-party products and frameworks.
      * 
*/ public com.google.cloud.vertexai.api.DirectPredictResponse directPredict( @@ -926,7 +1261,8 @@ public com.google.cloud.vertexai.api.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.vertexai.api.DirectRawPredictResponse directRawPredict( @@ -971,6 +1307,19 @@ public com.google.cloud.vertexai.api.ExplainResponse explain( getChannel(), getExplainMethod(), getCallOptions(), request); } + /** + * + * + *
+     * Generate content with multimodal inputs.
+     * 
+ */ + public com.google.cloud.vertexai.api.GenerateContentResponse generateContent( + com.google.cloud.vertexai.api.GenerateContentRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGenerateContentMethod(), getCallOptions(), request); + } + /** * * @@ -1042,8 +1391,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. * */ public com.google.common.util.concurrent.ListenableFuture< @@ -1057,7 +1406,8 @@ public com.google.common.util.concurrent.ListenableFuture - * Perform an online prediction request through gRPC. + * Perform an unary online prediction request to a gRPC model server for + * custom containers. * */ public com.google.common.util.concurrent.ListenableFuture< @@ -1089,17 +1439,35 @@ public com.google.common.util.concurrent.ListenableFuture + * Generate content with multimodal inputs. + * + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.vertexai.api.GenerateContentResponse> + generateContent(com.google.cloud.vertexai.api.GenerateContentRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGenerateContentMethod(), getCallOptions()), request); + } } private static final int METHODID_PREDICT = 0; private static final int METHODID_RAW_PREDICT = 1; - private static final int METHODID_DIRECT_PREDICT = 2; - private static final int METHODID_DIRECT_RAW_PREDICT = 3; - private static final int METHODID_SERVER_STREAMING_PREDICT = 4; - private static final int METHODID_EXPLAIN = 5; - private static final int METHODID_STREAM_GENERATE_CONTENT = 6; - private static final int METHODID_STREAMING_PREDICT = 7; - private static final int METHODID_STREAMING_RAW_PREDICT = 8; + private static final int METHODID_STREAM_RAW_PREDICT = 2; + private static final int METHODID_DIRECT_PREDICT = 3; + private static final int METHODID_DIRECT_RAW_PREDICT = 4; + private static final int METHODID_SERVER_STREAMING_PREDICT = 5; + private static final int METHODID_EXPLAIN = 6; + private static final int METHODID_GENERATE_CONTENT = 7; + private static final int METHODID_STREAM_GENERATE_CONTENT = 8; + private static final int METHODID_STREAM_DIRECT_PREDICT = 9; + private static final int METHODID_STREAM_DIRECT_RAW_PREDICT = 10; + private static final int METHODID_STREAMING_PREDICT = 11; + private static final int METHODID_STREAMING_RAW_PREDICT = 12; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -1129,6 +1497,11 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.cloud.vertexai.api.RawPredictRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_STREAM_RAW_PREDICT: + serviceImpl.streamRawPredict( + (com.google.cloud.vertexai.api.StreamRawPredictRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; case METHODID_DIRECT_PREDICT: serviceImpl.directPredict( (com.google.cloud.vertexai.api.DirectPredictRequest) request, @@ -1153,6 +1526,12 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_GENERATE_CONTENT: + serviceImpl.generateContent( + (com.google.cloud.vertexai.api.GenerateContentRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; case METHODID_STREAM_GENERATE_CONTENT: serviceImpl.streamGenerateContent( (com.google.cloud.vertexai.api.GenerateContentRequest) request, @@ -1169,6 +1548,18 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv public io.grpc.stub.StreamObserver invoke( io.grpc.stub.StreamObserver responseObserver) { switch (methodId) { + case METHODID_STREAM_DIRECT_PREDICT: + return (io.grpc.stub.StreamObserver) + serviceImpl.streamDirectPredict( + (io.grpc.stub.StreamObserver< + com.google.cloud.vertexai.api.StreamDirectPredictResponse>) + responseObserver); + case METHODID_STREAM_DIRECT_RAW_PREDICT: + return (io.grpc.stub.StreamObserver) + serviceImpl.streamDirectRawPredict( + (io.grpc.stub.StreamObserver< + com.google.cloud.vertexai.api.StreamDirectRawPredictResponse>) + responseObserver); case METHODID_STREAMING_PREDICT: return (io.grpc.stub.StreamObserver) serviceImpl.streamingPredict( @@ -1201,6 +1592,12 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser new MethodHandlers< com.google.cloud.vertexai.api.RawPredictRequest, com.google.api.HttpBody>( service, METHODID_RAW_PREDICT))) + .addMethod( + getStreamRawPredictMethod(), + io.grpc.stub.ServerCalls.asyncServerStreamingCall( + new MethodHandlers< + com.google.cloud.vertexai.api.StreamRawPredictRequest, com.google.api.HttpBody>( + service, METHODID_STREAM_RAW_PREDICT))) .addMethod( getDirectPredictMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -1215,6 +1612,20 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser com.google.cloud.vertexai.api.DirectRawPredictRequest, com.google.cloud.vertexai.api.DirectRawPredictResponse>( service, METHODID_DIRECT_RAW_PREDICT))) + .addMethod( + getStreamDirectPredictMethod(), + io.grpc.stub.ServerCalls.asyncBidiStreamingCall( + new MethodHandlers< + com.google.cloud.vertexai.api.StreamDirectPredictRequest, + com.google.cloud.vertexai.api.StreamDirectPredictResponse>( + service, METHODID_STREAM_DIRECT_PREDICT))) + .addMethod( + getStreamDirectRawPredictMethod(), + io.grpc.stub.ServerCalls.asyncBidiStreamingCall( + new MethodHandlers< + com.google.cloud.vertexai.api.StreamDirectRawPredictRequest, + com.google.cloud.vertexai.api.StreamDirectRawPredictResponse>( + service, METHODID_STREAM_DIRECT_RAW_PREDICT))) .addMethod( getStreamingPredictMethod(), io.grpc.stub.ServerCalls.asyncBidiStreamingCall( @@ -1242,6 +1653,13 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser new MethodHandlers< com.google.cloud.vertexai.api.ExplainRequest, com.google.cloud.vertexai.api.ExplainResponse>(service, METHODID_EXPLAIN))) + .addMethod( + getGenerateContentMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.vertexai.api.GenerateContentRequest, + com.google.cloud.vertexai.api.GenerateContentResponse>( + service, METHODID_GENERATE_CONTENT))) .addMethod( getStreamGenerateContentMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall( @@ -1302,12 +1720,16 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .setSchemaDescriptor(new PredictionServiceFileDescriptorSupplier()) .addMethod(getPredictMethod()) .addMethod(getRawPredictMethod()) + .addMethod(getStreamRawPredictMethod()) .addMethod(getDirectPredictMethod()) .addMethod(getDirectRawPredictMethod()) + .addMethod(getStreamDirectPredictMethod()) + .addMethod(getStreamDirectRawPredictMethod()) .addMethod(getStreamingPredictMethod()) .addMethod(getServerStreamingPredictMethod()) .addMethod(getStreamingRawPredictMethod()) .addMethod(getExplainMethod()) + .addMethod(getGenerateContentMethod()) .addMethod(getStreamGenerateContentMethod()) .build(); } diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AcceleratorType.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AcceleratorType.java index 69e1a5e37f65..4d12b5e98384 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AcceleratorType.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AcceleratorType.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/accelerator_type.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AcceleratorTypeProto.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AcceleratorTypeProto.java index 70f514546888..44fba78cb9e3 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AcceleratorTypeProto.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AcceleratorTypeProto.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/accelerator_type.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public final class AcceleratorTypeProto { diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Attribution.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Attribution.java index 56034140d3db..b953e86566af 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Attribution.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Attribution.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/explanation.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** @@ -64,6 +65,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.vertexai.api.Attribution.Builder.class); } + private int bitField0_; public static final int BASELINE_OUTPUT_VALUE_FIELD_NUMBER = 1; private double baselineOutputValue_ = 0D; /** @@ -165,7 +167,7 @@ public double getInstanceOutputValue() { */ @java.lang.Override public boolean hasFeatureAttributions() { - return featureAttributions_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** * @@ -269,7 +271,7 @@ public com.google.protobuf.ValueOrBuilder getFeatureAttributionsOrBuilder() { public static final int OUTPUT_INDEX_FIELD_NUMBER = 4; @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList outputIndex_; + private com.google.protobuf.Internal.IntList outputIndex_ = emptyIntList(); /** * * @@ -514,7 +516,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (java.lang.Double.doubleToRawLongBits(instanceOutputValue_) != 0) { output.writeDouble(2, instanceOutputValue_); } - if (featureAttributions_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(3, getFeatureAttributions()); } if (getOutputIndexList().size() > 0) { @@ -548,7 +550,7 @@ public int getSerializedSize() { if (java.lang.Double.doubleToRawLongBits(instanceOutputValue_) != 0) { size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, instanceOutputValue_); } - if (featureAttributions_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getFeatureAttributions()); } { @@ -769,10 +771,19 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.vertexai.api.Attribution.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getFeatureAttributionsFieldBuilder(); + } } @java.lang.Override @@ -817,7 +828,6 @@ public com.google.cloud.vertexai.api.Attribution build() { public com.google.cloud.vertexai.api.Attribution buildPartial() { com.google.cloud.vertexai.api.Attribution result = new com.google.cloud.vertexai.api.Attribution(this); - buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } @@ -825,14 +835,6 @@ public com.google.cloud.vertexai.api.Attribution buildPartial() { return result; } - private void buildPartialRepeatedFields(com.google.cloud.vertexai.api.Attribution result) { - if (((bitField0_ & 0x00000008) != 0)) { - outputIndex_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.outputIndex_ = outputIndex_; - } - private void buildPartial0(com.google.cloud.vertexai.api.Attribution result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { @@ -841,11 +843,17 @@ private void buildPartial0(com.google.cloud.vertexai.api.Attribution result) { if (((from_bitField0_ & 0x00000002) != 0)) { result.instanceOutputValue_ = instanceOutputValue_; } + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000004) != 0)) { result.featureAttributions_ = featureAttributionsBuilder_ == null ? featureAttributions_ : featureAttributionsBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + outputIndex_.makeImmutable(); + result.outputIndex_ = outputIndex_; } if (((from_bitField0_ & 0x00000010) != 0)) { result.outputDisplayName_ = outputDisplayName_; @@ -856,6 +864,7 @@ private void buildPartial0(com.google.cloud.vertexai.api.Attribution result) { if (((from_bitField0_ & 0x00000040) != 0)) { result.outputName_ = outputName_; } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -915,7 +924,8 @@ public Builder mergeFrom(com.google.cloud.vertexai.api.Attribution other) { if (!other.outputIndex_.isEmpty()) { if (outputIndex_.isEmpty()) { outputIndex_ = other.outputIndex_; - bitField0_ = (bitField0_ & ~0x00000008); + outputIndex_.makeImmutable(); + bitField0_ |= 0x00000008; } else { ensureOutputIndexIsMutable(); outputIndex_.addAll(other.outputIndex_); @@ -1459,8 +1469,10 @@ public Builder mergeFeatureAttributions(com.google.protobuf.Value value) { } else { featureAttributionsBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000004; - onChanged(); + if (featureAttributions_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } return this; } /** @@ -1675,10 +1687,10 @@ public com.google.protobuf.ValueOrBuilder getFeatureAttributionsOrBuilder() { private com.google.protobuf.Internal.IntList outputIndex_ = emptyIntList(); private void ensureOutputIndexIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - outputIndex_ = mutableCopy(outputIndex_); - bitField0_ |= 0x00000008; + if (!outputIndex_.isModifiable()) { + outputIndex_ = makeMutableCopy(outputIndex_); } + bitField0_ |= 0x00000008; } /** * @@ -1698,9 +1710,8 @@ private void ensureOutputIndexIsMutable() { * @return A list containing the outputIndex. */ public java.util.List getOutputIndexList() { - return ((bitField0_ & 0x00000008) != 0) - ? java.util.Collections.unmodifiableList(outputIndex_) - : outputIndex_; + outputIndex_.makeImmutable(); + return outputIndex_; } /** * @@ -1766,6 +1777,7 @@ public Builder setOutputIndex(int index, int value) { ensureOutputIndexIsMutable(); outputIndex_.setInt(index, value); + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -1791,6 +1803,7 @@ public Builder addOutputIndex(int value) { ensureOutputIndexIsMutable(); outputIndex_.addInt(value); + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -1815,6 +1828,7 @@ public Builder addOutputIndex(int value) { public Builder addAllOutputIndex(java.lang.Iterable values) { ensureOutputIndexIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, outputIndex_); + bitField0_ |= 0x00000008; onChanged(); return this; } diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AttributionOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AttributionOrBuilder.java index ef7fcad8771d..f278306821e4 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AttributionOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AttributionOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/explanation.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface AttributionOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AutomaticResources.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AutomaticResources.java index 50c27c7595b5..23d6d5dba55c 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AutomaticResources.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AutomaticResources.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/machine_resources.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AutomaticResourcesOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AutomaticResourcesOrBuilder.java index 4487d092103b..e482ddb61f64 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AutomaticResourcesOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AutomaticResourcesOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/machine_resources.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface AutomaticResourcesOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AutoscalingMetricSpec.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AutoscalingMetricSpec.java index 7f448c348900..5c4c82a4cdcf 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AutoscalingMetricSpec.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AutoscalingMetricSpec.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/machine_resources.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AutoscalingMetricSpecOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AutoscalingMetricSpecOrBuilder.java index 6b6881f02abb..18e97cd2d6fa 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AutoscalingMetricSpecOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AutoscalingMetricSpecOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/machine_resources.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface AutoscalingMetricSpecOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AvroSource.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AvroSource.java index 934aa562474f..4e599fa8018c 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AvroSource.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AvroSource.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/io.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** @@ -60,6 +61,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.vertexai.api.AvroSource.Builder.class); } + private int bitField0_; public static final int GCS_SOURCE_FIELD_NUMBER = 1; private com.google.cloud.vertexai.api.GcsSource gcsSource_; /** @@ -77,7 +79,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { */ @java.lang.Override public boolean hasGcsSource() { - return gcsSource_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** * @@ -130,7 +132,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (gcsSource_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(1, getGcsSource()); } getUnknownFields().writeTo(output); @@ -142,7 +144,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (gcsSource_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getGcsSource()); } size += getUnknownFields().getSerializedSize(); @@ -308,10 +310,19 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.vertexai.api.AvroSource.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getGcsSourceFieldBuilder(); + } } @java.lang.Override @@ -359,9 +370,12 @@ public com.google.cloud.vertexai.api.AvroSource buildPartial() { private void buildPartial0(com.google.cloud.vertexai.api.AvroSource result) { int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.gcsSource_ = gcsSourceBuilder_ == null ? gcsSource_ : gcsSourceBuilder_.build(); + to_bitField0_ |= 0x00000001; } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -575,8 +589,10 @@ public Builder mergeGcsSource(com.google.cloud.vertexai.api.GcsSource value) { } else { gcsSourceBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000001; - onChanged(); + if (gcsSource_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } return this; } /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AvroSourceOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AvroSourceOrBuilder.java index 6cefabd24b80..307a24739715 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AvroSourceOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/AvroSourceOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/io.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface AvroSourceOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BatchDedicatedResources.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BatchDedicatedResources.java index 8a57044d40bb..92298e4d78a5 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BatchDedicatedResources.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BatchDedicatedResources.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/machine_resources.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** @@ -61,6 +62,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.vertexai.api.BatchDedicatedResources.Builder.class); } + private int bitField0_; public static final int MACHINE_SPEC_FIELD_NUMBER = 1; private com.google.cloud.vertexai.api.MachineSpec machineSpec_; /** @@ -78,7 +80,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { */ @java.lang.Override public boolean hasMachineSpec() { - return machineSpec_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** * @@ -170,7 +172,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (machineSpec_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(1, getMachineSpec()); } if (startingReplicaCount_ != 0) { @@ -188,7 +190,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (machineSpec_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getMachineSpec()); } if (startingReplicaCount_ != 0) { @@ -369,10 +371,19 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.vertexai.api.BatchDedicatedResources.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getMachineSpecFieldBuilder(); + } } @java.lang.Override @@ -422,9 +433,11 @@ public com.google.cloud.vertexai.api.BatchDedicatedResources buildPartial() { private void buildPartial0(com.google.cloud.vertexai.api.BatchDedicatedResources result) { int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.machineSpec_ = machineSpecBuilder_ == null ? machineSpec_ : machineSpecBuilder_.build(); + to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000002) != 0)) { result.startingReplicaCount_ = startingReplicaCount_; @@ -432,6 +445,7 @@ private void buildPartial0(com.google.cloud.vertexai.api.BatchDedicatedResources if (((from_bitField0_ & 0x00000004) != 0)) { result.maxReplicaCount_ = maxReplicaCount_; } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -665,8 +679,10 @@ public Builder mergeMachineSpec(com.google.cloud.vertexai.api.MachineSpec value) } else { machineSpecBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000001; - onChanged(); + if (machineSpec_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } return this; } /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BatchDedicatedResourcesOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BatchDedicatedResourcesOrBuilder.java index 0bba13d62ae8..b0daf5d9e621 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BatchDedicatedResourcesOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BatchDedicatedResourcesOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/machine_resources.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface BatchDedicatedResourcesOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BigQueryDestination.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BigQueryDestination.java index 1c6fff4f63ff..79c78ebf6228 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BigQueryDestination.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BigQueryDestination.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/io.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BigQueryDestinationOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BigQueryDestinationOrBuilder.java index 8ed80e412245..485a43a016ff 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BigQueryDestinationOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BigQueryDestinationOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/io.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface BigQueryDestinationOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BigQuerySource.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BigQuerySource.java index 809eb4226598..e71b63bc6528 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BigQuerySource.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BigQuerySource.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/io.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BigQuerySourceOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BigQuerySourceOrBuilder.java index 4aa86f8121bb..2f456871f84d 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BigQuerySourceOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BigQuerySourceOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/io.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface BigQuerySourceOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Blob.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Blob.java index d8ef6b2ccb18..e785d5225c95 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Blob.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Blob.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/content.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BlobOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BlobOrBuilder.java index e6b4734fa643..41018c9cc9fb 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BlobOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BlobOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/content.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface BlobOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BlurBaselineConfig.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BlurBaselineConfig.java index db58205b6e0b..4ef4a5966c3f 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BlurBaselineConfig.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BlurBaselineConfig.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/explanation.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BlurBaselineConfigOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BlurBaselineConfigOrBuilder.java index 7e07bff95fec..3221a861599f 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BlurBaselineConfigOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BlurBaselineConfigOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/explanation.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface BlurBaselineConfigOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BoolArray.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BoolArray.java index e8684c9a4271..d2c59c0438cd 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BoolArray.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BoolArray.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/types.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** @@ -65,7 +66,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public static final int VALUES_FIELD_NUMBER = 1; @SuppressWarnings("serial") - private com.google.protobuf.Internal.BooleanList values_; + private com.google.protobuf.Internal.BooleanList values_ = emptyBooleanList(); /** * * @@ -352,7 +353,6 @@ public com.google.cloud.vertexai.api.BoolArray build() { public com.google.cloud.vertexai.api.BoolArray buildPartial() { com.google.cloud.vertexai.api.BoolArray result = new com.google.cloud.vertexai.api.BoolArray(this); - buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } @@ -360,16 +360,12 @@ public com.google.cloud.vertexai.api.BoolArray buildPartial() { return result; } - private void buildPartialRepeatedFields(com.google.cloud.vertexai.api.BoolArray result) { - if (((bitField0_ & 0x00000001) != 0)) { - values_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.values_ = values_; - } - private void buildPartial0(com.google.cloud.vertexai.api.BoolArray result) { int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + values_.makeImmutable(); + result.values_ = values_; + } } @java.lang.Override @@ -420,7 +416,8 @@ public Builder mergeFrom(com.google.cloud.vertexai.api.BoolArray other) { if (!other.values_.isEmpty()) { if (values_.isEmpty()) { values_ = other.values_; - bitField0_ = (bitField0_ & ~0x00000001); + values_.makeImmutable(); + bitField0_ |= 0x00000001; } else { ensureValuesIsMutable(); values_.addAll(other.values_); @@ -464,7 +461,8 @@ public Builder mergeFrom( { int length = input.readRawVarint32(); int limit = input.pushLimit(length); - ensureValuesIsMutable(); + int alloc = length > 4096 ? 4096 : length; + ensureValuesIsMutable(alloc / 1); while (input.getBytesUntilLimit() > 0) { values_.addBoolean(input.readBool()); } @@ -493,10 +491,17 @@ public Builder mergeFrom( private com.google.protobuf.Internal.BooleanList values_ = emptyBooleanList(); private void ensureValuesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - values_ = mutableCopy(values_); - bitField0_ |= 0x00000001; + if (!values_.isModifiable()) { + values_ = makeMutableCopy(values_); + } + bitField0_ |= 0x00000001; + } + + private void ensureValuesIsMutable(int capacity) { + if (!values_.isModifiable()) { + values_ = makeMutableCopy(values_, capacity); } + bitField0_ |= 0x00000001; } /** * @@ -510,9 +515,8 @@ private void ensureValuesIsMutable() { * @return A list containing the values. */ public java.util.List getValuesList() { - return ((bitField0_ & 0x00000001) != 0) - ? java.util.Collections.unmodifiableList(values_) - : values_; + values_.makeImmutable(); + return values_; } /** * @@ -560,6 +564,7 @@ public Builder setValues(int index, boolean value) { ensureValuesIsMutable(); values_.setBoolean(index, value); + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -579,6 +584,7 @@ public Builder addValues(boolean value) { ensureValuesIsMutable(); values_.addBoolean(value); + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -597,6 +603,7 @@ public Builder addValues(boolean value) { public Builder addAllValues(java.lang.Iterable values) { ensureValuesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, values_); + bitField0_ |= 0x00000001; onChanged(); return this; } diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BoolArrayOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BoolArrayOrBuilder.java index 7a117780b7d1..5b738e14ecb7 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BoolArrayOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/BoolArrayOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/types.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface BoolArrayOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Candidate.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Candidate.java index 1997ed815dec..acbe96592eb9 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Candidate.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Candidate.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/content.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** @@ -330,7 +331,7 @@ public int getIndex() { */ @java.lang.Override public boolean hasContent() { - return content_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** * @@ -517,7 +518,7 @@ public com.google.cloud.vertexai.api.SafetyRatingOrBuilder getSafetyRatingsOrBui */ @java.lang.Override public boolean hasFinishMessage() { - return ((bitField0_ & 0x00000001) != 0); + return ((bitField0_ & 0x00000002) != 0); } /** * @@ -585,7 +586,7 @@ public com.google.protobuf.ByteString getFinishMessageBytes() { */ @java.lang.Override public boolean hasCitationMetadata() { - return citationMetadata_ != null; + return ((bitField0_ & 0x00000004) != 0); } /** * @@ -641,7 +642,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (index_ != 0) { output.writeInt32(1, index_); } - if (content_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getContent()); } if (finishReason_ @@ -652,10 +653,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < safetyRatings_.size(); i++) { output.writeMessage(4, safetyRatings_.get(i)); } - if (((bitField0_ & 0x00000001) != 0)) { + if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, finishMessage_); } - if (citationMetadata_ != null) { + if (((bitField0_ & 0x00000004) != 0)) { output.writeMessage(6, getCitationMetadata()); } getUnknownFields().writeTo(output); @@ -670,7 +671,7 @@ public int getSerializedSize() { if (index_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, index_); } - if (content_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getContent()); } if (finishReason_ @@ -681,10 +682,10 @@ public int getSerializedSize() { for (int i = 0; i < safetyRatings_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, safetyRatings_.get(i)); } - if (((bitField0_ & 0x00000001) != 0)) { + if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, finishMessage_); } - if (citationMetadata_ != null) { + if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getCitationMetadata()); } size += getUnknownFields().getSerializedSize(); @@ -877,10 +878,21 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.vertexai.api.Candidate.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getContentFieldBuilder(); + getSafetyRatingsFieldBuilder(); + getCitationMetadataFieldBuilder(); + } } @java.lang.Override @@ -959,20 +971,22 @@ private void buildPartial0(com.google.cloud.vertexai.api.Candidate result) { if (((from_bitField0_ & 0x00000001) != 0)) { result.index_ = index_; } + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000002) != 0)) { result.content_ = contentBuilder_ == null ? content_ : contentBuilder_.build(); + to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000004) != 0)) { result.finishReason_ = finishReason_; } - int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000010) != 0)) { result.finishMessage_ = finishMessage_; - to_bitField0_ |= 0x00000001; + to_bitField0_ |= 0x00000002; } if (((from_bitField0_ & 0x00000020) != 0)) { result.citationMetadata_ = citationMetadataBuilder_ == null ? citationMetadata_ : citationMetadataBuilder_.build(); + to_bitField0_ |= 0x00000004; } result.bitField0_ |= to_bitField0_; } @@ -1320,8 +1334,10 @@ public Builder mergeContent(com.google.cloud.vertexai.api.Content value) { } else { contentBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000002; - onChanged(); + if (content_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } return this; } /** @@ -2183,8 +2199,10 @@ public Builder mergeCitationMetadata(com.google.cloud.vertexai.api.CitationMetad } else { citationMetadataBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000020; - onChanged(); + if (citationMetadata_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } return this; } /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CandidateOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CandidateOrBuilder.java index 7e241d7b0882..8802ce27924b 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CandidateOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CandidateOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/content.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface CandidateOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Citation.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Citation.java index 4d8a5a85905e..4c2e6b727ecf 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Citation.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Citation.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/content.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** @@ -64,6 +65,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.vertexai.api.Citation.Builder.class); } + private int bitField0_; public static final int START_INDEX_FIELD_NUMBER = 1; private int startIndex_ = 0; /** @@ -269,7 +271,7 @@ public com.google.protobuf.ByteString getLicenseBytes() { */ @java.lang.Override public boolean hasPublicationDate() { - return publicationDate_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** * @@ -331,7 +333,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(license_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, license_); } - if (publicationDate_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(6, getPublicationDate()); } getUnknownFields().writeTo(output); @@ -358,7 +360,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(license_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, license_); } - if (publicationDate_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getPublicationDate()); } size += getUnknownFields().getSerializedSize(); @@ -539,10 +541,19 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.vertexai.api.Citation.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPublicationDateFieldBuilder(); + } } @java.lang.Override @@ -610,10 +621,13 @@ private void buildPartial0(com.google.cloud.vertexai.api.Citation result) { if (((from_bitField0_ & 0x00000010) != 0)) { result.license_ = license_; } + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000020) != 0)) { result.publicationDate_ = publicationDateBuilder_ == null ? publicationDate_ : publicationDateBuilder_.build(); + to_bitField0_ |= 0x00000001; } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -1295,8 +1309,10 @@ public Builder mergePublicationDate(com.google.type.Date value) { } else { publicationDateBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000020; - onChanged(); + if (publicationDate_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } return this; } /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CitationMetadata.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CitationMetadata.java index fa6977fa3459..d8ed98f4596f 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CitationMetadata.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CitationMetadata.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/content.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CitationMetadataOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CitationMetadataOrBuilder.java index dca68bb0629a..105ee8d4cf11 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CitationMetadataOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CitationMetadataOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/content.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface CitationMetadataOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CitationOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CitationOrBuilder.java index f0a0cf4a925b..7ae3250eb39a 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CitationOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CitationOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/content.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface CitationOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ComputeTokensRequest.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ComputeTokensRequest.java index 741ad0b146a3..d6113490c403 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ComputeTokensRequest.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ComputeTokensRequest.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/llm_utility_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ComputeTokensRequestOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ComputeTokensRequestOrBuilder.java index 71911024aa96..fa4da574a8c0 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ComputeTokensRequestOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ComputeTokensRequestOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/llm_utility_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface ComputeTokensRequestOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ComputeTokensResponse.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ComputeTokensResponse.java index 7c7146186a20..935173670fd7 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ComputeTokensResponse.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ComputeTokensResponse.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/llm_utility_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ComputeTokensResponseOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ComputeTokensResponseOrBuilder.java index dcbd19bdb234..7c4c576b2691 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ComputeTokensResponseOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ComputeTokensResponseOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/llm_utility_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface ComputeTokensResponseOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ContainerRegistryDestination.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ContainerRegistryDestination.java index d9719970b5cb..d5afb0ec906f 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ContainerRegistryDestination.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ContainerRegistryDestination.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/io.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ContainerRegistryDestinationOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ContainerRegistryDestinationOrBuilder.java index 395a51ab020d..5aca9c4321e7 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ContainerRegistryDestinationOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ContainerRegistryDestinationOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/io.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface ContainerRegistryDestinationOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Content.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Content.java index af28a44fdf41..92c224024109 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Content.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Content.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/content.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ContentOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ContentOrBuilder.java index 02653fac0724..987108a302f4 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ContentOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ContentOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/content.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface ContentOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ContentProto.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ContentProto.java index 9f7008373145..98d9039f181e 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ContentProto.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ContentProto.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/content.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public final class ContentProto { @@ -84,76 +85,75 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\022\030google.cloud.vertexai.v1\032\037google/api/f" + "ield_behavior.proto\032#google/cloud/vertex" + "ai/v1/tool.proto\032\036google/protobuf/durati" - + "on.proto\032\026google/type/date.proto\"R\n\007Cont" - + "ent\022\022\n\004role\030\001 \001(\tB\004\342A\001\001\0223\n\005parts\030\002 \003(\0132\036" - + ".google.cloud.vertexai.v1.PartB\004\342A\001\002\"\213\003\n" - + "\004Part\022\024\n\004text\030\001 \001(\tB\004\342A\001\001H\000\022;\n\013inline_da" - + "ta\030\002 \001(\0132\036.google.cloud.vertexai.v1.Blob" - + "B\004\342A\001\001H\000\022=\n\tfile_data\030\003 \001(\0132\".google.clo" - + "ud.vertexai.v1.FileDataB\004\342A\001\001H\000\022E\n\rfunct" - + "ion_call\030\005 \001(\0132&.google.cloud.vertexai.v" - + "1.FunctionCallB\004\342A\001\001H\000\022M\n\021function_respo" - + "nse\030\006 \001(\0132*.google.cloud.vertexai.v1.Fun" - + "ctionResponseB\004\342A\001\001H\000\022G\n\016video_metadata\030" - + "\004 \001(\0132\'.google.cloud.vertexai.v1.VideoMe" - + "tadataB\004\342A\001\001H\001B\006\n\004dataB\n\n\010metadata\"3\n\004Bl" - + "ob\022\027\n\tmime_type\030\001 \001(\tB\004\342A\001\002\022\022\n\004data\030\002 \001(" - + "\014B\004\342A\001\002\";\n\010FileData\022\027\n\tmime_type\030\001 \001(\tB\004" - + "\342A\001\002\022\026\n\010file_uri\030\002 \001(\tB\004\342A\001\002\"{\n\rVideoMet" - + "adata\0225\n\014start_offset\030\001 \001(\0132\031.google.pro" - + "tobuf.DurationB\004\342A\001\001\0223\n\nend_offset\030\002 \001(\013" - + "2\031.google.protobuf.DurationB\004\342A\001\001\"\234\002\n\020Ge" - + "nerationConfig\022\036\n\013temperature\030\001 \001(\002B\004\342A\001" - + "\001H\000\210\001\001\022\030\n\005top_p\030\002 \001(\002B\004\342A\001\001H\001\210\001\001\022\030\n\005top_" - + "k\030\003 \001(\002B\004\342A\001\001H\002\210\001\001\022\"\n\017candidate_count\030\004 " - + "\001(\005B\004\342A\001\001H\003\210\001\001\022$\n\021max_output_tokens\030\005 \001(" - + "\005B\004\342A\001\001H\004\210\001\001\022\034\n\016stop_sequences\030\006 \003(\tB\004\342A" - + "\001\001B\016\n\014_temperatureB\010\n\006_top_pB\010\n\006_top_kB\022" - + "\n\020_candidate_countB\024\n\022_max_output_tokens" - + "\"\273\002\n\rSafetySetting\022>\n\010category\030\001 \001(\0162&.g" - + "oogle.cloud.vertexai.v1.HarmCategoryB\004\342A" - + "\001\002\022S\n\tthreshold\030\002 \001(\0162:.google.cloud.ver" - + "texai.v1.SafetySetting.HarmBlockThreshol" - + "dB\004\342A\001\002\"\224\001\n\022HarmBlockThreshold\022$\n HARM_B" - + "LOCK_THRESHOLD_UNSPECIFIED\020\000\022\027\n\023BLOCK_LO" - + "W_AND_ABOVE\020\001\022\032\n\026BLOCK_MEDIUM_AND_ABOVE\020" - + "\002\022\023\n\017BLOCK_ONLY_HIGH\020\003\022\016\n\nBLOCK_NONE\020\004\"\234" - + "\002\n\014SafetyRating\022>\n\010category\030\001 \001(\0162&.goog" - + "le.cloud.vertexai.v1.HarmCategoryB\004\342A\001\003\022" - + "Q\n\013probability\030\002 \001(\01626.google.cloud.vert" - + "exai.v1.SafetyRating.HarmProbabilityB\004\342A" - + "\001\003\022\025\n\007blocked\030\003 \001(\010B\004\342A\001\003\"b\n\017HarmProbabi" - + "lity\022 \n\034HARM_PROBABILITY_UNSPECIFIED\020\000\022\016" - + "\n\nNEGLIGIBLE\020\001\022\007\n\003LOW\020\002\022\n\n\006MEDIUM\020\003\022\010\n\004H" - + "IGH\020\004\"O\n\020CitationMetadata\022;\n\tcitations\030\001" - + " \003(\0132\".google.cloud.vertexai.v1.Citation" - + "B\004\342A\001\003\"\260\001\n\010Citation\022\031\n\013start_index\030\001 \001(\005" - + "B\004\342A\001\003\022\027\n\tend_index\030\002 \001(\005B\004\342A\001\003\022\021\n\003uri\030\003" - + " \001(\tB\004\342A\001\003\022\023\n\005title\030\004 \001(\tB\004\342A\001\003\022\025\n\007licen" - + "se\030\005 \001(\tB\004\342A\001\003\0221\n\020publication_date\030\006 \001(\013" - + "2\021.google.type.DateB\004\342A\001\003\"\342\003\n\tCandidate\022" - + "\023\n\005index\030\001 \001(\005B\004\342A\001\003\0228\n\007content\030\002 \001(\0132!." - + "google.cloud.vertexai.v1.ContentB\004\342A\001\003\022M" - + "\n\rfinish_reason\030\003 \001(\01620.google.cloud.ver" - + "texai.v1.Candidate.FinishReasonB\004\342A\001\003\022D\n" - + "\016safety_ratings\030\004 \003(\0132&.google.cloud.ver" - + "texai.v1.SafetyRatingB\004\342A\001\003\022!\n\016finish_me" - + "ssage\030\005 \001(\tB\004\342A\001\003H\000\210\001\001\022K\n\021citation_metad" - + "ata\030\006 \001(\0132*.google.cloud.vertexai.v1.Cit" - + "ationMetadataB\004\342A\001\003\"n\n\014FinishReason\022\035\n\031F" - + "INISH_REASON_UNSPECIFIED\020\000\022\010\n\004STOP\020\001\022\016\n\n" - + "MAX_TOKENS\020\002\022\n\n\006SAFETY\020\003\022\016\n\nRECITATION\020\004" - + "\022\t\n\005OTHER\020\005B\021\n\017_finish_message*\264\001\n\014HarmC" - + "ategory\022\035\n\031HARM_CATEGORY_UNSPECIFIED\020\000\022\035" - + "\n\031HARM_CATEGORY_HATE_SPEECH\020\001\022#\n\037HARM_CA" - + "TEGORY_DANGEROUS_CONTENT\020\002\022\034\n\030HARM_CATEG" - + "ORY_HARASSMENT\020\003\022#\n\037HARM_CATEGORY_SEXUAL" - + "LY_EXPLICIT\020\004B\311\001\n\035com.google.cloud.verte" - + "xai.apiB\014ContentProtoP\001Z>cloud.google.co" - + "m/go/aiplatform/apiv1/aiplatformpb;aipla" - + "tformpb\252\002\032Google.Cloud.AIPlatform.V1\312\002\032G" - + "oogle\\Cloud\\AIPlatform\\V1\352\002\035Google::Clou" - + "d::AIPlatform::V1b\006proto3" + + "on.proto\032\026google/type/date.proto\"P\n\007Cont" + + "ent\022\021\n\004role\030\001 \001(\tB\003\340A\001\0222\n\005parts\030\002 \003(\0132\036." + + "google.cloud.vertexai.v1.PartB\003\340A\002\"\205\003\n\004P" + + "art\022\023\n\004text\030\001 \001(\tB\003\340A\001H\000\022:\n\013inline_data\030" + + "\002 \001(\0132\036.google.cloud.vertexai.v1.BlobB\003\340" + + "A\001H\000\022<\n\tfile_data\030\003 \001(\0132\".google.cloud.v" + + "ertexai.v1.FileDataB\003\340A\001H\000\022D\n\rfunction_c" + + "all\030\005 \001(\0132&.google.cloud.vertexai.v1.Fun" + + "ctionCallB\003\340A\001H\000\022L\n\021function_response\030\006 " + + "\001(\0132*.google.cloud.vertexai.v1.FunctionR" + + "esponseB\003\340A\001H\000\022F\n\016video_metadata\030\004 \001(\0132\'" + + ".google.cloud.vertexai.v1.VideoMetadataB" + + "\003\340A\001H\001B\006\n\004dataB\n\n\010metadata\"1\n\004Blob\022\026\n\tmi" + + "me_type\030\001 \001(\tB\003\340A\002\022\021\n\004data\030\002 \001(\014B\003\340A\002\"9\n" + + "\010FileData\022\026\n\tmime_type\030\001 \001(\tB\003\340A\002\022\025\n\010fil" + + "e_uri\030\002 \001(\tB\003\340A\002\"y\n\rVideoMetadata\0224\n\014sta" + + "rt_offset\030\001 \001(\0132\031.google.protobuf.Durati" + + "onB\003\340A\001\0222\n\nend_offset\030\002 \001(\0132\031.google.pro" + + "tobuf.DurationB\003\340A\001\"\226\002\n\020GenerationConfig" + + "\022\035\n\013temperature\030\001 \001(\002B\003\340A\001H\000\210\001\001\022\027\n\005top_p" + + "\030\002 \001(\002B\003\340A\001H\001\210\001\001\022\027\n\005top_k\030\003 \001(\002B\003\340A\001H\002\210\001" + + "\001\022!\n\017candidate_count\030\004 \001(\005B\003\340A\001H\003\210\001\001\022#\n\021" + + "max_output_tokens\030\005 \001(\005B\003\340A\001H\004\210\001\001\022\033\n\016sto" + + "p_sequences\030\006 \003(\tB\003\340A\001B\016\n\014_temperatureB\010" + + "\n\006_top_pB\010\n\006_top_kB\022\n\020_candidate_countB\024" + + "\n\022_max_output_tokens\"\271\002\n\rSafetySetting\022=" + + "\n\010category\030\001 \001(\0162&.google.cloud.vertexai" + + ".v1.HarmCategoryB\003\340A\002\022R\n\tthreshold\030\002 \001(\016" + + "2:.google.cloud.vertexai.v1.SafetySettin" + + "g.HarmBlockThresholdB\003\340A\002\"\224\001\n\022HarmBlockT" + + "hreshold\022$\n HARM_BLOCK_THRESHOLD_UNSPECI" + + "FIED\020\000\022\027\n\023BLOCK_LOW_AND_ABOVE\020\001\022\032\n\026BLOCK" + + "_MEDIUM_AND_ABOVE\020\002\022\023\n\017BLOCK_ONLY_HIGH\020\003" + + "\022\016\n\nBLOCK_NONE\020\004\"\231\002\n\014SafetyRating\022=\n\010cat" + + "egory\030\001 \001(\0162&.google.cloud.vertexai.v1.H" + + "armCategoryB\003\340A\003\022P\n\013probability\030\002 \001(\01626." + + "google.cloud.vertexai.v1.SafetyRating.Ha" + + "rmProbabilityB\003\340A\003\022\024\n\007blocked\030\003 \001(\010B\003\340A\003" + + "\"b\n\017HarmProbability\022 \n\034HARM_PROBABILITY_" + + "UNSPECIFIED\020\000\022\016\n\nNEGLIGIBLE\020\001\022\007\n\003LOW\020\002\022\n" + + "\n\006MEDIUM\020\003\022\010\n\004HIGH\020\004\"N\n\020CitationMetadata" + + "\022:\n\tcitations\030\001 \003(\0132\".google.cloud.verte" + + "xai.v1.CitationB\003\340A\003\"\252\001\n\010Citation\022\030\n\013sta" + + "rt_index\030\001 \001(\005B\003\340A\003\022\026\n\tend_index\030\002 \001(\005B\003" + + "\340A\003\022\020\n\003uri\030\003 \001(\tB\003\340A\003\022\022\n\005title\030\004 \001(\tB\003\340A" + + "\003\022\024\n\007license\030\005 \001(\tB\003\340A\003\0220\n\020publication_d" + + "ate\030\006 \001(\0132\021.google.type.DateB\003\340A\003\"\334\003\n\tCa" + + "ndidate\022\022\n\005index\030\001 \001(\005B\003\340A\003\0227\n\007content\030\002" + + " \001(\0132!.google.cloud.vertexai.v1.ContentB" + + "\003\340A\003\022L\n\rfinish_reason\030\003 \001(\01620.google.clo" + + "ud.vertexai.v1.Candidate.FinishReasonB\003\340" + + "A\003\022C\n\016safety_ratings\030\004 \003(\0132&.google.clou" + + "d.vertexai.v1.SafetyRatingB\003\340A\003\022 \n\016finis" + + "h_message\030\005 \001(\tB\003\340A\003H\000\210\001\001\022J\n\021citation_me" + + "tadata\030\006 \001(\0132*.google.cloud.vertexai.v1." + + "CitationMetadataB\003\340A\003\"n\n\014FinishReason\022\035\n" + + "\031FINISH_REASON_UNSPECIFIED\020\000\022\010\n\004STOP\020\001\022\016" + + "\n\nMAX_TOKENS\020\002\022\n\n\006SAFETY\020\003\022\016\n\nRECITATION" + + "\020\004\022\t\n\005OTHER\020\005B\021\n\017_finish_message*\264\001\n\014Har" + + "mCategory\022\035\n\031HARM_CATEGORY_UNSPECIFIED\020\000" + + "\022\035\n\031HARM_CATEGORY_HATE_SPEECH\020\001\022#\n\037HARM_" + + "CATEGORY_DANGEROUS_CONTENT\020\002\022\034\n\030HARM_CAT" + + "EGORY_HARASSMENT\020\003\022#\n\037HARM_CATEGORY_SEXU" + + "ALLY_EXPLICIT\020\004B\311\001\n\035com.google.cloud.ver" + + "texai.apiB\014ContentProtoP\001Z>cloud.google." + + "com/go/aiplatform/apiv1/aiplatformpb;aip" + + "latformpb\252\002\032Google.Cloud.AIPlatform.V1\312\002" + + "\032Google\\Cloud\\AIPlatform\\V1\352\002\035Google::Cl" + + "oud::AIPlatform::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -217,17 +217,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_vertexai_v1_GenerationConfig_descriptor, new java.lang.String[] { - "Temperature", - "TopP", - "TopK", - "CandidateCount", - "MaxOutputTokens", - "StopSequences", - "Temperature", - "TopP", - "TopK", - "CandidateCount", - "MaxOutputTokens", + "Temperature", "TopP", "TopK", "CandidateCount", "MaxOutputTokens", "StopSequences", }); internal_static_google_cloud_vertexai_v1_SafetySetting_descriptor = getDescriptor().getMessageTypes().get(6); @@ -273,7 +263,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "SafetyRatings", "FinishMessage", "CitationMetadata", - "FinishMessage", }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CountTokensRequest.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CountTokensRequest.java index 20fa4b73ff86..e8556574ccdb 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CountTokensRequest.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CountTokensRequest.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/prediction_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CountTokensRequestOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CountTokensRequestOrBuilder.java index 6110195a7102..fcf08b141d24 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CountTokensRequestOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CountTokensRequestOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/prediction_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface CountTokensRequestOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CountTokensResponse.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CountTokensResponse.java index 234534695e9d..369a8ed8abfc 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CountTokensResponse.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CountTokensResponse.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/prediction_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CountTokensResponseOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CountTokensResponseOrBuilder.java index 06694c3300e6..14f9cc429848 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CountTokensResponseOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CountTokensResponseOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/prediction_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface CountTokensResponseOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CreateEndpointOperationMetadata.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CreateEndpointOperationMetadata.java index 54980d26b34a..e9d1c6a7aedb 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CreateEndpointOperationMetadata.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CreateEndpointOperationMetadata.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/endpoint_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** @@ -62,6 +63,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.vertexai.api.CreateEndpointOperationMetadata.Builder.class); } + private int bitField0_; public static final int GENERIC_METADATA_FIELD_NUMBER = 1; private com.google.cloud.vertexai.api.GenericOperationMetadata genericMetadata_; /** @@ -77,7 +79,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { */ @java.lang.Override public boolean hasGenericMetadata() { - return genericMetadata_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** * @@ -127,7 +129,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (genericMetadata_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(1, getGenericMetadata()); } getUnknownFields().writeTo(output); @@ -139,7 +141,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (genericMetadata_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getGenericMetadata()); } size += getUnknownFields().getSerializedSize(); @@ -308,10 +310,19 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.vertexai.api.CreateEndpointOperationMetadata.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getGenericMetadataFieldBuilder(); + } } @java.lang.Override @@ -361,10 +372,13 @@ public com.google.cloud.vertexai.api.CreateEndpointOperationMetadata buildPartia private void buildPartial0( com.google.cloud.vertexai.api.CreateEndpointOperationMetadata result) { int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.genericMetadata_ = genericMetadataBuilder_ == null ? genericMetadata_ : genericMetadataBuilder_.build(); + to_bitField0_ |= 0x00000001; } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -574,8 +588,10 @@ public Builder mergeGenericMetadata( } else { genericMetadataBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000001; - onChanged(); + if (genericMetadata_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } return this; } /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CreateEndpointOperationMetadataOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CreateEndpointOperationMetadataOrBuilder.java index 0d76ccec3534..0eaa18d314de 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CreateEndpointOperationMetadataOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CreateEndpointOperationMetadataOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/endpoint_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface CreateEndpointOperationMetadataOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CreateEndpointRequest.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CreateEndpointRequest.java index 1f7728e63041..bd705f8897b9 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CreateEndpointRequest.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CreateEndpointRequest.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/endpoint_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** @@ -64,6 +65,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.vertexai.api.CreateEndpointRequest.Builder.class); } + private int bitField0_; public static final int PARENT_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -138,7 +140,7 @@ public com.google.protobuf.ByteString getParentBytes() { */ @java.lang.Override public boolean hasEndpoint() { - return endpoint_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** * @@ -271,7 +273,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); } - if (endpoint_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getEndpoint()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointId_)) { @@ -289,7 +291,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); } - if (endpoint_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndpoint()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointId_)) { @@ -466,10 +468,19 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.vertexai.api.CreateEndpointRequest.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getEndpointFieldBuilder(); + } } @java.lang.Override @@ -522,12 +533,15 @@ private void buildPartial0(com.google.cloud.vertexai.api.CreateEndpointRequest r if (((from_bitField0_ & 0x00000001) != 0)) { result.parent_ = parent_; } + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000002) != 0)) { result.endpoint_ = endpointBuilder_ == null ? endpoint_ : endpointBuilder_.build(); + to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000004) != 0)) { result.endpointId_ = endpointId_; } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -885,8 +899,10 @@ public Builder mergeEndpoint(com.google.cloud.vertexai.api.Endpoint value) { } else { endpointBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000002; - onChanged(); + if (endpoint_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } return this; } /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CreateEndpointRequestOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CreateEndpointRequestOrBuilder.java index d0c4ed8b984e..52216bcab9ff 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CreateEndpointRequestOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CreateEndpointRequestOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/endpoint_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface CreateEndpointRequestOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CsvDestination.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CsvDestination.java index 7c1fa29cc060..2f030b0ed06c 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CsvDestination.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CsvDestination.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/io.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** @@ -60,6 +61,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.vertexai.api.CsvDestination.Builder.class); } + private int bitField0_; public static final int GCS_DESTINATION_FIELD_NUMBER = 1; private com.google.cloud.vertexai.api.GcsDestination gcsDestination_; /** @@ -77,7 +79,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { */ @java.lang.Override public boolean hasGcsDestination() { - return gcsDestination_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** * @@ -130,7 +132,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (gcsDestination_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(1, getGcsDestination()); } getUnknownFields().writeTo(output); @@ -142,7 +144,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (gcsDestination_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getGcsDestination()); } size += getUnknownFields().getSerializedSize(); @@ -309,10 +311,19 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.vertexai.api.CsvDestination.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getGcsDestinationFieldBuilder(); + } } @java.lang.Override @@ -360,10 +371,13 @@ public com.google.cloud.vertexai.api.CsvDestination buildPartial() { private void buildPartial0(com.google.cloud.vertexai.api.CsvDestination result) { int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.gcsDestination_ = gcsDestinationBuilder_ == null ? gcsDestination_ : gcsDestinationBuilder_.build(); + to_bitField0_ |= 0x00000001; } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -579,8 +593,10 @@ public Builder mergeGcsDestination(com.google.cloud.vertexai.api.GcsDestination } else { gcsDestinationBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000001; - onChanged(); + if (gcsDestination_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } return this; } /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CsvDestinationOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CsvDestinationOrBuilder.java index 0d2c9e8bd902..248d406e27b5 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CsvDestinationOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CsvDestinationOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/io.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface CsvDestinationOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CsvSource.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CsvSource.java index 3017d80ec548..c4ed20b40487 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CsvSource.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CsvSource.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/io.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** @@ -60,6 +61,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.vertexai.api.CsvSource.Builder.class); } + private int bitField0_; public static final int GCS_SOURCE_FIELD_NUMBER = 1; private com.google.cloud.vertexai.api.GcsSource gcsSource_; /** @@ -77,7 +79,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { */ @java.lang.Override public boolean hasGcsSource() { - return gcsSource_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** * @@ -130,7 +132,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (gcsSource_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(1, getGcsSource()); } getUnknownFields().writeTo(output); @@ -142,7 +144,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (gcsSource_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getGcsSource()); } size += getUnknownFields().getSerializedSize(); @@ -308,10 +310,19 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.vertexai.api.CsvSource.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getGcsSourceFieldBuilder(); + } } @java.lang.Override @@ -359,9 +370,12 @@ public com.google.cloud.vertexai.api.CsvSource buildPartial() { private void buildPartial0(com.google.cloud.vertexai.api.CsvSource result) { int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.gcsSource_ = gcsSourceBuilder_ == null ? gcsSource_ : gcsSourceBuilder_.build(); + to_bitField0_ |= 0x00000001; } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -575,8 +589,10 @@ public Builder mergeGcsSource(com.google.cloud.vertexai.api.GcsSource value) { } else { gcsSourceBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000001; - onChanged(); + if (gcsSource_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } return this; } /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CsvSourceOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CsvSourceOrBuilder.java index c1177eacd1c5..da2c952756db 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CsvSourceOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/CsvSourceOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/io.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface CsvSourceOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DedicatedResources.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DedicatedResources.java index 4f18ec21a300..a09b21d08175 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DedicatedResources.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DedicatedResources.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/machine_resources.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** @@ -63,6 +64,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.vertexai.api.DedicatedResources.Builder.class); } + private int bitField0_; public static final int MACHINE_SPEC_FIELD_NUMBER = 1; private com.google.cloud.vertexai.api.MachineSpec machineSpec_; /** @@ -81,7 +83,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { */ @java.lang.Override public boolean hasMachineSpec() { - return machineSpec_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** * @@ -387,7 +389,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (machineSpec_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(1, getMachineSpec()); } if (minReplicaCount_ != 0) { @@ -408,7 +410,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (machineSpec_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getMachineSpec()); } if (minReplicaCount_ != 0) { @@ -599,10 +601,20 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.vertexai.api.DedicatedResources.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getMachineSpecFieldBuilder(); + getAutoscalingMetricSpecsFieldBuilder(); + } } @java.lang.Override @@ -673,9 +685,11 @@ private void buildPartialRepeatedFields( private void buildPartial0(com.google.cloud.vertexai.api.DedicatedResources result) { int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.machineSpec_ = machineSpecBuilder_ == null ? machineSpec_ : machineSpecBuilder_.build(); + to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000002) != 0)) { result.minReplicaCount_ = minReplicaCount_; @@ -683,6 +697,7 @@ private void buildPartial0(com.google.cloud.vertexai.api.DedicatedResources resu if (((from_bitField0_ & 0x00000004) != 0)) { result.maxReplicaCount_ = maxReplicaCount_; } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -962,8 +977,10 @@ public Builder mergeMachineSpec(com.google.cloud.vertexai.api.MachineSpec value) } else { machineSpecBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000001; - onChanged(); + if (machineSpec_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } return this; } /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DedicatedResourcesOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DedicatedResourcesOrBuilder.java index 14703f54f98f..26cd266ac55a 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DedicatedResourcesOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DedicatedResourcesOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/machine_resources.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface DedicatedResourcesOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeleteEndpointRequest.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeleteEndpointRequest.java index c98be8d4b34a..a58bdb705116 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeleteEndpointRequest.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeleteEndpointRequest.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/endpoint_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeleteEndpointRequestOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeleteEndpointRequestOrBuilder.java index f10cdef115d7..0b0002373994 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeleteEndpointRequestOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeleteEndpointRequestOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/endpoint_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface DeleteEndpointRequestOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeleteOperationMetadata.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeleteOperationMetadata.java index ca4dd3b8b9a5..2281db70a338 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeleteOperationMetadata.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeleteOperationMetadata.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/operation.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** @@ -60,6 +61,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.vertexai.api.DeleteOperationMetadata.Builder.class); } + private int bitField0_; public static final int GENERIC_METADATA_FIELD_NUMBER = 1; private com.google.cloud.vertexai.api.GenericOperationMetadata genericMetadata_; /** @@ -75,7 +77,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { */ @java.lang.Override public boolean hasGenericMetadata() { - return genericMetadata_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** * @@ -125,7 +127,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (genericMetadata_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(1, getGenericMetadata()); } getUnknownFields().writeTo(output); @@ -137,7 +139,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (genericMetadata_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getGenericMetadata()); } size += getUnknownFields().getSerializedSize(); @@ -305,10 +307,19 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.vertexai.api.DeleteOperationMetadata.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getGenericMetadataFieldBuilder(); + } } @java.lang.Override @@ -356,10 +367,13 @@ public com.google.cloud.vertexai.api.DeleteOperationMetadata buildPartial() { private void buildPartial0(com.google.cloud.vertexai.api.DeleteOperationMetadata result) { int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.genericMetadata_ = genericMetadataBuilder_ == null ? genericMetadata_ : genericMetadataBuilder_.build(); + to_bitField0_ |= 0x00000001; } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -568,8 +582,10 @@ public Builder mergeGenericMetadata( } else { genericMetadataBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000001; - onChanged(); + if (genericMetadata_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } return this; } /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeleteOperationMetadataOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeleteOperationMetadataOrBuilder.java index 85d63ce65cd5..175d69e40d25 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeleteOperationMetadataOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeleteOperationMetadataOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/operation.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface DeleteOperationMetadataOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeployModelOperationMetadata.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeployModelOperationMetadata.java index 613e1bfa60d9..903329a340a1 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeployModelOperationMetadata.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeployModelOperationMetadata.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/endpoint_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** @@ -61,6 +62,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.vertexai.api.DeployModelOperationMetadata.Builder.class); } + private int bitField0_; public static final int GENERIC_METADATA_FIELD_NUMBER = 1; private com.google.cloud.vertexai.api.GenericOperationMetadata genericMetadata_; /** @@ -76,7 +78,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { */ @java.lang.Override public boolean hasGenericMetadata() { - return genericMetadata_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** * @@ -126,7 +128,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (genericMetadata_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(1, getGenericMetadata()); } getUnknownFields().writeTo(output); @@ -138,7 +140,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (genericMetadata_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getGenericMetadata()); } size += getUnknownFields().getSerializedSize(); @@ -307,10 +309,19 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.vertexai.api.DeployModelOperationMetadata.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getGenericMetadataFieldBuilder(); + } } @java.lang.Override @@ -358,10 +369,13 @@ public com.google.cloud.vertexai.api.DeployModelOperationMetadata buildPartial() private void buildPartial0(com.google.cloud.vertexai.api.DeployModelOperationMetadata result) { int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.genericMetadata_ = genericMetadataBuilder_ == null ? genericMetadata_ : genericMetadataBuilder_.build(); + to_bitField0_ |= 0x00000001; } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -570,8 +584,10 @@ public Builder mergeGenericMetadata( } else { genericMetadataBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000001; - onChanged(); + if (genericMetadata_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } return this; } /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeployModelOperationMetadataOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeployModelOperationMetadataOrBuilder.java index 1e70c73b2d52..2f49abe327a0 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeployModelOperationMetadataOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeployModelOperationMetadataOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/endpoint_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface DeployModelOperationMetadataOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeployModelRequest.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeployModelRequest.java index b320a9154dfc..9d1105997fa4 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeployModelRequest.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeployModelRequest.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/endpoint_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** @@ -55,7 +56,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings({"rawtypes"}) @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { switch (number) { case 3: return internalGetTrafficSplit(); @@ -74,6 +76,7 @@ protected com.google.protobuf.MapField internalGetMapField(int number) { com.google.cloud.vertexai.api.DeployModelRequest.Builder.class); } + private int bitField0_; public static final int ENDPOINT_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -154,7 +157,7 @@ public com.google.protobuf.ByteString getEndpointBytes() { */ @java.lang.Override public boolean hasDeployedModel() { - return deployedModel_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** * @@ -367,7 +370,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpoint_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, endpoint_); } - if (deployedModel_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getDeployedModel()); } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( @@ -384,7 +387,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpoint_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, endpoint_); } - if (deployedModel_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDeployedModel()); } for (java.util.Map.Entry entry : @@ -560,7 +563,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { switch (number) { case 3: return internalGetTrafficSplit(); @@ -570,7 +574,8 @@ protected com.google.protobuf.MapField internalGetMapField(int number) { } @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { switch (number) { case 3: return internalGetMutableTrafficSplit(); @@ -590,10 +595,19 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.vertexai.api.DeployModelRequest.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDeployedModelFieldBuilder(); + } } @java.lang.Override @@ -646,14 +660,17 @@ private void buildPartial0(com.google.cloud.vertexai.api.DeployModelRequest resu if (((from_bitField0_ & 0x00000001) != 0)) { result.endpoint_ = endpoint_; } + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000002) != 0)) { result.deployedModel_ = deployedModelBuilder_ == null ? deployedModel_ : deployedModelBuilder_.build(); + to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000004) != 0)) { result.trafficSplit_ = internalGetTrafficSplit(); result.trafficSplit_.makeImmutable(); } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -1040,8 +1057,10 @@ public Builder mergeDeployedModel(com.google.cloud.vertexai.api.DeployedModel va } else { deployedModelBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000002; - onChanged(); + if (deployedModel_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } return this; } /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeployModelRequestOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeployModelRequestOrBuilder.java index ac7e2cf1ec8b..b474486069d4 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeployModelRequestOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeployModelRequestOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/endpoint_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface DeployModelRequestOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeployModelResponse.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeployModelResponse.java index 6815bbc14dcc..e20bdf380e53 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeployModelResponse.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeployModelResponse.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/endpoint_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** @@ -61,6 +62,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.vertexai.api.DeployModelResponse.Builder.class); } + private int bitField0_; public static final int DEPLOYED_MODEL_FIELD_NUMBER = 1; private com.google.cloud.vertexai.api.DeployedModel deployedModel_; /** @@ -76,7 +78,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { */ @java.lang.Override public boolean hasDeployedModel() { - return deployedModel_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** * @@ -125,7 +127,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (deployedModel_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(1, getDeployedModel()); } getUnknownFields().writeTo(output); @@ -137,7 +139,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (deployedModel_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getDeployedModel()); } size += getUnknownFields().getSerializedSize(); @@ -305,10 +307,19 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.vertexai.api.DeployModelResponse.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDeployedModelFieldBuilder(); + } } @java.lang.Override @@ -356,10 +367,13 @@ public com.google.cloud.vertexai.api.DeployModelResponse buildPartial() { private void buildPartial0(com.google.cloud.vertexai.api.DeployModelResponse result) { int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.deployedModel_ = deployedModelBuilder_ == null ? deployedModel_ : deployedModelBuilder_.build(); + to_bitField0_ |= 0x00000001; } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -565,8 +579,10 @@ public Builder mergeDeployedModel(com.google.cloud.vertexai.api.DeployedModel va } else { deployedModelBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000001; - onChanged(); + if (deployedModel_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } return this; } /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeployModelResponseOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeployModelResponseOrBuilder.java index cfbf3e98c812..f13432324a64 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeployModelResponseOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeployModelResponseOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/endpoint_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface DeployModelResponseOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeployedModel.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeployedModel.java index d563484fdc84..8f4fd60f1da6 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeployedModel.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeployedModel.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/endpoint.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** @@ -66,6 +67,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.vertexai.api.DeployedModel.Builder.class); } + private int bitField0_; private int predictionResourcesCase_ = 0; @SuppressWarnings("serial") @@ -554,7 +556,7 @@ public com.google.protobuf.ByteString getDisplayNameBytes() { */ @java.lang.Override public boolean hasCreateTime() { - return createTime_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** * @@ -618,7 +620,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { */ @java.lang.Override public boolean hasExplanationSpec() { - return explanationSpec_ != null; + return ((bitField0_ & 0x00000002) != 0); } /** * @@ -817,7 +819,7 @@ public boolean getEnableAccessLogging() { */ @java.lang.Override public boolean hasPrivateEndpoints() { - return privateEndpoints_ != null; + return ((bitField0_ & 0x00000004) != 0); } /** * @@ -885,7 +887,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, displayName_); } - if (createTime_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(6, getCreateTime()); } if (predictionResourcesCase_ == 7) { @@ -896,7 +898,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeMessage( 8, (com.google.cloud.vertexai.api.AutomaticResources) predictionResources_); } - if (explanationSpec_ != null) { + if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(9, getExplanationSpec()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccount_)) { @@ -905,7 +907,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (enableAccessLogging_ != false) { output.writeBool(13, enableAccessLogging_); } - if (privateEndpoints_ != null) { + if (((bitField0_ & 0x00000004) != 0)) { output.writeMessage(14, getPrivateEndpoints()); } if (disableContainerLogging_ != false) { @@ -935,7 +937,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, displayName_); } - if (createTime_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getCreateTime()); } if (predictionResourcesCase_ == 7) { @@ -948,7 +950,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 8, (com.google.cloud.vertexai.api.AutomaticResources) predictionResources_); } - if (explanationSpec_ != null) { + if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getExplanationSpec()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccount_)) { @@ -957,7 +959,7 @@ public int getSerializedSize() { if (enableAccessLogging_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(13, enableAccessLogging_); } - if (privateEndpoints_ != null) { + if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getPrivateEndpoints()); } if (disableContainerLogging_ != false) { @@ -1200,10 +1202,21 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.vertexai.api.DeployedModel.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCreateTimeFieldBuilder(); + getExplanationSpecFieldBuilder(); + getPrivateEndpointsFieldBuilder(); + } } @java.lang.Override @@ -1289,12 +1302,15 @@ private void buildPartial0(com.google.cloud.vertexai.api.DeployedModel result) { if (((from_bitField0_ & 0x00000040) != 0)) { result.displayName_ = displayName_; } + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000080) != 0)) { result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000100) != 0)) { result.explanationSpec_ = explanationSpecBuilder_ == null ? explanationSpec_ : explanationSpecBuilder_.build(); + to_bitField0_ |= 0x00000002; } if (((from_bitField0_ & 0x00000200) != 0)) { result.serviceAccount_ = serviceAccount_; @@ -1308,7 +1324,9 @@ private void buildPartial0(com.google.cloud.vertexai.api.DeployedModel result) { if (((from_bitField0_ & 0x00001000) != 0)) { result.privateEndpoints_ = privateEndpointsBuilder_ == null ? privateEndpoints_ : privateEndpointsBuilder_.build(); + to_bitField0_ |= 0x00000004; } + result.bitField0_ |= to_bitField0_; } private void buildPartialOneofs(com.google.cloud.vertexai.api.DeployedModel result) { @@ -2770,8 +2788,10 @@ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { } else { createTimeBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000080; - onChanged(); + if (createTime_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } return this; } /** @@ -3043,8 +3063,10 @@ public Builder mergeExplanationSpec(com.google.cloud.vertexai.api.ExplanationSpe } else { explanationSpecBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000100; - onChanged(); + if (explanationSpec_ != null) { + bitField0_ |= 0x00000100; + onChanged(); + } return this; } /** @@ -3598,8 +3620,10 @@ public Builder mergePrivateEndpoints(com.google.cloud.vertexai.api.PrivateEndpoi } else { privateEndpointsBuilder_.mergeFrom(value); } - bitField0_ |= 0x00001000; - onChanged(); + if (privateEndpoints_ != null) { + bitField0_ |= 0x00001000; + onChanged(); + } return this; } /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeployedModelOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeployedModelOrBuilder.java index 470401f7b919..384257a42d7a 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeployedModelOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DeployedModelOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/endpoint.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface DeployedModelOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectPredictRequest.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectPredictRequest.java index e8b12077a527..20c80188d62a 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectPredictRequest.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectPredictRequest.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/prediction_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** @@ -64,6 +65,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.vertexai.api.DirectPredictRequest.Builder.class); } + private int bitField0_; public static final int ENDPOINT_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -209,7 +211,7 @@ public com.google.cloud.vertexai.api.TensorOrBuilder getInputsOrBuilder(int inde */ @java.lang.Override public boolean hasParameters() { - return parameters_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** * @@ -264,7 +266,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < inputs_.size(); i++) { output.writeMessage(2, inputs_.get(i)); } - if (parameters_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(3, getParameters()); } getUnknownFields().writeTo(output); @@ -282,7 +284,7 @@ public int getSerializedSize() { for (int i = 0; i < inputs_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, inputs_.get(i)); } - if (parameters_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getParameters()); } size += getUnknownFields().getSerializedSize(); @@ -458,10 +460,20 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.vertexai.api.DirectPredictRequest.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getInputsFieldBuilder(); + getParametersFieldBuilder(); + } } @java.lang.Override @@ -534,9 +546,12 @@ private void buildPartial0(com.google.cloud.vertexai.api.DirectPredictRequest re if (((from_bitField0_ & 0x00000001) != 0)) { result.endpoint_ = endpoint_; } + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000004) != 0)) { result.parameters_ = parametersBuilder_ == null ? parameters_ : parametersBuilder_.build(); + to_bitField0_ |= 0x00000001; } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -1266,8 +1281,10 @@ public Builder mergeParameters(com.google.cloud.vertexai.api.Tensor value) { } else { parametersBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000004; - onChanged(); + if (parameters_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } return this; } /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectPredictRequestOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectPredictRequestOrBuilder.java index 33cb57c5a176..5f564fa29a4b 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectPredictRequestOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectPredictRequestOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/prediction_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface DirectPredictRequestOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectPredictResponse.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectPredictResponse.java index 87279c5abcdc..8500681e527c 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectPredictResponse.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectPredictResponse.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/prediction_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** @@ -63,6 +64,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.vertexai.api.DirectPredictResponse.Builder.class); } + private int bitField0_; public static final int OUTPUTS_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -149,7 +151,7 @@ public com.google.cloud.vertexai.api.TensorOrBuilder getOutputsOrBuilder(int ind */ @java.lang.Override public boolean hasParameters() { - return parameters_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** * @@ -201,7 +203,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < outputs_.size(); i++) { output.writeMessage(1, outputs_.get(i)); } - if (parameters_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getParameters()); } getUnknownFields().writeTo(output); @@ -216,7 +218,7 @@ public int getSerializedSize() { for (int i = 0; i < outputs_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, outputs_.get(i)); } - if (parameters_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getParameters()); } size += getUnknownFields().getSerializedSize(); @@ -389,10 +391,20 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.vertexai.api.DirectPredictResponse.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getOutputsFieldBuilder(); + getParametersFieldBuilder(); + } } @java.lang.Override @@ -461,9 +473,12 @@ private void buildPartialRepeatedFields( private void buildPartial0(com.google.cloud.vertexai.api.DirectPredictResponse result) { int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000002) != 0)) { result.parameters_ = parametersBuilder_ == null ? parameters_ : parametersBuilder_.build(); + to_bitField0_ |= 0x00000001; } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -1056,8 +1071,10 @@ public Builder mergeParameters(com.google.cloud.vertexai.api.Tensor value) { } else { parametersBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000002; - onChanged(); + if (parameters_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } return this; } /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectPredictResponseOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectPredictResponseOrBuilder.java index 47ca503b9220..a0e0953e9941 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectPredictResponseOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectPredictResponseOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/prediction_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface DirectPredictResponseOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectRawPredictRequest.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectRawPredictRequest.java index 8c696831889e..d845f985d887 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectRawPredictRequest.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectRawPredictRequest.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/prediction_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectRawPredictRequestOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectRawPredictRequestOrBuilder.java index 714efde703af..08e79ab71277 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectRawPredictRequestOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectRawPredictRequestOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/prediction_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface DirectRawPredictRequestOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectRawPredictResponse.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectRawPredictResponse.java index f73a4177d4ea..7d05649e2269 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectRawPredictResponse.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectRawPredictResponse.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/prediction_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectRawPredictResponseOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectRawPredictResponseOrBuilder.java index 7f5bde8260b1..a78a8c7de64d 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectRawPredictResponseOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DirectRawPredictResponseOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/prediction_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface DirectRawPredictResponseOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DiskSpec.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DiskSpec.java index 1ceab086bdc8..49a61f48b051 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DiskSpec.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DiskSpec.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/machine_resources.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DiskSpecOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DiskSpecOrBuilder.java index b91e5f1018e1..b833f5473be9 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DiskSpecOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DiskSpecOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/machine_resources.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface DiskSpecOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DoubleArray.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DoubleArray.java index b9af70999698..aec21af71c53 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DoubleArray.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DoubleArray.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/types.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** @@ -65,7 +66,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public static final int VALUES_FIELD_NUMBER = 1; @SuppressWarnings("serial") - private com.google.protobuf.Internal.DoubleList values_; + private com.google.protobuf.Internal.DoubleList values_ = emptyDoubleList(); /** * * @@ -353,7 +354,6 @@ public com.google.cloud.vertexai.api.DoubleArray build() { public com.google.cloud.vertexai.api.DoubleArray buildPartial() { com.google.cloud.vertexai.api.DoubleArray result = new com.google.cloud.vertexai.api.DoubleArray(this); - buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } @@ -361,16 +361,12 @@ public com.google.cloud.vertexai.api.DoubleArray buildPartial() { return result; } - private void buildPartialRepeatedFields(com.google.cloud.vertexai.api.DoubleArray result) { - if (((bitField0_ & 0x00000001) != 0)) { - values_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.values_ = values_; - } - private void buildPartial0(com.google.cloud.vertexai.api.DoubleArray result) { int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + values_.makeImmutable(); + result.values_ = values_; + } } @java.lang.Override @@ -421,7 +417,8 @@ public Builder mergeFrom(com.google.cloud.vertexai.api.DoubleArray other) { if (!other.values_.isEmpty()) { if (values_.isEmpty()) { values_ = other.values_; - bitField0_ = (bitField0_ & ~0x00000001); + values_.makeImmutable(); + bitField0_ |= 0x00000001; } else { ensureValuesIsMutable(); values_.addAll(other.values_); @@ -465,7 +462,8 @@ public Builder mergeFrom( { int length = input.readRawVarint32(); int limit = input.pushLimit(length); - ensureValuesIsMutable(); + int alloc = length > 4096 ? 4096 : length; + ensureValuesIsMutable(alloc / 8); while (input.getBytesUntilLimit() > 0) { values_.addDouble(input.readDouble()); } @@ -494,10 +492,17 @@ public Builder mergeFrom( private com.google.protobuf.Internal.DoubleList values_ = emptyDoubleList(); private void ensureValuesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - values_ = mutableCopy(values_); - bitField0_ |= 0x00000001; + if (!values_.isModifiable()) { + values_ = makeMutableCopy(values_); + } + bitField0_ |= 0x00000001; + } + + private void ensureValuesIsMutable(int capacity) { + if (!values_.isModifiable()) { + values_ = makeMutableCopy(values_, capacity); } + bitField0_ |= 0x00000001; } /** * @@ -511,9 +516,8 @@ private void ensureValuesIsMutable() { * @return A list containing the values. */ public java.util.List getValuesList() { - return ((bitField0_ & 0x00000001) != 0) - ? java.util.Collections.unmodifiableList(values_) - : values_; + values_.makeImmutable(); + return values_; } /** * @@ -561,6 +565,7 @@ public Builder setValues(int index, double value) { ensureValuesIsMutable(); values_.setDouble(index, value); + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -580,6 +585,7 @@ public Builder addValues(double value) { ensureValuesIsMutable(); values_.addDouble(value); + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -598,6 +604,7 @@ public Builder addValues(double value) { public Builder addAllValues(java.lang.Iterable values) { ensureValuesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, values_); + bitField0_ |= 0x00000001; onChanged(); return this; } diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DoubleArrayOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DoubleArrayOrBuilder.java index 54d350e567cd..df32f34b0543 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DoubleArrayOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/DoubleArrayOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/types.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface DoubleArrayOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EncryptionSpec.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EncryptionSpec.java index 312d3869c9e6..4efc09d3082e 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EncryptionSpec.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EncryptionSpec.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/encryption_spec.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EncryptionSpecOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EncryptionSpecOrBuilder.java index ffc1c7b5aa4b..4eb1cfe778c9 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EncryptionSpecOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EncryptionSpecOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/encryption_spec.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface EncryptionSpecOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EncryptionSpecProto.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EncryptionSpecProto.java index 39e7f03c2a92..57c1fcc411a5 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EncryptionSpecProto.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EncryptionSpecProto.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/encryption_spec.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public final class EncryptionSpecProto { @@ -42,14 +43,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { java.lang.String[] descriptorData = { "\n.google/cloud/vertexai/v1/encryption_sp" + "ec.proto\022\030google.cloud.vertexai.v1\032\037goog" - + "le/api/field_behavior.proto\",\n\016Encryptio" - + "nSpec\022\032\n\014kms_key_name\030\001 \001(\tB\004\342A\001\002B\320\001\n\035co" - + "m.google.cloud.vertexai.apiB\023EncryptionS" - + "pecProtoP\001Z>cloud.google.com/go/aiplatfo" - + "rm/apiv1/aiplatformpb;aiplatformpb\252\002\032Goo" - + "gle.Cloud.AIPlatform.V1\312\002\032Google\\Cloud\\A" - + "IPlatform\\V1\352\002\035Google::Cloud::AIPlatform" - + "::V1b\006proto3" + + "le/api/field_behavior.proto\"+\n\016Encryptio" + + "nSpec\022\031\n\014kms_key_name\030\001 \001(\tB\003\340A\002B\320\001\n\035com" + + ".google.cloud.vertexai.apiB\023EncryptionSp" + + "ecProtoP\001Z>cloud.google.com/go/aiplatfor" + + "m/apiv1/aiplatformpb;aiplatformpb\252\002\032Goog" + + "le.Cloud.AIPlatform.V1\312\002\032Google\\Cloud\\AI" + + "Platform\\V1\352\002\035Google::Cloud::AIPlatform:" + + ":V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Endpoint.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Endpoint.java index fc6ac66321b4..88e93a073282 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Endpoint.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Endpoint.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/endpoint.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** @@ -61,7 +62,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings({"rawtypes"}) @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { switch (number) { case 5: return internalGetTrafficSplit(); @@ -82,6 +84,7 @@ protected com.google.protobuf.MapField internalGetMapField(int number) { com.google.cloud.vertexai.api.Endpoint.Builder.class); } + private int bitField0_; public static final int NAME_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -670,7 +673,7 @@ public java.lang.String getLabelsOrThrow(java.lang.String key) { */ @java.lang.Override public boolean hasCreateTime() { - return createTime_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** * @@ -719,7 +722,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { */ @java.lang.Override public boolean hasUpdateTime() { - return updateTime_ != null; + return ((bitField0_ & 0x00000002) != 0); } /** * @@ -769,7 +772,7 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { */ @java.lang.Override public boolean hasEncryptionSpec() { - return encryptionSpec_ != null; + return ((bitField0_ & 0x00000004) != 0); } /** * @@ -1000,7 +1003,7 @@ public com.google.protobuf.ByteString getModelDeploymentMonitoringJobBytes() { */ @java.lang.Override public boolean hasPredictRequestResponseLoggingConfig() { - return predictRequestResponseLoggingConfig_ != null; + return ((bitField0_ & 0x00000008) != 0); } /** * @@ -1074,13 +1077,13 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 7); - if (createTime_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(8, getCreateTime()); } - if (updateTime_ != null) { + if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(9, getUpdateTime()); } - if (encryptionSpec_ != null) { + if (((bitField0_ & 0x00000004) != 0)) { output.writeMessage(10, getEncryptionSpec()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { @@ -1092,7 +1095,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (enablePrivateServiceConnect_ != false) { output.writeBool(17, enablePrivateServiceConnect_); } - if (predictRequestResponseLoggingConfig_ != null) { + if (((bitField0_ & 0x00000008) != 0)) { output.writeMessage(18, getPredictRequestResponseLoggingConfig()); } getUnknownFields().writeTo(output); @@ -1139,13 +1142,13 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, labels__); } - if (createTime_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getCreateTime()); } - if (updateTime_ != null) { + if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getUpdateTime()); } - if (encryptionSpec_ != null) { + if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getEncryptionSpec()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { @@ -1160,7 +1163,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(17, enablePrivateServiceConnect_); } - if (predictRequestResponseLoggingConfig_ != null) { + if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( 18, getPredictRequestResponseLoggingConfig()); @@ -1382,7 +1385,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { switch (number) { case 5: return internalGetTrafficSplit(); @@ -1394,7 +1398,8 @@ protected com.google.protobuf.MapField internalGetMapField(int number) { } @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { switch (number) { case 5: return internalGetMutableTrafficSplit(); @@ -1416,10 +1421,23 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.vertexai.api.Endpoint.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDeployedModelsFieldBuilder(); + getCreateTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + getEncryptionSpecFieldBuilder(); + getPredictRequestResponseLoggingConfigFieldBuilder(); + } } @java.lang.Override @@ -1531,15 +1549,19 @@ private void buildPartial0(com.google.cloud.vertexai.api.Endpoint result) { result.labels_ = internalGetLabels(); result.labels_.makeImmutable(); } + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000080) != 0)) { result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000100) != 0)) { result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; } if (((from_bitField0_ & 0x00000200) != 0)) { result.encryptionSpec_ = encryptionSpecBuilder_ == null ? encryptionSpec_ : encryptionSpecBuilder_.build(); + to_bitField0_ |= 0x00000004; } if (((from_bitField0_ & 0x00000400) != 0)) { result.network_ = network_; @@ -1555,7 +1577,9 @@ private void buildPartial0(com.google.cloud.vertexai.api.Endpoint result) { predictRequestResponseLoggingConfigBuilder_ == null ? predictRequestResponseLoggingConfig_ : predictRequestResponseLoggingConfigBuilder_.build(); + to_bitField0_ |= 0x00000008; } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -3276,8 +3300,10 @@ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { } else { createTimeBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000080; - onChanged(); + if (createTime_ != null) { + bitField0_ |= 0x00000080; + onChanged(); + } return this; } /** @@ -3477,8 +3503,10 @@ public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { } else { updateTimeBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000100; - onChanged(); + if (updateTime_ != null) { + bitField0_ |= 0x00000100; + onChanged(); + } return this; } /** @@ -3680,8 +3708,10 @@ public Builder mergeEncryptionSpec(com.google.cloud.vertexai.api.EncryptionSpec } else { encryptionSpecBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000200; - onChanged(); + if (encryptionSpec_ != null) { + bitField0_ |= 0x00000200; + onChanged(); + } return this; } /** @@ -4292,8 +4322,10 @@ public Builder mergePredictRequestResponseLoggingConfig( } else { predictRequestResponseLoggingConfigBuilder_.mergeFrom(value); } - bitField0_ |= 0x00002000; - onChanged(); + if (predictRequestResponseLoggingConfig_ != null) { + bitField0_ |= 0x00002000; + onChanged(); + } return this; } /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EndpointOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EndpointOrBuilder.java index b829b7b2ba14..4c01f510fdce 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EndpointOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EndpointOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/endpoint.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface EndpointOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EndpointProto.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EndpointProto.java index 8e080b081d8e..300b53733da2 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EndpointProto.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EndpointProto.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/endpoint.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public final class EndpointProto { @@ -68,65 +69,64 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "1/explanation.proto\032!google/cloud/vertex" + "ai/v1/io.proto\0320google/cloud/vertexai/v1" + "/machine_resources.proto\032\037google/protobu" - + "f/timestamp.proto\"\277\010\n\010Endpoint\022\022\n\004name\030\001" - + " \001(\tB\004\342A\001\003\022\032\n\014display_name\030\002 \001(\tB\004\342A\001\002\022\023" - + "\n\013description\030\003 \001(\t\022F\n\017deployed_models\030\004" - + " \003(\0132\'.google.cloud.vertexai.v1.Deployed" - + "ModelB\004\342A\001\003\022K\n\rtraffic_split\030\005 \003(\01324.goo" - + "gle.cloud.vertexai.v1.Endpoint.TrafficSp" - + "litEntry\022\014\n\004etag\030\006 \001(\t\022>\n\006labels\030\007 \003(\0132." - + ".google.cloud.vertexai.v1.Endpoint.Label" - + "sEntry\0225\n\013create_time\030\010 \001(\0132\032.google.pro" - + "tobuf.TimestampB\004\342A\001\003\0225\n\013update_time\030\t \001" - + "(\0132\032.google.protobuf.TimestampB\004\342A\001\003\022A\n\017" - + "encryption_spec\030\n \001(\0132(.google.cloud.ver" - + "texai.v1.EncryptionSpec\0228\n\007network\030\r \001(\t" - + "B\'\342A\001\001\372A \n\036compute.googleapis.com/Networ" - + "k\022*\n\036enable_private_service_connect\030\021 \001(" - + "\010B\002\030\001\022h\n\037model_deployment_monitoring_job" - + "\030\016 \001(\tB?\342A\001\003\372A8\n6aiplatform.googleapis.c" - + "om/ModelDeploymentMonitoringJob\022n\n\'predi" - + "ct_request_response_logging_config\030\022 \001(\013" - + "2=.google.cloud.vertexai.v1.PredictReque" - + "stResponseLoggingConfig\0323\n\021TrafficSplitE" - + "ntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\005:\0028\001\032-\n\013" - + "LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:" - + "\0028\001:\265\001\352A\261\001\n\"aiplatform.googleapis.com/En" - + "dpoint\022cloud.google.com/go/aiplatform/ap" - + "iv1/aiplatformpb;aiplatformpb\252\002\032Google.C" - + "loud.AIPlatform.V1\312\002\032Google\\Cloud\\AIPlat" - + "form\\V1\352\002\035Google::Cloud::AIPlatform::V1b" - + "\006proto3" + + "f/timestamp.proto\"\270\010\n\010Endpoint\022\021\n\004name\030\001" + + " \001(\tB\003\340A\003\022\031\n\014display_name\030\002 \001(\tB\003\340A\002\022\023\n\013" + + "description\030\003 \001(\t\022E\n\017deployed_models\030\004 \003" + + "(\0132\'.google.cloud.vertexai.v1.DeployedMo" + + "delB\003\340A\003\022K\n\rtraffic_split\030\005 \003(\01324.google" + + ".cloud.vertexai.v1.Endpoint.TrafficSplit" + + "Entry\022\014\n\004etag\030\006 \001(\t\022>\n\006labels\030\007 \003(\0132..go" + + "ogle.cloud.vertexai.v1.Endpoint.LabelsEn" + + "try\0224\n\013create_time\030\010 \001(\0132\032.google.protob" + + "uf.TimestampB\003\340A\003\0224\n\013update_time\030\t \001(\0132\032" + + ".google.protobuf.TimestampB\003\340A\003\022A\n\017encry" + + "ption_spec\030\n \001(\0132(.google.cloud.vertexai" + + ".v1.EncryptionSpec\0227\n\007network\030\r \001(\tB&\340A\001" + + "\372A \n\036compute.googleapis.com/Network\022*\n\036e" + + "nable_private_service_connect\030\021 \001(\010B\002\030\001\022" + + "g\n\037model_deployment_monitoring_job\030\016 \001(\t" + + "B>\340A\003\372A8\n6aiplatform.googleapis.com/Mode" + + "lDeploymentMonitoringJob\022n\n\'predict_requ" + + "est_response_logging_config\030\022 \001(\0132=.goog" + + "le.cloud.vertexai.v1.PredictRequestRespo" + + "nseLoggingConfig\0323\n\021TrafficSplitEntry\022\013\n" + + "\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\005:\0028\001\032-\n\013LabelsE" + + "ntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:\265\001\352" + + "A\261\001\n\"aiplatform.googleapis.com/Endpoint\022" + + "cloud.goo" + + "gle.com/go/aiplatform/apiv1/aiplatformpb" + + ";aiplatformpb\252\002\032Google.Cloud.AIPlatform." + + "V1\312\002\032Google\\Cloud\\AIPlatform\\V1\352\002\035Google" + + "::Cloud::AIPlatform::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EndpointServiceProto.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EndpointServiceProto.java index a41358758aee..2194a921d86c 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EndpointServiceProto.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/EndpointServiceProto.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/endpoint_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public final class EndpointServiceProto { @@ -117,117 +118,117 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "cloud/vertexai/v1/operation.proto\032#googl" + "e/longrunning/operations.proto\032\033google/p" + "rotobuf/empty.proto\032 google/protobuf/fie" - + "ld_mask.proto\"\252\001\n\025CreateEndpointRequest\022" - + ":\n\006parent\030\001 \001(\tB*\342A\001\002\372A#\n!locations.goog" - + "leapis.com/Location\022:\n\010endpoint\030\002 \001(\0132\"." - + "google.cloud.vertexai.v1.EndpointB\004\342A\001\002\022" - + "\031\n\013endpoint_id\030\004 \001(\tB\004\342A\001\005\"o\n\037CreateEndp" - + "ointOperationMetadata\022L\n\020generic_metadat" - + "a\030\001 \001(\01322.google.cloud.vertexai.v1.Gener" - + "icOperationMetadata\"O\n\022GetEndpointReques" - + "t\0229\n\004name\030\001 \001(\tB+\342A\001\002\372A$\n\"aiplatform.goo" - + "gleapis.com/Endpoint\"\342\001\n\024ListEndpointsRe" - + "quest\022:\n\006parent\030\001 \001(\tB*\342A\001\002\372A#\n!location" - + "s.googleapis.com/Location\022\024\n\006filter\030\002 \001(" - + "\tB\004\342A\001\001\022\027\n\tpage_size\030\003 \001(\005B\004\342A\001\001\022\030\n\npage" - + "_token\030\004 \001(\tB\004\342A\001\001\0223\n\tread_mask\030\005 \001(\0132\032." - + "google.protobuf.FieldMaskB\004\342A\001\001\022\020\n\010order" - + "_by\030\006 \001(\t\"g\n\025ListEndpointsResponse\0225\n\ten" - + "dpoints\030\001 \003(\0132\".google.cloud.vertexai.v1" - + ".Endpoint\022\027\n\017next_page_token\030\002 \001(\t\"\212\001\n\025U" - + "pdateEndpointRequest\022:\n\010endpoint\030\001 \001(\0132\"" - + ".google.cloud.vertexai.v1.EndpointB\004\342A\001\002" - + "\0225\n\013update_mask\030\002 \001(\0132\032.google.protobuf." - + "FieldMaskB\004\342A\001\002\"R\n\025DeleteEndpointRequest" - + "\0229\n\004name\030\001 \001(\tB+\342A\001\002\372A$\n\"aiplatform.goog" - + "leapis.com/Endpoint\"\246\002\n\022DeployModelReque" - + "st\022=\n\010endpoint\030\001 \001(\tB+\342A\001\002\372A$\n\"aiplatfor" - + "m.googleapis.com/Endpoint\022E\n\016deployed_mo" - + "del\030\002 \001(\0132\'.google.cloud.vertexai.v1.Dep" - + "loyedModelB\004\342A\001\002\022U\n\rtraffic_split\030\003 \003(\0132" - + ">.google.cloud.vertexai.v1.DeployModelRe" - + "quest.TrafficSplitEntry\0323\n\021TrafficSplitE" - + "ntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\005:\0028\001\"V\n\023" - + "DeployModelResponse\022?\n\016deployed_model\030\001 " - + "\001(\0132\'.google.cloud.vertexai.v1.DeployedM" - + "odel\"l\n\034DeployModelOperationMetadata\022L\n\020" - + "generic_metadata\030\001 \001(\01322.google.cloud.ve" - + "rtexai.v1.GenericOperationMetadata\"\204\002\n\024U" - + "ndeployModelRequest\022=\n\010endpoint\030\001 \001(\tB+\342" - + "A\001\002\372A$\n\"aiplatform.googleapis.com/Endpoi" - + "nt\022\037\n\021deployed_model_id\030\002 \001(\tB\004\342A\001\002\022W\n\rt" - + "raffic_split\030\003 \003(\0132@.google.cloud.vertex" - + "ai.v1.UndeployModelRequest.TrafficSplitE" - + "ntry\0323\n\021TrafficSplitEntry\022\013\n\003key\030\001 \001(\t\022\r" - + "\n\005value\030\002 \001(\005:\0028\001\"\027\n\025UndeployModelRespon" - + "se\"n\n\036UndeployModelOperationMetadata\022L\n\020" - + "generic_metadata\030\001 \001(\01322.google.cloud.ve" - + "rtexai.v1.GenericOperationMetadata\"\331\001\n\032M" - + "utateDeployedModelRequest\022=\n\010endpoint\030\001 " - + "\001(\tB+\342A\001\002\372A$\n\"aiplatform.googleapis.com/" - + "Endpoint\022E\n\016deployed_model\030\002 \001(\0132\'.googl" - + "e.cloud.vertexai.v1.DeployedModelB\004\342A\001\002\022" - + "5\n\013update_mask\030\004 \001(\0132\032.google.protobuf.F" - + "ieldMaskB\004\342A\001\002\"^\n\033MutateDeployedModelRes" + + "ld_mask.proto\"\247\001\n\025CreateEndpointRequest\022" + + "9\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!locations.googl" + + "eapis.com/Location\0229\n\010endpoint\030\002 \001(\0132\".g" + + "oogle.cloud.vertexai.v1.EndpointB\003\340A\002\022\030\n" + + "\013endpoint_id\030\004 \001(\tB\003\340A\005\"o\n\037CreateEndpoin" + + "tOperationMetadata\022L\n\020generic_metadata\030\001" + + " \001(\01322.google.cloud.vertexai.v1.GenericO" + + "perationMetadata\"N\n\022GetEndpointRequest\0228" + + "\n\004name\030\001 \001(\tB*\340A\002\372A$\n\"aiplatform.googlea" + + "pis.com/Endpoint\"\335\001\n\024ListEndpointsReques" + + "t\0229\n\006parent\030\001 \001(\tB)\340A\002\372A#\n!locations.goo" + + "gleapis.com/Location\022\023\n\006filter\030\002 \001(\tB\003\340A" + + "\001\022\026\n\tpage_size\030\003 \001(\005B\003\340A\001\022\027\n\npage_token\030" + + "\004 \001(\tB\003\340A\001\0222\n\tread_mask\030\005 \001(\0132\032.google.p" + + "rotobuf.FieldMaskB\003\340A\001\022\020\n\010order_by\030\006 \001(\t" + + "\"g\n\025ListEndpointsResponse\0225\n\tendpoints\030\001" + + " \003(\0132\".google.cloud.vertexai.v1.Endpoint" + + "\022\027\n\017next_page_token\030\002 \001(\t\"\210\001\n\025UpdateEndp" + + "ointRequest\0229\n\010endpoint\030\001 \001(\0132\".google.c" + + "loud.vertexai.v1.EndpointB\003\340A\002\0224\n\013update" + + "_mask\030\002 \001(\0132\032.google.protobuf.FieldMaskB" + + "\003\340A\002\"Q\n\025DeleteEndpointRequest\0228\n\004name\030\001 " + + "\001(\tB*\340A\002\372A$\n\"aiplatform.googleapis.com/E" + + "ndpoint\"\244\002\n\022DeployModelRequest\022<\n\010endpoi" + + "nt\030\001 \001(\tB*\340A\002\372A$\n\"aiplatform.googleapis." + + "com/Endpoint\022D\n\016deployed_model\030\002 \001(\0132\'.g" + + "oogle.cloud.vertexai.v1.DeployedModelB\003\340" + + "A\002\022U\n\rtraffic_split\030\003 \003(\0132>.google.cloud" + + ".vertexai.v1.DeployModelRequest.TrafficS" + + "plitEntry\0323\n\021TrafficSplitEntry\022\013\n\003key\030\001 " + + "\001(\t\022\r\n\005value\030\002 \001(\005:\0028\001\"V\n\023DeployModelRes" + "ponse\022?\n\016deployed_model\030\001 \001(\0132\'.google.c" - + "loud.vertexai.v1.DeployedModel\"t\n$Mutate" - + "DeployedModelOperationMetadata\022L\n\020generi" - + "c_metadata\030\001 \001(\01322.google.cloud.vertexai" - + ".v1.GenericOperationMetadata2\230\017\n\017Endpoin" - + "tService\022\200\002\n\016CreateEndpoint\022/.google.clo" - + "ud.vertexai.v1.CreateEndpointRequest\032\035.g" - + "oogle.longrunning.Operation\"\235\001\312A+\n\010Endpo" - + "int\022\037CreateEndpointOperationMetadata\332A\017p" - + "arent,endpoint\332A\033parent,endpoint,endpoin" - + "t_id\202\323\344\223\0029\"-/v1/{parent=projects/*/locat" - + "ions/*}/endpoints:\010endpoint\022\235\001\n\013GetEndpo" - + "int\022,.google.cloud.vertexai.v1.GetEndpoi" - + "ntRequest\032\".google.cloud.vertexai.v1.End" - + "point\"<\332A\004name\202\323\344\223\002/\022-/v1/{name=projects" - + "/*/locations/*/endpoints/*}\022\260\001\n\rListEndp" - + "oints\022..google.cloud.vertexai.v1.ListEnd" - + "pointsRequest\032/.google.cloud.vertexai.v1" - + ".ListEndpointsResponse\">\332A\006parent\202\323\344\223\002/\022" - + "-/v1/{parent=projects/*/locations/*}/end" - + "points\022\306\001\n\016UpdateEndpoint\022/.google.cloud" - + ".vertexai.v1.UpdateEndpointRequest\032\".goo" - + "gle.cloud.vertexai.v1.Endpoint\"_\332A\024endpo" - + "int,update_mask\202\323\344\223\002B26/v1/{endpoint.nam" - + "e=projects/*/locations/*/endpoints/*}:\010e" - + "ndpoint\022\321\001\n\016DeleteEndpoint\022/.google.clou" - + "d.vertexai.v1.DeleteEndpointRequest\032\035.go" - + "ogle.longrunning.Operation\"o\312A0\n\025google." - + "protobuf.Empty\022\027DeleteOperationMetadata\332" - + "A\004name\202\323\344\223\002/*-/v1/{name=projects/*/locat" - + "ions/*/endpoints/*}\022\203\002\n\013DeployModel\022,.go" - + "ogle.cloud.vertexai.v1.DeployModelReques" - + "t\032\035.google.longrunning.Operation\"\246\001\312A3\n\023" - + "DeployModelResponse\022\034DeployModelOperatio" - + "nMetadata\332A%endpoint,deployed_model,traf" - + "fic_split\202\323\344\223\002B\"=/v1/{endpoint=projects/" - + "*/locations/*/endpoints/*}:deployModel:\001" - + "*\022\220\002\n\rUndeployModel\022..google.cloud.verte" - + "xai.v1.UndeployModelRequest\032\035.google.lon" - + "grunning.Operation\"\257\001\312A7\n\025UndeployModelR" - + "esponse\022\036UndeployModelOperationMetadata\332" - + "A(endpoint,deployed_model_id,traffic_spl" - + "it\202\323\344\223\002D\"?/v1/{endpoint=projects/*/locat" - + "ions/*/endpoints/*}:undeployModel:\001*\022\251\002\n" - + "\023MutateDeployedModel\0224.google.cloud.vert" - + "exai.v1.MutateDeployedModelRequest\032\035.goo" - + "gle.longrunning.Operation\"\274\001\312AC\n\033MutateD" - + "eployedModelResponse\022$MutateDeployedMode" - + "lOperationMetadata\332A#endpoint,deployed_m" - + "odel,update_mask\202\323\344\223\002J\"E/v1/{endpoint=pr" - + "ojects/*/locations/*/endpoints/*}:mutate" - + "DeployedModel:\001*\032M\312A\031aiplatform.googleap" - + "is.com\322A.https://www.googleapis.com/auth" - + "/cloud-platformB\321\001\n\035com.google.cloud.ver" - + "texai.apiB\024EndpointServiceProtoP\001Z>cloud" - + ".google.com/go/aiplatform/apiv1/aiplatfo" - + "rmpb;aiplatformpb\252\002\032Google.Cloud.AIPlatf" - + "orm.V1\312\002\032Google\\Cloud\\AIPlatform\\V1\352\002\035Go" - + "ogle::Cloud::AIPlatform::V1b\006proto3" + + "loud.vertexai.v1.DeployedModel\"l\n\034Deploy" + + "ModelOperationMetadata\022L\n\020generic_metada" + + "ta\030\001 \001(\01322.google.cloud.vertexai.v1.Gene" + + "ricOperationMetadata\"\202\002\n\024UndeployModelRe" + + "quest\022<\n\010endpoint\030\001 \001(\tB*\340A\002\372A$\n\"aiplatf" + + "orm.googleapis.com/Endpoint\022\036\n\021deployed_" + + "model_id\030\002 \001(\tB\003\340A\002\022W\n\rtraffic_split\030\003 \003" + + "(\0132@.google.cloud.vertexai.v1.UndeployMo" + + "delRequest.TrafficSplitEntry\0323\n\021TrafficS" + + "plitEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\005:\0028" + + "\001\"\027\n\025UndeployModelResponse\"n\n\036UndeployMo" + + "delOperationMetadata\022L\n\020generic_metadata" + + "\030\001 \001(\01322.google.cloud.vertexai.v1.Generi" + + "cOperationMetadata\"\326\001\n\032MutateDeployedMod" + + "elRequest\022<\n\010endpoint\030\001 \001(\tB*\340A\002\372A$\n\"aip" + + "latform.googleapis.com/Endpoint\022D\n\016deplo" + + "yed_model\030\002 \001(\0132\'.google.cloud.vertexai." + + "v1.DeployedModelB\003\340A\002\0224\n\013update_mask\030\004 \001" + + "(\0132\032.google.protobuf.FieldMaskB\003\340A\002\"^\n\033M" + + "utateDeployedModelResponse\022?\n\016deployed_m" + + "odel\030\001 \001(\0132\'.google.cloud.vertexai.v1.De" + + "ployedModel\"t\n$MutateDeployedModelOperat" + + "ionMetadata\022L\n\020generic_metadata\030\001 \001(\01322." + + "google.cloud.vertexai.v1.GenericOperatio" + + "nMetadata2\230\017\n\017EndpointService\022\200\002\n\016Create" + + "Endpoint\022/.google.cloud.vertexai.v1.Crea" + + "teEndpointRequest\032\035.google.longrunning.O" + + "peration\"\235\001\312A+\n\010Endpoint\022\037CreateEndpoint" + + "OperationMetadata\332A\017parent,endpoint\332A\033pa" + + "rent,endpoint,endpoint_id\202\323\344\223\0029\"-/v1/{pa" + + "rent=projects/*/locations/*}/endpoints:\010" + + "endpoint\022\235\001\n\013GetEndpoint\022,.google.cloud." + + "vertexai.v1.GetEndpointRequest\032\".google." + + "cloud.vertexai.v1.Endpoint\"<\332A\004name\202\323\344\223\002" + + "/\022-/v1/{name=projects/*/locations/*/endp" + + "oints/*}\022\260\001\n\rListEndpoints\022..google.clou" + + "d.vertexai.v1.ListEndpointsRequest\032/.goo" + + "gle.cloud.vertexai.v1.ListEndpointsRespo" + + "nse\">\332A\006parent\202\323\344\223\002/\022-/v1/{parent=projec" + + "ts/*/locations/*}/endpoints\022\306\001\n\016UpdateEn" + + "dpoint\022/.google.cloud.vertexai.v1.Update" + + "EndpointRequest\032\".google.cloud.vertexai." + + "v1.Endpoint\"_\332A\024endpoint,update_mask\202\323\344\223" + + "\002B26/v1/{endpoint.name=projects/*/locati" + + "ons/*/endpoints/*}:\010endpoint\022\321\001\n\016DeleteE" + + "ndpoint\022/.google.cloud.vertexai.v1.Delet" + + "eEndpointRequest\032\035.google.longrunning.Op" + + "eration\"o\312A0\n\025google.protobuf.Empty\022\027Del" + + "eteOperationMetadata\332A\004name\202\323\344\223\002/*-/v1/{" + + "name=projects/*/locations/*/endpoints/*}" + + "\022\203\002\n\013DeployModel\022,.google.cloud.vertexai" + + ".v1.DeployModelRequest\032\035.google.longrunn" + + "ing.Operation\"\246\001\312A3\n\023DeployModelResponse" + + "\022\034DeployModelOperationMetadata\332A%endpoin" + + "t,deployed_model,traffic_split\202\323\344\223\002B\"=/v" + + "1/{endpoint=projects/*/locations/*/endpo" + + "ints/*}:deployModel:\001*\022\220\002\n\rUndeployModel" + + "\022..google.cloud.vertexai.v1.UndeployMode" + + "lRequest\032\035.google.longrunning.Operation\"" + + "\257\001\312A7\n\025UndeployModelResponse\022\036UndeployMo" + + "delOperationMetadata\332A(endpoint,deployed" + + "_model_id,traffic_split\202\323\344\223\002D\"?/v1/{endp" + + "oint=projects/*/locations/*/endpoints/*}" + + ":undeployModel:\001*\022\251\002\n\023MutateDeployedMode" + + "l\0224.google.cloud.vertexai.v1.MutateDeplo" + + "yedModelRequest\032\035.google.longrunning.Ope" + + "ration\"\274\001\312AC\n\033MutateDeployedModelRespons" + + "e\022$MutateDeployedModelOperationMetadata\332" + + "A#endpoint,deployed_model,update_mask\202\323\344" + + "\223\002J\"E/v1/{endpoint=projects/*/locations/" + + "*/endpoints/*}:mutateDeployedModel:\001*\032M\312" + + "A\031aiplatform.googleapis.com\322A.https://ww" + + "w.googleapis.com/auth/cloud-platformB\321\001\n" + + "\035com.google.cloud.vertexai.apiB\024Endpoint" + + "ServiceProtoP\001Z>cloud.google.com/go/aipl" + + "atform/apiv1/aiplatformpb;aiplatformpb\252\002" + + "\032Google.Cloud.AIPlatform.V1\312\002\032Google\\Clo" + + "ud\\AIPlatform\\V1\352\002\035Google::Cloud::AIPlat" + + "form::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Examples.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Examples.java index e3e7c13387d4..8bbf88732555 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Examples.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Examples.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/explanation.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** @@ -309,6 +310,7 @@ private DataFormat(int value) { // @@protoc_insertion_point(enum_scope:google.cloud.vertexai.v1.Examples.ExampleGcsSource.DataFormat) } + private int bitField0_; public static final int DATA_FORMAT_FIELD_NUMBER = 1; private int dataFormat_ = 0; /** @@ -363,7 +365,7 @@ public com.google.cloud.vertexai.api.Examples.ExampleGcsSource.DataFormat getDat */ @java.lang.Override public boolean hasGcsSource() { - return gcsSource_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** * @@ -418,7 +420,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(1, dataFormat_); } - if (gcsSource_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getGcsSource()); } getUnknownFields().writeTo(output); @@ -436,7 +438,7 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, dataFormat_); } - if (gcsSource_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getGcsSource()); } size += getUnknownFields().getSerializedSize(); @@ -609,10 +611,19 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.vertexai.api.Examples.ExampleGcsSource.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getGcsSourceFieldBuilder(); + } } @java.lang.Override @@ -664,9 +675,12 @@ private void buildPartial0(com.google.cloud.vertexai.api.Examples.ExampleGcsSour if (((from_bitField0_ & 0x00000001) != 0)) { result.dataFormat_ = dataFormat_; } + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000002) != 0)) { result.gcsSource_ = gcsSourceBuilder_ == null ? gcsSource_ : gcsSourceBuilder_.build(); + to_bitField0_ |= 0x00000001; } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -986,8 +1000,10 @@ public Builder mergeGcsSource(com.google.cloud.vertexai.api.GcsSource value) { } else { gcsSourceBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000002; - onChanged(); + if (gcsSource_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } return this; } /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExamplesOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExamplesOrBuilder.java index 0e67354bed2b..81ea5b4ffb61 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExamplesOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExamplesOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/explanation.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface ExamplesOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExamplesOverride.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExamplesOverride.java index 0fdc1a3c9304..69a29d3439fa 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExamplesOverride.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExamplesOverride.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/explanation.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExamplesOverrideOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExamplesOverrideOrBuilder.java index 6aab68f8946d..f6191e0d28a3 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExamplesOverrideOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExamplesOverrideOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/explanation.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface ExamplesOverrideOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExamplesRestrictionsNamespace.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExamplesRestrictionsNamespace.java index 758ba63cd8f6..cb8b78cbadec 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExamplesRestrictionsNamespace.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExamplesRestrictionsNamespace.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/explanation.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExamplesRestrictionsNamespaceOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExamplesRestrictionsNamespaceOrBuilder.java index 7c4d8a94710f..1a16a6ecde51 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExamplesRestrictionsNamespaceOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExamplesRestrictionsNamespaceOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/explanation.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface ExamplesRestrictionsNamespaceOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplainRequest.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplainRequest.java index ebf94d5f1675..1854d9f49bee 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplainRequest.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplainRequest.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/prediction_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** @@ -65,6 +66,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.vertexai.api.ExplainRequest.Builder.class); } + private int bitField0_; public static final int ENDPOINT_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -258,7 +260,7 @@ public com.google.protobuf.ValueOrBuilder getInstancesOrBuilder(int index) { */ @java.lang.Override public boolean hasParameters() { - return parameters_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** * @@ -319,7 +321,7 @@ public com.google.protobuf.ValueOrBuilder getParametersOrBuilder() { */ @java.lang.Override public boolean hasExplanationSpecOverride() { - return explanationSpecOverride_ != null; + return ((bitField0_ & 0x00000002) != 0); } /** * @@ -447,10 +449,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deployedModelId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, deployedModelId_); } - if (parameters_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(4, getParameters()); } - if (explanationSpecOverride_ != null) { + if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(5, getExplanationSpecOverride()); } getUnknownFields().writeTo(output); @@ -471,10 +473,10 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deployedModelId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, deployedModelId_); } - if (parameters_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getParameters()); } - if (explanationSpecOverride_ != null) { + if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getExplanationSpecOverride()); } @@ -662,10 +664,21 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.vertexai.api.ExplainRequest.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getInstancesFieldBuilder(); + getParametersFieldBuilder(); + getExplanationSpecOverrideFieldBuilder(); + } } @java.lang.Override @@ -743,18 +756,22 @@ private void buildPartial0(com.google.cloud.vertexai.api.ExplainRequest result) if (((from_bitField0_ & 0x00000001) != 0)) { result.endpoint_ = endpoint_; } + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000004) != 0)) { result.parameters_ = parametersBuilder_ == null ? parameters_ : parametersBuilder_.build(); + to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000008) != 0)) { result.explanationSpecOverride_ = explanationSpecOverrideBuilder_ == null ? explanationSpecOverride_ : explanationSpecOverrideBuilder_.build(); + to_bitField0_ |= 0x00000002; } if (((from_bitField0_ & 0x00000010) != 0)) { result.deployedModelId_ = deployedModelId_; } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -1697,8 +1714,10 @@ public Builder mergeParameters(com.google.protobuf.Value value) { } else { parametersBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000004; - onChanged(); + if (parameters_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } return this; } /** @@ -1933,8 +1952,10 @@ public Builder mergeExplanationSpecOverride( } else { explanationSpecOverrideBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000008; - onChanged(); + if (explanationSpecOverride_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } return this; } /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplainRequestOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplainRequestOrBuilder.java index 14c2188d6278..29c06da7ab77 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplainRequestOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplainRequestOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/prediction_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface ExplainRequestOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplainResponse.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplainResponse.java index 671e14e03dc1..e672153102b1 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplainResponse.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplainResponse.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/prediction_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplainResponseOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplainResponseOrBuilder.java index 62d2b6a38871..04649d7d30a0 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplainResponseOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplainResponseOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/prediction_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface ExplainResponseOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Explanation.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Explanation.java index ef062b937f84..3a2e265554d0 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Explanation.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Explanation.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/explanation.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** @@ -84,6 +85,14 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index] * can be used to identify which output this attribution is explaining. * + * By default, we provide Shapley values for the predicted class. However, + * you can configure the explanation request to generate Shapley values for + * any other classes too. For example, if a model predicts a probability of + * `0.4` for approving a loan application, the model's decision is to reject + * the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default + * Shapley values would be computed for rejection decision and not approval, + * even though the latter might be the positive class. + * * If users set * [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k], * the attributions are sorted by @@ -117,6 +126,14 @@ public java.util.List getAttributions * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index] * can be used to identify which output this attribution is explaining. * + * By default, we provide Shapley values for the predicted class. However, + * you can configure the explanation request to generate Shapley values for + * any other classes too. For example, if a model predicts a probability of + * `0.4` for approving a loan application, the model's decision is to reject + * the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default + * Shapley values would be computed for rejection decision and not approval, + * even though the latter might be the positive class. + * * If users set * [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k], * the attributions are sorted by @@ -151,6 +168,14 @@ public java.util.List getAttributions * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index] * can be used to identify which output this attribution is explaining. * + * By default, we provide Shapley values for the predicted class. However, + * you can configure the explanation request to generate Shapley values for + * any other classes too. For example, if a model predicts a probability of + * `0.4` for approving a loan application, the model's decision is to reject + * the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default + * Shapley values would be computed for rejection decision and not approval, + * even though the latter might be the positive class. + * * If users set * [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k], * the attributions are sorted by @@ -184,6 +209,14 @@ public int getAttributionsCount() { * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index] * can be used to identify which output this attribution is explaining. * + * By default, we provide Shapley values for the predicted class. However, + * you can configure the explanation request to generate Shapley values for + * any other classes too. For example, if a model predicts a probability of + * `0.4` for approving a loan application, the model's decision is to reject + * the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default + * Shapley values would be computed for rejection decision and not approval, + * even though the latter might be the positive class. + * * If users set * [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k], * the attributions are sorted by @@ -217,6 +250,14 @@ public com.google.cloud.vertexai.api.Attribution getAttributions(int index) { * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index] * can be used to identify which output this attribution is explaining. * + * By default, we provide Shapley values for the predicted class. However, + * you can configure the explanation request to generate Shapley values for + * any other classes too. For example, if a model predicts a probability of + * `0.4` for approving a loan application, the model's decision is to reject + * the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default + * Shapley values would be computed for rejection decision and not approval, + * even though the latter might be the positive class. + * * If users set * [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k], * the attributions are sorted by @@ -822,6 +863,14 @@ private void ensureAttributionsIsMutable() { * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index] * can be used to identify which output this attribution is explaining. * + * By default, we provide Shapley values for the predicted class. However, + * you can configure the explanation request to generate Shapley values for + * any other classes too. For example, if a model predicts a probability of + * `0.4` for approving a loan application, the model's decision is to reject + * the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default + * Shapley values would be computed for rejection decision and not approval, + * even though the latter might be the positive class. + * * If users set * [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k], * the attributions are sorted by @@ -858,6 +907,14 @@ public java.util.List getAttributions * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index] * can be used to identify which output this attribution is explaining. * + * By default, we provide Shapley values for the predicted class. However, + * you can configure the explanation request to generate Shapley values for + * any other classes too. For example, if a model predicts a probability of + * `0.4` for approving a loan application, the model's decision is to reject + * the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default + * Shapley values would be computed for rejection decision and not approval, + * even though the latter might be the positive class. + * * If users set * [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k], * the attributions are sorted by @@ -894,6 +951,14 @@ public int getAttributionsCount() { * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index] * can be used to identify which output this attribution is explaining. * + * By default, we provide Shapley values for the predicted class. However, + * you can configure the explanation request to generate Shapley values for + * any other classes too. For example, if a model predicts a probability of + * `0.4` for approving a loan application, the model's decision is to reject + * the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default + * Shapley values would be computed for rejection decision and not approval, + * even though the latter might be the positive class. + * * If users set * [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k], * the attributions are sorted by @@ -930,6 +995,14 @@ public com.google.cloud.vertexai.api.Attribution getAttributions(int index) { * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index] * can be used to identify which output this attribution is explaining. * + * By default, we provide Shapley values for the predicted class. However, + * you can configure the explanation request to generate Shapley values for + * any other classes too. For example, if a model predicts a probability of + * `0.4` for approving a loan application, the model's decision is to reject + * the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default + * Shapley values would be computed for rejection decision and not approval, + * even though the latter might be the positive class. + * * If users set * [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k], * the attributions are sorted by @@ -972,6 +1045,14 @@ public Builder setAttributions(int index, com.google.cloud.vertexai.api.Attribut * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index] * can be used to identify which output this attribution is explaining. * + * By default, we provide Shapley values for the predicted class. However, + * you can configure the explanation request to generate Shapley values for + * any other classes too. For example, if a model predicts a probability of + * `0.4` for approving a loan application, the model's decision is to reject + * the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default + * Shapley values would be computed for rejection decision and not approval, + * even though the latter might be the positive class. + * * If users set * [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k], * the attributions are sorted by @@ -1012,6 +1093,14 @@ public Builder setAttributions( * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index] * can be used to identify which output this attribution is explaining. * + * By default, we provide Shapley values for the predicted class. However, + * you can configure the explanation request to generate Shapley values for + * any other classes too. For example, if a model predicts a probability of + * `0.4` for approving a loan application, the model's decision is to reject + * the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default + * Shapley values would be computed for rejection decision and not approval, + * even though the latter might be the positive class. + * * If users set * [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k], * the attributions are sorted by @@ -1054,6 +1143,14 @@ public Builder addAttributions(com.google.cloud.vertexai.api.Attribution value) * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index] * can be used to identify which output this attribution is explaining. * + * By default, we provide Shapley values for the predicted class. However, + * you can configure the explanation request to generate Shapley values for + * any other classes too. For example, if a model predicts a probability of + * `0.4` for approving a loan application, the model's decision is to reject + * the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default + * Shapley values would be computed for rejection decision and not approval, + * even though the latter might be the positive class. + * * If users set * [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k], * the attributions are sorted by @@ -1096,6 +1193,14 @@ public Builder addAttributions(int index, com.google.cloud.vertexai.api.Attribut * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index] * can be used to identify which output this attribution is explaining. * + * By default, we provide Shapley values for the predicted class. However, + * you can configure the explanation request to generate Shapley values for + * any other classes too. For example, if a model predicts a probability of + * `0.4` for approving a loan application, the model's decision is to reject + * the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default + * Shapley values would be computed for rejection decision and not approval, + * even though the latter might be the positive class. + * * If users set * [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k], * the attributions are sorted by @@ -1136,6 +1241,14 @@ public Builder addAttributions( * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index] * can be used to identify which output this attribution is explaining. * + * By default, we provide Shapley values for the predicted class. However, + * you can configure the explanation request to generate Shapley values for + * any other classes too. For example, if a model predicts a probability of + * `0.4` for approving a loan application, the model's decision is to reject + * the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default + * Shapley values would be computed for rejection decision and not approval, + * even though the latter might be the positive class. + * * If users set * [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k], * the attributions are sorted by @@ -1176,6 +1289,14 @@ public Builder addAttributions( * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index] * can be used to identify which output this attribution is explaining. * + * By default, we provide Shapley values for the predicted class. However, + * you can configure the explanation request to generate Shapley values for + * any other classes too. For example, if a model predicts a probability of + * `0.4` for approving a loan application, the model's decision is to reject + * the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default + * Shapley values would be computed for rejection decision and not approval, + * even though the latter might be the positive class. + * * If users set * [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k], * the attributions are sorted by @@ -1216,6 +1337,14 @@ public Builder addAllAttributions( * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index] * can be used to identify which output this attribution is explaining. * + * By default, we provide Shapley values for the predicted class. However, + * you can configure the explanation request to generate Shapley values for + * any other classes too. For example, if a model predicts a probability of + * `0.4` for approving a loan application, the model's decision is to reject + * the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default + * Shapley values would be computed for rejection decision and not approval, + * even though the latter might be the positive class. + * * If users set * [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k], * the attributions are sorted by @@ -1255,6 +1384,14 @@ public Builder clearAttributions() { * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index] * can be used to identify which output this attribution is explaining. * + * By default, we provide Shapley values for the predicted class. However, + * you can configure the explanation request to generate Shapley values for + * any other classes too. For example, if a model predicts a probability of + * `0.4` for approving a loan application, the model's decision is to reject + * the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default + * Shapley values would be computed for rejection decision and not approval, + * even though the latter might be the positive class. + * * If users set * [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k], * the attributions are sorted by @@ -1294,6 +1431,14 @@ public Builder removeAttributions(int index) { * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index] * can be used to identify which output this attribution is explaining. * + * By default, we provide Shapley values for the predicted class. However, + * you can configure the explanation request to generate Shapley values for + * any other classes too. For example, if a model predicts a probability of + * `0.4` for approving a loan application, the model's decision is to reject + * the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default + * Shapley values would be computed for rejection decision and not approval, + * even though the latter might be the positive class. + * * If users set * [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k], * the attributions are sorted by @@ -1326,6 +1471,14 @@ public com.google.cloud.vertexai.api.Attribution.Builder getAttributionsBuilder( * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index] * can be used to identify which output this attribution is explaining. * + * By default, we provide Shapley values for the predicted class. However, + * you can configure the explanation request to generate Shapley values for + * any other classes too. For example, if a model predicts a probability of + * `0.4` for approving a loan application, the model's decision is to reject + * the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default + * Shapley values would be computed for rejection decision and not approval, + * even though the latter might be the positive class. + * * If users set * [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k], * the attributions are sorted by @@ -1362,6 +1515,14 @@ public com.google.cloud.vertexai.api.AttributionOrBuilder getAttributionsOrBuild * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index] * can be used to identify which output this attribution is explaining. * + * By default, we provide Shapley values for the predicted class. However, + * you can configure the explanation request to generate Shapley values for + * any other classes too. For example, if a model predicts a probability of + * `0.4` for approving a loan application, the model's decision is to reject + * the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default + * Shapley values would be computed for rejection decision and not approval, + * even though the latter might be the positive class. + * * If users set * [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k], * the attributions are sorted by @@ -1399,6 +1560,14 @@ public com.google.cloud.vertexai.api.AttributionOrBuilder getAttributionsOrBuild * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index] * can be used to identify which output this attribution is explaining. * + * By default, we provide Shapley values for the predicted class. However, + * you can configure the explanation request to generate Shapley values for + * any other classes too. For example, if a model predicts a probability of + * `0.4` for approving a loan application, the model's decision is to reject + * the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default + * Shapley values would be computed for rejection decision and not approval, + * even though the latter might be the positive class. + * * If users set * [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k], * the attributions are sorted by @@ -1432,6 +1601,14 @@ public com.google.cloud.vertexai.api.Attribution.Builder addAttributionsBuilder( * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index] * can be used to identify which output this attribution is explaining. * + * By default, we provide Shapley values for the predicted class. However, + * you can configure the explanation request to generate Shapley values for + * any other classes too. For example, if a model predicts a probability of + * `0.4` for approving a loan application, the model's decision is to reject + * the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default + * Shapley values would be computed for rejection decision and not approval, + * even though the latter might be the positive class. + * * If users set * [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k], * the attributions are sorted by @@ -1465,6 +1642,14 @@ public com.google.cloud.vertexai.api.Attribution.Builder addAttributionsBuilder( * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index] * can be used to identify which output this attribution is explaining. * + * By default, we provide Shapley values for the predicted class. However, + * you can configure the explanation request to generate Shapley values for + * any other classes too. For example, if a model predicts a probability of + * `0.4` for approving a loan application, the model's decision is to reject + * the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default + * Shapley values would be computed for rejection decision and not approval, + * even though the latter might be the positive class. + * * If users set * [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k], * the attributions are sorted by diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationMetadata.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationMetadata.java index 30c370b7ab61..600e09df2297 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationMetadata.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationMetadata.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/explanation_metadata.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** @@ -55,7 +56,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings({"rawtypes"}) @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { switch (number) { case 1: return internalGetInputs(); @@ -4541,6 +4543,7 @@ public com.google.protobuf.Parser getParserForType() { } } + private int bitField0_; public static final int INPUT_BASELINES_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -4864,7 +4867,7 @@ public com.google.protobuf.ByteString getModalityBytes() { */ @java.lang.Override public boolean hasFeatureValueDomain() { - return featureValueDomain_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** * @@ -5276,7 +5279,7 @@ public com.google.protobuf.ValueOrBuilder getEncodedBaselinesOrBuilder(int index */ @java.lang.Override public boolean hasVisualization() { - return visualization_ != null; + return ((bitField0_ & 0x00000002) != 0); } /** * @@ -5409,7 +5412,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(modality_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, modality_); } - if (featureValueDomain_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(5, getFeatureValueDomain()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(indicesTensorName_)) { @@ -5428,7 +5431,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < encodedBaselines_.size(); i++) { output.writeMessage(10, encodedBaselines_.get(i)); } - if (visualization_ != null) { + if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(11, getVisualization()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(groupName_)) { @@ -5458,7 +5461,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(modality_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, modality_); } - if (featureValueDomain_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getFeatureValueDomain()); } @@ -5483,7 +5486,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, encodedBaselines_.get(i)); } - if (visualization_ != null) { + if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getVisualization()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(groupName_)) { @@ -5707,10 +5710,22 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getInputBaselinesFieldBuilder(); + getFeatureValueDomainFieldBuilder(); + getEncodedBaselinesFieldBuilder(); + getVisualizationFieldBuilder(); + } } @java.lang.Override @@ -5819,11 +5834,13 @@ private void buildPartial0( if (((from_bitField0_ & 0x00000008) != 0)) { result.modality_ = modality_; } + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000010) != 0)) { result.featureValueDomain_ = featureValueDomainBuilder_ == null ? featureValueDomain_ : featureValueDomainBuilder_.build(); + to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000020) != 0)) { result.indicesTensorName_ = indicesTensorName_; @@ -5841,10 +5858,12 @@ private void buildPartial0( if (((from_bitField0_ & 0x00000400) != 0)) { result.visualization_ = visualizationBuilder_ == null ? visualization_ : visualizationBuilder_.build(); + to_bitField0_ |= 0x00000002; } if (((from_bitField0_ & 0x00000800) != 0)) { result.groupName_ = groupName_; } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -7245,8 +7264,10 @@ public Builder mergeFeatureValueDomain( } else { featureValueDomainBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000010; - onChanged(); + if (featureValueDomain_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } return this; } /** @@ -8482,8 +8503,10 @@ public Builder mergeVisualization( } else { visualizationBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000400; - onChanged(); + if (visualization_ != null) { + bitField0_ |= 0x00000400; + onChanged(); + } return this; } /** @@ -11095,7 +11118,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { switch (number) { case 1: return internalGetInputs(); @@ -11107,7 +11131,8 @@ protected com.google.protobuf.MapField internalGetMapField(int number) { } @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { switch (number) { case 1: return internalGetMutableInputs(); @@ -11180,12 +11205,10 @@ public com.google.cloud.vertexai.api.ExplanationMetadata buildPartial() { private void buildPartial0(com.google.cloud.vertexai.api.ExplanationMetadata result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { - result.inputs_ = internalGetInputs(); - result.inputs_.makeImmutable(); + result.inputs_ = internalGetInputs().build(InputsDefaultEntryHolder.defaultEntry); } if (((from_bitField0_ & 0x00000002) != 0)) { - result.outputs_ = internalGetOutputs(); - result.outputs_.makeImmutable(); + result.outputs_ = internalGetOutputs().build(OutputsDefaultEntryHolder.defaultEntry); } if (((from_bitField0_ & 0x00000004) != 0)) { result.featureAttributionsSchemaUri_ = featureAttributionsSchemaUri_; @@ -11291,7 +11314,7 @@ public Builder mergeFrom( InputsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); internalGetMutableInputs() - .getMutableMap() + .ensureBuilderMap() .put(inputs__.getKey(), inputs__.getValue()); bitField0_ |= 0x00000001; break; @@ -11306,7 +11329,7 @@ public Builder mergeFrom( OutputsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); internalGetMutableOutputs() - .getMutableMap() + .ensureBuilderMap() .put(outputs__.getKey(), outputs__.getValue()); bitField0_ |= 0x00000002; break; @@ -11342,27 +11365,58 @@ public Builder mergeFrom( private int bitField0_; - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata> + private static final class InputsConverter + implements com.google.protobuf.MapFieldBuilder.Converter< + java.lang.String, + com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadataOrBuilder, + com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata> { + @java.lang.Override + public com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata build( + com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadataOrBuilder val) { + if (val instanceof com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata) { + return (com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata) val; + } + return ((com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Builder) val) + .build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata> + defaultEntry() { + return InputsDefaultEntryHolder.defaultEntry; + } + }; + + private static final InputsConverter inputsConverter = new InputsConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadataOrBuilder, + com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata, + com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Builder> inputs_; - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata> + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadataOrBuilder, + com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata, + com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Builder> internalGetInputs() { if (inputs_ == null) { - return com.google.protobuf.MapField.emptyMapField(InputsDefaultEntryHolder.defaultEntry); + return new com.google.protobuf.MapFieldBuilder<>(inputsConverter); } return inputs_; } - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata> + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadataOrBuilder, + com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata, + com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Builder> internalGetMutableInputs() { if (inputs_ == null) { - inputs_ = com.google.protobuf.MapField.newMapField(InputsDefaultEntryHolder.defaultEntry); - } - if (!inputs_.isMutable()) { - inputs_ = inputs_.copy(); + inputs_ = new com.google.protobuf.MapFieldBuilder<>(inputsConverter); } bitField0_ |= 0x00000001; onChanged(); @@ -11370,7 +11424,7 @@ public Builder mergeFrom( } public int getInputsCount() { - return internalGetInputs().getMap().size(); + return internalGetInputs().ensureBuilderMap().size(); } /** * @@ -11402,7 +11456,7 @@ public boolean containsInputs(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } - return internalGetInputs().getMap().containsKey(key); + return internalGetInputs().ensureBuilderMap().containsKey(key); } /** Use {@link #getInputsMap()} instead. */ @java.lang.Override @@ -11441,7 +11495,7 @@ public boolean containsInputs(java.lang.String key) { public java.util.Map< java.lang.String, com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata> getInputsMap() { - return internalGetInputs().getMap(); + return internalGetInputs().getImmutableMap(); } /** * @@ -11478,9 +11532,10 @@ public boolean containsInputs(java.lang.String key) { throw new NullPointerException("map key"); } java.util.Map< - java.lang.String, com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata> - map = internalGetInputs().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; + java.lang.String, + com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadataOrBuilder> + map = internalGetMutableInputs().ensureBuilderMap(); + return map.containsKey(key) ? inputsConverter.build(map.get(key)) : defaultValue; } /** * @@ -11514,17 +11569,18 @@ public com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata getInputs throw new NullPointerException("map key"); } java.util.Map< - java.lang.String, com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata> - map = internalGetInputs().getMap(); + java.lang.String, + com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadataOrBuilder> + map = internalGetMutableInputs().ensureBuilderMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } - return map.get(key); + return inputsConverter.build(map.get(key)); } public Builder clearInputs() { bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableInputs().getMutableMap().clear(); + internalGetMutableInputs().clear(); return this; } /** @@ -11556,7 +11612,7 @@ public Builder removeInputs(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableInputs().getMutableMap().remove(key); + internalGetMutableInputs().ensureBuilderMap().remove(key); return this; } /** Use alternate mutation accessors instead. */ @@ -11565,7 +11621,7 @@ public Builder removeInputs(java.lang.String key) { java.lang.String, com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata> getMutableInputs() { bitField0_ |= 0x00000001; - return internalGetMutableInputs().getMutableMap(); + return internalGetMutableInputs().ensureMessageMap(); } /** * @@ -11601,7 +11657,7 @@ public Builder putInputs( if (value == null) { throw new NullPointerException("map value"); } - internalGetMutableInputs().getMutableMap().put(key, value); + internalGetMutableInputs().ensureBuilderMap().put(key, value); bitField0_ |= 0x00000001; return this; } @@ -11634,32 +11690,114 @@ public Builder putAllInputs( java.util.Map< java.lang.String, com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata> values) { - internalGetMutableInputs().getMutableMap().putAll(values); + for (java.util.Map.Entry< + java.lang.String, com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata> + e : values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableInputs().ensureBuilderMap().putAll(values); bitField0_ |= 0x00000001; return this; } + /** + * + * + *
+     * Required. Map from feature names to feature input metadata. Keys are the
+     * name of the features. Values are the specification of the feature.
+     *
+     * An empty InputMetadata is valid. It describes a text feature which has the
+     * name specified as the key in
+     * [ExplanationMetadata.inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs].
+     * The baseline of the empty feature is chosen by Vertex AI.
+     *
+     * For Vertex AI-provided Tensorflow images, the key can be any friendly
+     * name of the feature. Once specified,
+     * [featureAttributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]
+     * are keyed by this key (if not grouped with another feature).
+     *
+     * For custom images, the key must match with the key in
+     * [instance][google.cloud.aiplatform.v1.ExplainRequest.instances].
+     * 
+ * + * + * map<string, .google.cloud.vertexai.v1.ExplanationMetadata.InputMetadata> inputs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Builder + putInputsBuilderIfAbsent(java.lang.String key) { + java.util.Map< + java.lang.String, + com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadataOrBuilder> + builderMap = internalGetMutableInputs().ensureBuilderMap(); + com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadataOrBuilder entry = + builderMap.get(key); + if (entry == null) { + entry = com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata) { + entry = + ((com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata) entry).toBuilder(); + builderMap.put(key, entry); + } + return (com.google.cloud.vertexai.api.ExplanationMetadata.InputMetadata.Builder) entry; + } + + private static final class OutputsConverter + implements com.google.protobuf.MapFieldBuilder.Converter< + java.lang.String, + com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadataOrBuilder, + com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata> { + @java.lang.Override + public com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata build( + com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadataOrBuilder val) { + if (val instanceof com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata) { + return (com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata) val; + } + return ((com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata.Builder) val) + .build(); + } - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata> + @java.lang.Override + public com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata> + defaultEntry() { + return OutputsDefaultEntryHolder.defaultEntry; + } + }; + + private static final OutputsConverter outputsConverter = new OutputsConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadataOrBuilder, + com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata, + com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata.Builder> outputs_; - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata> + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadataOrBuilder, + com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata, + com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata.Builder> internalGetOutputs() { if (outputs_ == null) { - return com.google.protobuf.MapField.emptyMapField(OutputsDefaultEntryHolder.defaultEntry); + return new com.google.protobuf.MapFieldBuilder<>(outputsConverter); } return outputs_; } - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata> + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadataOrBuilder, + com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata, + com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata.Builder> internalGetMutableOutputs() { if (outputs_ == null) { - outputs_ = com.google.protobuf.MapField.newMapField(OutputsDefaultEntryHolder.defaultEntry); - } - if (!outputs_.isMutable()) { - outputs_ = outputs_.copy(); + outputs_ = new com.google.protobuf.MapFieldBuilder<>(outputsConverter); } bitField0_ |= 0x00000002; onChanged(); @@ -11667,7 +11805,7 @@ public Builder putAllInputs( } public int getOutputsCount() { - return internalGetOutputs().getMap().size(); + return internalGetOutputs().ensureBuilderMap().size(); } /** * @@ -11693,7 +11831,7 @@ public boolean containsOutputs(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } - return internalGetOutputs().getMap().containsKey(key); + return internalGetOutputs().ensureBuilderMap().containsKey(key); } /** Use {@link #getOutputsMap()} instead. */ @java.lang.Override @@ -11726,7 +11864,7 @@ public boolean containsOutputs(java.lang.String key) { public java.util.Map< java.lang.String, com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata> getOutputsMap() { - return internalGetOutputs().getMap(); + return internalGetOutputs().getImmutableMap(); } /** * @@ -11757,9 +11895,10 @@ public boolean containsOutputs(java.lang.String key) { throw new NullPointerException("map key"); } java.util.Map< - java.lang.String, com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata> - map = internalGetOutputs().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; + java.lang.String, + com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadataOrBuilder> + map = internalGetMutableOutputs().ensureBuilderMap(); + return map.containsKey(key) ? outputsConverter.build(map.get(key)) : defaultValue; } /** * @@ -11787,17 +11926,18 @@ public com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata getOutpu throw new NullPointerException("map key"); } java.util.Map< - java.lang.String, com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata> - map = internalGetOutputs().getMap(); + java.lang.String, + com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadataOrBuilder> + map = internalGetMutableOutputs().ensureBuilderMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } - return map.get(key); + return outputsConverter.build(map.get(key)); } public Builder clearOutputs() { bitField0_ = (bitField0_ & ~0x00000002); - internalGetMutableOutputs().getMutableMap().clear(); + internalGetMutableOutputs().clear(); return this; } /** @@ -11823,7 +11963,7 @@ public Builder removeOutputs(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableOutputs().getMutableMap().remove(key); + internalGetMutableOutputs().ensureBuilderMap().remove(key); return this; } /** Use alternate mutation accessors instead. */ @@ -11832,7 +11972,7 @@ public Builder removeOutputs(java.lang.String key) { java.lang.String, com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata> getMutableOutputs() { bitField0_ |= 0x00000002; - return internalGetMutableOutputs().getMutableMap(); + return internalGetMutableOutputs().ensureMessageMap(); } /** * @@ -11862,7 +12002,7 @@ public Builder putOutputs( if (value == null) { throw new NullPointerException("map value"); } - internalGetMutableOutputs().getMutableMap().put(key, value); + internalGetMutableOutputs().ensureBuilderMap().put(key, value); bitField0_ |= 0x00000002; return this; } @@ -11889,10 +12029,55 @@ public Builder putAllOutputs( java.util.Map< java.lang.String, com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata> values) { - internalGetMutableOutputs().getMutableMap().putAll(values); + for (java.util.Map.Entry< + java.lang.String, com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata> + e : values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableOutputs().ensureBuilderMap().putAll(values); bitField0_ |= 0x00000002; return this; } + /** + * + * + *
+     * Required. Map from output names to output metadata.
+     *
+     * For Vertex AI-provided Tensorflow images, keys can be any user defined
+     * string that consists of any UTF-8 characters.
+     *
+     * For custom images, keys are the name of the output field in the prediction
+     * to be explained.
+     *
+     * Currently only one key is allowed.
+     * 
+ * + * + * map<string, .google.cloud.vertexai.v1.ExplanationMetadata.OutputMetadata> outputs = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata.Builder + putOutputsBuilderIfAbsent(java.lang.String key) { + java.util.Map< + java.lang.String, + com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadataOrBuilder> + builderMap = internalGetMutableOutputs().ensureBuilderMap(); + com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadataOrBuilder entry = + builderMap.get(key); + if (entry == null) { + entry = com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata) { + entry = + ((com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata) entry).toBuilder(); + builderMap.put(key, entry); + } + return (com.google.cloud.vertexai.api.ExplanationMetadata.OutputMetadata.Builder) entry; + } private java.lang.Object featureAttributionsSchemaUri_ = ""; /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationMetadataOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationMetadataOrBuilder.java index 8490115e7e77..44d055680544 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationMetadataOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationMetadataOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/explanation_metadata.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface ExplanationMetadataOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationMetadataOverride.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationMetadataOverride.java index 2f5681ee0444..42ba529fb78a 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationMetadataOverride.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationMetadataOverride.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/explanation.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** @@ -54,7 +55,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings({"rawtypes"}) @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { switch (number) { case 1: return internalGetInputs(); @@ -1582,7 +1584,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { switch (number) { case 1: return internalGetInputs(); @@ -1592,7 +1595,8 @@ protected com.google.protobuf.MapField internalGetMapField(int number) { } @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { switch (number) { case 1: return internalGetMutableInputs(); @@ -1660,8 +1664,7 @@ public com.google.cloud.vertexai.api.ExplanationMetadataOverride buildPartial() private void buildPartial0(com.google.cloud.vertexai.api.ExplanationMetadataOverride result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { - result.inputs_ = internalGetInputs(); - result.inputs_.makeImmutable(); + result.inputs_ = internalGetInputs().build(InputsDefaultEntryHolder.defaultEntry); } } @@ -1750,7 +1753,7 @@ public Builder mergeFrom( InputsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); internalGetMutableInputs() - .getMutableMap() + .ensureBuilderMap() .put(inputs__.getKey(), inputs__.getValue()); bitField0_ |= 0x00000001; break; @@ -1774,30 +1777,69 @@ public Builder mergeFrom( private int bitField0_; - private com.google.protobuf.MapField< + private static final class InputsConverter + implements com.google.protobuf.MapFieldBuilder.Converter< java.lang.String, - com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride> + com.google.cloud.vertexai.api.ExplanationMetadataOverride + .InputMetadataOverrideOrBuilder, + com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride> { + @java.lang.Override + public com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride build( + com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverrideOrBuilder + val) { + if (val + instanceof + com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride) { + return (com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride) + val; + } + return ((com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride + .Builder) + val) + .build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry< + java.lang.String, + com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride> + defaultEntry() { + return InputsDefaultEntryHolder.defaultEntry; + } + }; + + private static final InputsConverter inputsConverter = new InputsConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.cloud.vertexai.api.ExplanationMetadataOverride + .InputMetadataOverrideOrBuilder, + com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride, + com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride.Builder> inputs_; - private com.google.protobuf.MapField< + private com.google.protobuf.MapFieldBuilder< java.lang.String, - com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride> + com.google.cloud.vertexai.api.ExplanationMetadataOverride + .InputMetadataOverrideOrBuilder, + com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride, + com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride.Builder> internalGetInputs() { if (inputs_ == null) { - return com.google.protobuf.MapField.emptyMapField(InputsDefaultEntryHolder.defaultEntry); + return new com.google.protobuf.MapFieldBuilder<>(inputsConverter); } return inputs_; } - private com.google.protobuf.MapField< + private com.google.protobuf.MapFieldBuilder< java.lang.String, - com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride> + com.google.cloud.vertexai.api.ExplanationMetadataOverride + .InputMetadataOverrideOrBuilder, + com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride, + com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride.Builder> internalGetMutableInputs() { if (inputs_ == null) { - inputs_ = com.google.protobuf.MapField.newMapField(InputsDefaultEntryHolder.defaultEntry); - } - if (!inputs_.isMutable()) { - inputs_ = inputs_.copy(); + inputs_ = new com.google.protobuf.MapFieldBuilder<>(inputsConverter); } bitField0_ |= 0x00000001; onChanged(); @@ -1805,7 +1847,7 @@ public Builder mergeFrom( } public int getInputsCount() { - return internalGetInputs().getMap().size(); + return internalGetInputs().ensureBuilderMap().size(); } /** * @@ -1828,7 +1870,7 @@ public boolean containsInputs(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } - return internalGetInputs().getMap().containsKey(key); + return internalGetInputs().ensureBuilderMap().containsKey(key); } /** Use {@link #getInputsMap()} instead. */ @java.lang.Override @@ -1860,7 +1902,7 @@ public boolean containsInputs(java.lang.String key) { java.lang.String, com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride> getInputsMap() { - return internalGetInputs().getMap(); + return internalGetInputs().getImmutableMap(); } /** * @@ -1891,9 +1933,10 @@ public boolean containsInputs(java.lang.String key) { } java.util.Map< java.lang.String, - com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride> - map = internalGetInputs().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; + com.google.cloud.vertexai.api.ExplanationMetadataOverride + .InputMetadataOverrideOrBuilder> + map = internalGetMutableInputs().ensureBuilderMap(); + return map.containsKey(key) ? inputsConverter.build(map.get(key)) : defaultValue; } /** * @@ -1919,17 +1962,18 @@ public boolean containsInputs(java.lang.String key) { } java.util.Map< java.lang.String, - com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride> - map = internalGetInputs().getMap(); + com.google.cloud.vertexai.api.ExplanationMetadataOverride + .InputMetadataOverrideOrBuilder> + map = internalGetMutableInputs().ensureBuilderMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } - return map.get(key); + return inputsConverter.build(map.get(key)); } public Builder clearInputs() { bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableInputs().getMutableMap().clear(); + internalGetMutableInputs().clear(); return this; } /** @@ -1952,7 +1996,7 @@ public Builder removeInputs(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableInputs().getMutableMap().remove(key); + internalGetMutableInputs().ensureBuilderMap().remove(key); return this; } /** Use alternate mutation accessors instead. */ @@ -1962,7 +2006,7 @@ public Builder removeInputs(java.lang.String key) { com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride> getMutableInputs() { bitField0_ |= 0x00000001; - return internalGetMutableInputs().getMutableMap(); + return internalGetMutableInputs().ensureMessageMap(); } /** * @@ -1989,7 +2033,7 @@ public Builder putInputs( if (value == null) { throw new NullPointerException("map value"); } - internalGetMutableInputs().getMutableMap().put(key, value); + internalGetMutableInputs().ensureBuilderMap().put(key, value); bitField0_ |= 0x00000001; return this; } @@ -2014,10 +2058,62 @@ public Builder putAllInputs( java.lang.String, com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride> values) { - internalGetMutableInputs().getMutableMap().putAll(values); + for (java.util.Map.Entry< + java.lang.String, + com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride> + e : values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableInputs().ensureBuilderMap().putAll(values); bitField0_ |= 0x00000001; return this; } + /** + * + * + *
+     * Required. Overrides the [input
+     * metadata][google.cloud.aiplatform.v1.ExplanationMetadata.inputs] of the
+     * features. The key is the name of the feature to be overridden. The keys
+     * specified here must exist in the input metadata to be overridden. If a
+     * feature is not specified here, the corresponding feature's input metadata
+     * is not overridden.
+     * 
+ * + * + * map<string, .google.cloud.vertexai.v1.ExplanationMetadataOverride.InputMetadataOverride> inputs = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride.Builder + putInputsBuilderIfAbsent(java.lang.String key) { + java.util.Map< + java.lang.String, + com.google.cloud.vertexai.api.ExplanationMetadataOverride + .InputMetadataOverrideOrBuilder> + builderMap = internalGetMutableInputs().ensureBuilderMap(); + com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverrideOrBuilder + entry = builderMap.get(key); + if (entry == null) { + entry = + com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride + .newBuilder(); + builderMap.put(key, entry); + } + if (entry + instanceof + com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride) { + entry = + ((com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride) + entry) + .toBuilder(); + builderMap.put(key, entry); + } + return (com.google.cloud.vertexai.api.ExplanationMetadataOverride.InputMetadataOverride + .Builder) + entry; + } @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationMetadataOverrideOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationMetadataOverrideOrBuilder.java index c73d7a60ee91..34032e291f23 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationMetadataOverrideOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationMetadataOverrideOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/explanation.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface ExplanationMetadataOverrideOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationMetadataProto.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationMetadataProto.java index d4de879d9f40..f8962cde1365 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationMetadataProto.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationMetadataProto.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/explanation_metadata.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public final class ExplanationMetadataProto { @@ -67,72 +68,72 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "\n3google/cloud/vertexai/v1/explanation_m" + "etadata.proto\022\030google.cloud.vertexai.v1\032" + "\037google/api/field_behavior.proto\032\034google" - + "/protobuf/struct.proto\"\273\022\n\023ExplanationMe" - + "tadata\022O\n\006inputs\030\001 \003(\01329.google.cloud.ve" + + "/protobuf/struct.proto\"\271\022\n\023ExplanationMe" + + "tadata\022N\n\006inputs\030\001 \003(\01329.google.cloud.ve" + "rtexai.v1.ExplanationMetadata.InputsEntr" - + "yB\004\342A\001\002\022Q\n\007outputs\030\002 \003(\0132:.google.cloud." - + "vertexai.v1.ExplanationMetadata.OutputsE" - + "ntryB\004\342A\001\002\022\'\n\037feature_attributions_schem" - + "a_uri\030\003 \001(\t\022\033\n\023latent_space_source\030\005 \001(\t" - + "\032\266\r\n\rInputMetadata\022/\n\017input_baselines\030\001 " - + "\003(\0132\026.google.protobuf.Value\022\031\n\021input_ten" - + "sor_name\030\002 \001(\t\022V\n\010encoding\030\003 \001(\0162D.googl" - + "e.cloud.vertexai.v1.ExplanationMetadata." - + "InputMetadata.Encoding\022\020\n\010modality\030\004 \001(\t" - + "\022l\n\024feature_value_domain\030\005 \001(\0132N.google." + + "yB\003\340A\002\022P\n\007outputs\030\002 \003(\0132:.google.cloud.v" + + "ertexai.v1.ExplanationMetadata.OutputsEn" + + "tryB\003\340A\002\022\'\n\037feature_attributions_schema_" + + "uri\030\003 \001(\t\022\033\n\023latent_space_source\030\005 \001(\t\032\266" + + "\r\n\rInputMetadata\022/\n\017input_baselines\030\001 \003(" + + "\0132\026.google.protobuf.Value\022\031\n\021input_tenso" + + "r_name\030\002 \001(\t\022V\n\010encoding\030\003 \001(\0162D.google." + "cloud.vertexai.v1.ExplanationMetadata.In" - + "putMetadata.FeatureValueDomain\022\033\n\023indice" - + "s_tensor_name\030\006 \001(\t\022\037\n\027dense_shape_tenso" - + "r_name\030\007 \001(\t\022\035\n\025index_feature_mapping\030\010 " - + "\003(\t\022\033\n\023encoded_tensor_name\030\t \001(\t\0221\n\021enco" - + "ded_baselines\030\n \003(\0132\026.google.protobuf.Va" - + "lue\022`\n\rvisualization\030\013 \001(\0132I.google.clou" - + "d.vertexai.v1.ExplanationMetadata.InputM" - + "etadata.Visualization\022\022\n\ngroup_name\030\014 \001(" - + "\t\032j\n\022FeatureValueDomain\022\021\n\tmin_value\030\001 \001" - + "(\002\022\021\n\tmax_value\030\002 \001(\002\022\025\n\roriginal_mean\030\003" - + " \001(\002\022\027\n\017original_stddev\030\004 \001(\002\032\316\006\n\rVisual" - + "ization\022\\\n\004type\030\001 \001(\0162N.google.cloud.ver" - + "texai.v1.ExplanationMetadata.InputMetada" - + "ta.Visualization.Type\022d\n\010polarity\030\002 \001(\0162" - + "R.google.cloud.vertexai.v1.ExplanationMe" - + "tadata.InputMetadata.Visualization.Polar" - + "ity\022e\n\tcolor_map\030\003 \001(\0162R.google.cloud.ve" - + "rtexai.v1.ExplanationMetadata.InputMetad" - + "ata.Visualization.ColorMap\022\037\n\027clip_perce" - + "nt_upperbound\030\004 \001(\002\022\037\n\027clip_percent_lowe" - + "rbound\030\005 \001(\002\022k\n\014overlay_type\030\006 \001(\0162U.goo" - + "gle.cloud.vertexai.v1.ExplanationMetadat" - + "a.InputMetadata.Visualization.OverlayTyp" - + "e\"6\n\004Type\022\024\n\020TYPE_UNSPECIFIED\020\000\022\n\n\006PIXEL" - + "S\020\001\022\014\n\010OUTLINES\020\002\"J\n\010Polarity\022\030\n\024POLARIT" - + "Y_UNSPECIFIED\020\000\022\014\n\010POSITIVE\020\001\022\014\n\010NEGATIV" - + "E\020\002\022\010\n\004BOTH\020\003\"{\n\010ColorMap\022\031\n\025COLOR_MAP_U" - + "NSPECIFIED\020\000\022\016\n\nPINK_GREEN\020\001\022\013\n\007VIRIDIS\020" - + "\002\022\007\n\003RED\020\003\022\t\n\005GREEN\020\004\022\r\n\tRED_GREEN\020\006\022\024\n\020" - + "PINK_WHITE_GREEN\020\005\"b\n\013OverlayType\022\034\n\030OVE" - + "RLAY_TYPE_UNSPECIFIED\020\000\022\010\n\004NONE\020\001\022\014\n\010ORI" - + "GINAL\020\002\022\r\n\tGRAYSCALE\020\003\022\016\n\nMASK_BLACK\020\004\"\240" - + "\001\n\010Encoding\022\030\n\024ENCODING_UNSPECIFIED\020\000\022\014\n" - + "\010IDENTITY\020\001\022\023\n\017BAG_OF_FEATURES\020\002\022\032\n\026BAG_" - + "OF_FEATURES_SPARSE\020\003\022\r\n\tINDICATOR\020\004\022\026\n\022C" - + "OMBINED_EMBEDDING\020\005\022\024\n\020CONCAT_EMBEDDING\020" - + "\006\032\246\001\n\016OutputMetadata\022<\n\032index_display_na" - + "me_mapping\030\001 \001(\0132\026.google.protobuf.Value" - + "H\000\022\"\n\030display_name_mapping_key\030\002 \001(\tH\000\022\032" - + "\n\022output_tensor_name\030\003 \001(\tB\026\n\024display_na" - + "me_mapping\032j\n\013InputsEntry\022\013\n\003key\030\001 \001(\t\022J" - + "\n\005value\030\002 \001(\0132;.google.cloud.vertexai.v1" - + ".ExplanationMetadata.InputMetadata:\0028\001\032l" - + "\n\014OutputsEntry\022\013\n\003key\030\001 \001(\t\022K\n\005value\030\002 \001" - + "(\0132<.google.cloud.vertexai.v1.Explanatio" - + "nMetadata.OutputMetadata:\0028\001B\325\001\n\035com.goo" - + "gle.cloud.vertexai.apiB\030ExplanationMetad" - + "ataProtoP\001Z>cloud.google.com/go/aiplatfo" - + "rm/apiv1/aiplatformpb;aiplatformpb\252\002\032Goo" - + "gle.Cloud.AIPlatform.V1\312\002\032Google\\Cloud\\A" - + "IPlatform\\V1\352\002\035Google::Cloud::AIPlatform" - + "::V1b\006proto3" + + "putMetadata.Encoding\022\020\n\010modality\030\004 \001(\t\022l" + + "\n\024feature_value_domain\030\005 \001(\0132N.google.cl" + + "oud.vertexai.v1.ExplanationMetadata.Inpu" + + "tMetadata.FeatureValueDomain\022\033\n\023indices_" + + "tensor_name\030\006 \001(\t\022\037\n\027dense_shape_tensor_" + + "name\030\007 \001(\t\022\035\n\025index_feature_mapping\030\010 \003(" + + "\t\022\033\n\023encoded_tensor_name\030\t \001(\t\0221\n\021encode" + + "d_baselines\030\n \003(\0132\026.google.protobuf.Valu" + + "e\022`\n\rvisualization\030\013 \001(\0132I.google.cloud." + + "vertexai.v1.ExplanationMetadata.InputMet" + + "adata.Visualization\022\022\n\ngroup_name\030\014 \001(\t\032" + + "j\n\022FeatureValueDomain\022\021\n\tmin_value\030\001 \001(\002" + + "\022\021\n\tmax_value\030\002 \001(\002\022\025\n\roriginal_mean\030\003 \001" + + "(\002\022\027\n\017original_stddev\030\004 \001(\002\032\316\006\n\rVisualiz" + + "ation\022\\\n\004type\030\001 \001(\0162N.google.cloud.verte" + + "xai.v1.ExplanationMetadata.InputMetadata" + + ".Visualization.Type\022d\n\010polarity\030\002 \001(\0162R." + + "google.cloud.vertexai.v1.ExplanationMeta" + + "data.InputMetadata.Visualization.Polarit" + + "y\022e\n\tcolor_map\030\003 \001(\0162R.google.cloud.vert" + + "exai.v1.ExplanationMetadata.InputMetadat" + + "a.Visualization.ColorMap\022\037\n\027clip_percent" + + "_upperbound\030\004 \001(\002\022\037\n\027clip_percent_lowerb" + + "ound\030\005 \001(\002\022k\n\014overlay_type\030\006 \001(\0162U.googl" + + "e.cloud.vertexai.v1.ExplanationMetadata." + + "InputMetadata.Visualization.OverlayType\"" + + "6\n\004Type\022\024\n\020TYPE_UNSPECIFIED\020\000\022\n\n\006PIXELS\020" + + "\001\022\014\n\010OUTLINES\020\002\"J\n\010Polarity\022\030\n\024POLARITY_" + + "UNSPECIFIED\020\000\022\014\n\010POSITIVE\020\001\022\014\n\010NEGATIVE\020" + + "\002\022\010\n\004BOTH\020\003\"{\n\010ColorMap\022\031\n\025COLOR_MAP_UNS" + + "PECIFIED\020\000\022\016\n\nPINK_GREEN\020\001\022\013\n\007VIRIDIS\020\002\022" + + "\007\n\003RED\020\003\022\t\n\005GREEN\020\004\022\r\n\tRED_GREEN\020\006\022\024\n\020PI" + + "NK_WHITE_GREEN\020\005\"b\n\013OverlayType\022\034\n\030OVERL" + + "AY_TYPE_UNSPECIFIED\020\000\022\010\n\004NONE\020\001\022\014\n\010ORIGI" + + "NAL\020\002\022\r\n\tGRAYSCALE\020\003\022\016\n\nMASK_BLACK\020\004\"\240\001\n" + + "\010Encoding\022\030\n\024ENCODING_UNSPECIFIED\020\000\022\014\n\010I" + + "DENTITY\020\001\022\023\n\017BAG_OF_FEATURES\020\002\022\032\n\026BAG_OF" + + "_FEATURES_SPARSE\020\003\022\r\n\tINDICATOR\020\004\022\026\n\022COM" + + "BINED_EMBEDDING\020\005\022\024\n\020CONCAT_EMBEDDING\020\006\032" + + "\246\001\n\016OutputMetadata\022<\n\032index_display_name" + + "_mapping\030\001 \001(\0132\026.google.protobuf.ValueH\000" + + "\022\"\n\030display_name_mapping_key\030\002 \001(\tH\000\022\032\n\022" + + "output_tensor_name\030\003 \001(\tB\026\n\024display_name" + + "_mapping\032j\n\013InputsEntry\022\013\n\003key\030\001 \001(\t\022J\n\005" + + "value\030\002 \001(\0132;.google.cloud.vertexai.v1.E" + + "xplanationMetadata.InputMetadata:\0028\001\032l\n\014" + + "OutputsEntry\022\013\n\003key\030\001 \001(\t\022K\n\005value\030\002 \001(\013" + + "2<.google.cloud.vertexai.v1.ExplanationM" + + "etadata.OutputMetadata:\0028\001B\325\001\n\035com.googl" + + "e.cloud.vertexai.apiB\030ExplanationMetadat" + + "aProtoP\001Z>cloud.google.com/go/aiplatform" + + "/apiv1/aiplatformpb;aiplatformpb\252\002\032Googl" + + "e.Cloud.AIPlatform.V1\312\002\032Google\\Cloud\\AIP" + + "latform\\V1\352\002\035Google::Cloud::AIPlatform::" + + "V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationOrBuilder.java index a11f79caa1ca..b3451ba27823 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/explanation.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface ExplanationOrBuilder @@ -37,6 +38,14 @@ public interface ExplanationOrBuilder * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index] * can be used to identify which output this attribution is explaining. * + * By default, we provide Shapley values for the predicted class. However, + * you can configure the explanation request to generate Shapley values for + * any other classes too. For example, if a model predicts a probability of + * `0.4` for approving a loan application, the model's decision is to reject + * the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default + * Shapley values would be computed for rejection decision and not approval, + * even though the latter might be the positive class. + * * If users set * [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k], * the attributions are sorted by @@ -67,6 +76,14 @@ public interface ExplanationOrBuilder * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index] * can be used to identify which output this attribution is explaining. * + * By default, we provide Shapley values for the predicted class. However, + * you can configure the explanation request to generate Shapley values for + * any other classes too. For example, if a model predicts a probability of + * `0.4` for approving a loan application, the model's decision is to reject + * the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default + * Shapley values would be computed for rejection decision and not approval, + * even though the latter might be the positive class. + * * If users set * [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k], * the attributions are sorted by @@ -97,6 +114,14 @@ public interface ExplanationOrBuilder * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index] * can be used to identify which output this attribution is explaining. * + * By default, we provide Shapley values for the predicted class. However, + * you can configure the explanation request to generate Shapley values for + * any other classes too. For example, if a model predicts a probability of + * `0.4` for approving a loan application, the model's decision is to reject + * the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default + * Shapley values would be computed for rejection decision and not approval, + * even though the latter might be the positive class. + * * If users set * [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k], * the attributions are sorted by @@ -127,6 +152,14 @@ public interface ExplanationOrBuilder * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index] * can be used to identify which output this attribution is explaining. * + * By default, we provide Shapley values for the predicted class. However, + * you can configure the explanation request to generate Shapley values for + * any other classes too. For example, if a model predicts a probability of + * `0.4` for approving a loan application, the model's decision is to reject + * the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default + * Shapley values would be computed for rejection decision and not approval, + * even though the latter might be the positive class. + * * If users set * [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k], * the attributions are sorted by @@ -158,6 +191,14 @@ public interface ExplanationOrBuilder * [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index] * can be used to identify which output this attribution is explaining. * + * By default, we provide Shapley values for the predicted class. However, + * you can configure the explanation request to generate Shapley values for + * any other classes too. For example, if a model predicts a probability of + * `0.4` for approving a loan application, the model's decision is to reject + * the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default + * Shapley values would be computed for rejection decision and not approval, + * even though the latter might be the positive class. + * * If users set * [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k], * the attributions are sorted by diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationParameters.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationParameters.java index 36bc803757c5..ec010e60bbf0 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationParameters.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationParameters.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/explanation.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** @@ -60,6 +61,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.vertexai.api.ExplanationParameters.Builder.class); } + private int bitField0_; private int methodCase_ = 0; @SuppressWarnings("serial") @@ -420,7 +422,7 @@ public int getTopK() { */ @java.lang.Override public boolean hasOutputIndices() { - return outputIndices_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** * @@ -504,7 +506,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (topK_ != 0) { output.writeInt32(4, topK_); } - if (outputIndices_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(5, getOutputIndices()); } if (methodCase_ == 7) { @@ -537,7 +539,7 @@ public int getSerializedSize() { if (topK_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, topK_); } - if (outputIndices_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getOutputIndices()); } if (methodCase_ == 7) { @@ -751,10 +753,19 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.vertexai.api.ExplanationParameters.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getOutputIndicesFieldBuilder(); + } } @java.lang.Override @@ -821,10 +832,13 @@ private void buildPartial0(com.google.cloud.vertexai.api.ExplanationParameters r if (((from_bitField0_ & 0x00000010) != 0)) { result.topK_ = topK_; } + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000020) != 0)) { result.outputIndices_ = outputIndicesBuilder_ == null ? outputIndices_ : outputIndicesBuilder_.build(); + to_bitField0_ |= 0x00000001; } + result.bitField0_ |= to_bitField0_; } private void buildPartialOneofs(com.google.cloud.vertexai.api.ExplanationParameters result) { @@ -2240,8 +2254,10 @@ public Builder mergeOutputIndices(com.google.protobuf.ListValue value) { } else { outputIndicesBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000020; - onChanged(); + if (outputIndices_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } return this; } /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationParametersOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationParametersOrBuilder.java index 52bdd8c84733..fabe0a9b4c0d 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationParametersOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationParametersOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/explanation.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface ExplanationParametersOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationProto.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationProto.java index f07102b42cc8..8cefc18f9383 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationProto.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationProto.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/explanation.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public final class ExplanationProto { @@ -129,105 +130,105 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "pi/field_behavior.proto\0323google/cloud/ve" + "rtexai/v1/explanation_metadata.proto\032!go" + "ogle/cloud/vertexai/v1/io.proto\032\034google/" - + "protobuf/struct.proto\"\215\001\n\013Explanation\022A\n" + + "protobuf/struct.proto\"\213\001\n\013Explanation\022@\n" + "\014attributions\030\001 \003(\0132%.google.cloud.verte" - + "xai.v1.AttributionB\004\342A\001\003\022;\n\tneighbors\030\002 " - + "\003(\0132\".google.cloud.vertexai.v1.NeighborB" - + "\004\342A\001\003\"Z\n\020ModelExplanation\022F\n\021mean_attrib" - + "utions\030\001 \003(\0132%.google.cloud.vertexai.v1." - + "AttributionB\004\342A\001\003\"\220\002\n\013Attribution\022#\n\025bas" - + "eline_output_value\030\001 \001(\001B\004\342A\001\003\022#\n\025instan" - + "ce_output_value\030\002 \001(\001B\004\342A\001\003\022:\n\024feature_a" - + "ttributions\030\003 \001(\0132\026.google.protobuf.Valu" - + "eB\004\342A\001\003\022\032\n\014output_index\030\004 \003(\005B\004\342A\001\003\022!\n\023o" - + "utput_display_name\030\005 \001(\tB\004\342A\001\003\022!\n\023approx" - + "imation_error\030\006 \001(\001B\004\342A\001\003\022\031\n\013output_name" - + "\030\007 \001(\tB\004\342A\001\003\"F\n\010Neighbor\022\031\n\013neighbor_id\030" - + "\001 \001(\tB\004\342A\001\003\022\037\n\021neighbor_distance\030\002 \001(\001B\004" - + "\342A\001\003\"\243\001\n\017ExplanationSpec\022I\n\nparameters\030\001" - + " \001(\0132/.google.cloud.vertexai.v1.Explanat" - + "ionParametersB\004\342A\001\002\022E\n\010metadata\030\002 \001(\0132-." - + "google.cloud.vertexai.v1.ExplanationMeta" - + "dataB\004\342A\001\001\"\245\003\n\025ExplanationParameters\022Z\n\033" - + "sampled_shapley_attribution\030\001 \001(\01323.goog" - + "le.cloud.vertexai.v1.SampledShapleyAttri" - + "butionH\000\022d\n integrated_gradients_attribu" - + "tion\030\002 \001(\01328.google.cloud.vertexai.v1.In" - + "tegratedGradientsAttributionH\000\022E\n\020xrai_a" - + "ttribution\030\003 \001(\0132).google.cloud.vertexai" - + ".v1.XraiAttributionH\000\0226\n\010examples\030\007 \001(\0132" - + "\".google.cloud.vertexai.v1.ExamplesH\000\022\r\n" - + "\005top_k\030\004 \001(\005\0222\n\016output_indices\030\005 \001(\0132\032.g" - + "oogle.protobuf.ListValueB\010\n\006method\"5\n\031Sa" - + "mpledShapleyAttribution\022\030\n\npath_count\030\001 " - + "\001(\005B\004\342A\001\002\"\316\001\n\036IntegratedGradientsAttribu" - + "tion\022\030\n\nstep_count\030\001 \001(\005B\004\342A\001\002\022F\n\022smooth" - + "_grad_config\030\002 \001(\0132*.google.cloud.vertex" - + "ai.v1.SmoothGradConfig\022J\n\024blur_baseline_" - + "config\030\003 \001(\0132,.google.cloud.vertexai.v1." - + "BlurBaselineConfig\"\277\001\n\017XraiAttribution\022\030" - + "\n\nstep_count\030\001 \001(\005B\004\342A\001\002\022F\n\022smooth_grad_" - + "config\030\002 \001(\0132*.google.cloud.vertexai.v1." - + "SmoothGradConfig\022J\n\024blur_baseline_config" - + "\030\003 \001(\0132,.google.cloud.vertexai.v1.BlurBa" - + "selineConfig\"\247\001\n\020SmoothGradConfig\022\025\n\013noi" - + "se_sigma\030\001 \001(\002H\000\022J\n\023feature_noise_sigma\030" - + "\002 \001(\0132+.google.cloud.vertexai.v1.Feature" - + "NoiseSigmaH\000\022\032\n\022noisy_sample_count\030\003 \001(\005" - + "B\024\n\022GradientNoiseSigma\"\237\001\n\021FeatureNoiseS" - + "igma\022U\n\013noise_sigma\030\001 \003(\0132@.google.cloud" - + ".vertexai.v1.FeatureNoiseSigma.NoiseSigm" - + "aForFeature\0323\n\024NoiseSigmaForFeature\022\014\n\004n" - + "ame\030\001 \001(\t\022\r\n\005sigma\030\002 \001(\002\",\n\022BlurBaseline" - + "Config\022\026\n\016max_blur_sigma\030\001 \001(\002\"\332\003\n\010Examp" - + "les\022Q\n\022example_gcs_source\030\005 \001(\01323.google" - + ".cloud.vertexai.v1.Examples.ExampleGcsSo" - + "urceH\000\022@\n\036nearest_neighbor_search_config" - + "\030\002 \001(\0132\026.google.protobuf.ValueH\001\0224\n\007pres" - + "ets\030\004 \001(\0132!.google.cloud.vertexai.v1.Pre" - + "setsH\001\022\026\n\016neighbor_count\030\003 \001(\005\032\326\001\n\020Examp" - + "leGcsSource\022S\n\013data_format\030\001 \001(\0162>.googl" - + "e.cloud.vertexai.v1.Examples.ExampleGcsS" - + "ource.DataFormat\0227\n\ngcs_source\030\002 \001(\0132#.g" - + "oogle.cloud.vertexai.v1.GcsSource\"4\n\nDat" - + "aFormat\022\033\n\027DATA_FORMAT_UNSPECIFIED\020\000\022\t\n\005" - + "JSONL\020\001B\010\n\006sourceB\010\n\006config\"\366\001\n\007Presets\022" - + ";\n\005query\030\001 \001(\0162\'.google.cloud.vertexai.v" - + "1.Presets.QueryH\000\210\001\001\022<\n\010modality\030\002 \001(\0162*" - + ".google.cloud.vertexai.v1.Presets.Modali" - + "ty\"\036\n\005Query\022\013\n\007PRECISE\020\000\022\010\n\004FAST\020\001\"F\n\010Mo" - + "dality\022\030\n\024MODALITY_UNSPECIFIED\020\000\022\t\n\005IMAG" - + "E\020\001\022\010\n\004TEXT\020\002\022\013\n\007TABULAR\020\003B\010\n\006_query\"\356\001\n" - + "\027ExplanationSpecOverride\022C\n\nparameters\030\001" - + " \001(\0132/.google.cloud.vertexai.v1.Explanat" - + "ionParameters\022G\n\010metadata\030\002 \001(\01325.google" - + ".cloud.vertexai.v1.ExplanationMetadataOv" - + "erride\022E\n\021examples_override\030\003 \001(\0132*.goog" - + "le.cloud.vertexai.v1.ExamplesOverride\"\274\002" - + "\n\033ExplanationMetadataOverride\022W\n\006inputs\030" - + "\001 \003(\0132A.google.cloud.vertexai.v1.Explana" - + "tionMetadataOverride.InputsEntryB\004\342A\001\002\032H" - + "\n\025InputMetadataOverride\022/\n\017input_baselin" - + "es\030\001 \003(\0132\026.google.protobuf.Value\032z\n\013Inpu" - + "tsEntry\022\013\n\003key\030\001 \001(\t\022Z\n\005value\030\002 \001(\0132K.go" - + "ogle.cloud.vertexai.v1.ExplanationMetada" - + "taOverride.InputMetadataOverride:\0028\001\"\302\002\n" - + "\020ExamplesOverride\022\026\n\016neighbor_count\030\001 \001(" - + "\005\022\026\n\016crowding_count\030\002 \001(\005\022M\n\014restriction" - + "s\030\003 \003(\01327.google.cloud.vertexai.v1.Examp" - + "lesRestrictionsNamespace\022\031\n\021return_embed" - + "dings\030\004 \001(\010\022J\n\013data_format\030\005 \001(\01625.googl" - + "e.cloud.vertexai.v1.ExamplesOverride.Dat" - + "aFormat\"H\n\nDataFormat\022\033\n\027DATA_FORMAT_UNS" - + "PECIFIED\020\000\022\r\n\tINSTANCES\020\001\022\016\n\nEMBEDDINGS\020" - + "\002\"T\n\035ExamplesRestrictionsNamespace\022\026\n\016na" - + "mespace_name\030\001 \001(\t\022\r\n\005allow\030\002 \003(\t\022\014\n\004den" - + "y\030\003 \003(\tB\315\001\n\035com.google.cloud.vertexai.ap" - + "iB\020ExplanationProtoP\001Z>cloud.google.com/" - + "go/aiplatform/apiv1/aiplatformpb;aiplatf" - + "ormpb\252\002\032Google.Cloud.AIPlatform.V1\312\002\032Goo" - + "gle\\Cloud\\AIPlatform\\V1\352\002\035Google::Cloud:" - + ":AIPlatform::V1b\006proto3" + + "xai.v1.AttributionB\003\340A\003\022:\n\tneighbors\030\002 \003" + + "(\0132\".google.cloud.vertexai.v1.NeighborB\003" + + "\340A\003\"Y\n\020ModelExplanation\022E\n\021mean_attribut" + + "ions\030\001 \003(\0132%.google.cloud.vertexai.v1.At" + + "tributionB\003\340A\003\"\211\002\n\013Attribution\022\"\n\025baseli" + + "ne_output_value\030\001 \001(\001B\003\340A\003\022\"\n\025instance_o" + + "utput_value\030\002 \001(\001B\003\340A\003\0229\n\024feature_attrib" + + "utions\030\003 \001(\0132\026.google.protobuf.ValueB\003\340A" + + "\003\022\031\n\014output_index\030\004 \003(\005B\003\340A\003\022 \n\023output_d" + + "isplay_name\030\005 \001(\tB\003\340A\003\022 \n\023approximation_" + + "error\030\006 \001(\001B\003\340A\003\022\030\n\013output_name\030\007 \001(\tB\003\340" + + "A\003\"D\n\010Neighbor\022\030\n\013neighbor_id\030\001 \001(\tB\003\340A\003" + + "\022\036\n\021neighbor_distance\030\002 \001(\001B\003\340A\003\"\241\001\n\017Exp" + + "lanationSpec\022H\n\nparameters\030\001 \001(\0132/.googl" + + "e.cloud.vertexai.v1.ExplanationParameter" + + "sB\003\340A\002\022D\n\010metadata\030\002 \001(\0132-.google.cloud." + + "vertexai.v1.ExplanationMetadataB\003\340A\001\"\245\003\n" + + "\025ExplanationParameters\022Z\n\033sampled_shaple" + + "y_attribution\030\001 \001(\01323.google.cloud.verte" + + "xai.v1.SampledShapleyAttributionH\000\022d\n in" + + "tegrated_gradients_attribution\030\002 \001(\01328.g" + + "oogle.cloud.vertexai.v1.IntegratedGradie" + + "ntsAttributionH\000\022E\n\020xrai_attribution\030\003 \001" + + "(\0132).google.cloud.vertexai.v1.XraiAttrib" + + "utionH\000\0226\n\010examples\030\007 \001(\0132\".google.cloud" + + ".vertexai.v1.ExamplesH\000\022\r\n\005top_k\030\004 \001(\005\0222" + + "\n\016output_indices\030\005 \001(\0132\032.google.protobuf" + + ".ListValueB\010\n\006method\"4\n\031SampledShapleyAt" + + "tribution\022\027\n\npath_count\030\001 \001(\005B\003\340A\002\"\315\001\n\036I" + + "ntegratedGradientsAttribution\022\027\n\nstep_co" + + "unt\030\001 \001(\005B\003\340A\002\022F\n\022smooth_grad_config\030\002 \001" + + "(\0132*.google.cloud.vertexai.v1.SmoothGrad" + + "Config\022J\n\024blur_baseline_config\030\003 \001(\0132,.g" + + "oogle.cloud.vertexai.v1.BlurBaselineConf" + + "ig\"\276\001\n\017XraiAttribution\022\027\n\nstep_count\030\001 \001" + + "(\005B\003\340A\002\022F\n\022smooth_grad_config\030\002 \001(\0132*.go" + + "ogle.cloud.vertexai.v1.SmoothGradConfig\022" + + "J\n\024blur_baseline_config\030\003 \001(\0132,.google.c" + + "loud.vertexai.v1.BlurBaselineConfig\"\247\001\n\020" + + "SmoothGradConfig\022\025\n\013noise_sigma\030\001 \001(\002H\000\022" + + "J\n\023feature_noise_sigma\030\002 \001(\0132+.google.cl" + + "oud.vertexai.v1.FeatureNoiseSigmaH\000\022\032\n\022n" + + "oisy_sample_count\030\003 \001(\005B\024\n\022GradientNoise" + + "Sigma\"\237\001\n\021FeatureNoiseSigma\022U\n\013noise_sig" + + "ma\030\001 \003(\0132@.google.cloud.vertexai.v1.Feat" + + "ureNoiseSigma.NoiseSigmaForFeature\0323\n\024No" + + "iseSigmaForFeature\022\014\n\004name\030\001 \001(\t\022\r\n\005sigm" + + "a\030\002 \001(\002\",\n\022BlurBaselineConfig\022\026\n\016max_blu" + + "r_sigma\030\001 \001(\002\"\332\003\n\010Examples\022Q\n\022example_gc" + + "s_source\030\005 \001(\01323.google.cloud.vertexai.v" + + "1.Examples.ExampleGcsSourceH\000\022@\n\036nearest" + + "_neighbor_search_config\030\002 \001(\0132\026.google.p" + + "rotobuf.ValueH\001\0224\n\007presets\030\004 \001(\0132!.googl" + + "e.cloud.vertexai.v1.PresetsH\001\022\026\n\016neighbo" + + "r_count\030\003 \001(\005\032\326\001\n\020ExampleGcsSource\022S\n\013da" + + "ta_format\030\001 \001(\0162>.google.cloud.vertexai." + + "v1.Examples.ExampleGcsSource.DataFormat\022" + + "7\n\ngcs_source\030\002 \001(\0132#.google.cloud.verte" + + "xai.v1.GcsSource\"4\n\nDataFormat\022\033\n\027DATA_F" + + "ORMAT_UNSPECIFIED\020\000\022\t\n\005JSONL\020\001B\010\n\006source" + + "B\010\n\006config\"\366\001\n\007Presets\022;\n\005query\030\001 \001(\0162\'." + + "google.cloud.vertexai.v1.Presets.QueryH\000" + + "\210\001\001\022<\n\010modality\030\002 \001(\0162*.google.cloud.ver" + + "texai.v1.Presets.Modality\"\036\n\005Query\022\013\n\007PR" + + "ECISE\020\000\022\010\n\004FAST\020\001\"F\n\010Modality\022\030\n\024MODALIT" + + "Y_UNSPECIFIED\020\000\022\t\n\005IMAGE\020\001\022\010\n\004TEXT\020\002\022\013\n\007" + + "TABULAR\020\003B\010\n\006_query\"\356\001\n\027ExplanationSpecO" + + "verride\022C\n\nparameters\030\001 \001(\0132/.google.clo" + + "ud.vertexai.v1.ExplanationParameters\022G\n\010" + + "metadata\030\002 \001(\01325.google.cloud.vertexai.v" + + "1.ExplanationMetadataOverride\022E\n\021example" + + "s_override\030\003 \001(\0132*.google.cloud.vertexai" + + ".v1.ExamplesOverride\"\273\002\n\033ExplanationMeta" + + "dataOverride\022V\n\006inputs\030\001 \003(\0132A.google.cl" + + "oud.vertexai.v1.ExplanationMetadataOverr" + + "ide.InputsEntryB\003\340A\002\032H\n\025InputMetadataOve" + + "rride\022/\n\017input_baselines\030\001 \003(\0132\026.google." + + "protobuf.Value\032z\n\013InputsEntry\022\013\n\003key\030\001 \001" + + "(\t\022Z\n\005value\030\002 \001(\0132K.google.cloud.vertexa" + + "i.v1.ExplanationMetadataOverride.InputMe" + + "tadataOverride:\0028\001\"\302\002\n\020ExamplesOverride\022" + + "\026\n\016neighbor_count\030\001 \001(\005\022\026\n\016crowding_coun" + + "t\030\002 \001(\005\022M\n\014restrictions\030\003 \003(\01327.google.c" + + "loud.vertexai.v1.ExamplesRestrictionsNam" + + "espace\022\031\n\021return_embeddings\030\004 \001(\010\022J\n\013dat" + + "a_format\030\005 \001(\01625.google.cloud.vertexai.v" + + "1.ExamplesOverride.DataFormat\"H\n\nDataFor" + + "mat\022\033\n\027DATA_FORMAT_UNSPECIFIED\020\000\022\r\n\tINST" + + "ANCES\020\001\022\016\n\nEMBEDDINGS\020\002\"T\n\035ExamplesRestr" + + "ictionsNamespace\022\026\n\016namespace_name\030\001 \001(\t" + + "\022\r\n\005allow\030\002 \003(\t\022\014\n\004deny\030\003 \003(\tB\315\001\n\035com.go" + + "ogle.cloud.vertexai.apiB\020ExplanationProt" + + "oP\001Z>cloud.google.com/go/aiplatform/apiv" + + "1/aiplatformpb;aiplatformpb\252\002\032Google.Clo" + + "ud.AIPlatform.V1\312\002\032Google\\Cloud\\AIPlatfo" + + "rm\\V1\352\002\035Google::Cloud::AIPlatform::V1b\006p" + + "roto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -383,7 +384,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_vertexai_v1_Presets_descriptor, new java.lang.String[] { - "Query", "Modality", "Query", + "Query", "Modality", }); internal_static_google_cloud_vertexai_v1_ExplanationSpecOverride_descriptor = getDescriptor().getMessageTypes().get(14); diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationSpec.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationSpec.java index de5bad83dbaa..3fdb98d0f113 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationSpec.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationSpec.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/explanation.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** @@ -60,6 +61,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.vertexai.api.ExplanationSpec.Builder.class); } + private int bitField0_; public static final int PARAMETERS_FIELD_NUMBER = 1; private com.google.cloud.vertexai.api.ExplanationParameters parameters_; /** @@ -77,7 +79,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { */ @java.lang.Override public boolean hasParameters() { - return parameters_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** * @@ -133,7 +135,7 @@ public com.google.cloud.vertexai.api.ExplanationParametersOrBuilder getParameter */ @java.lang.Override public boolean hasMetadata() { - return metadata_ != null; + return ((bitField0_ & 0x00000002) != 0); } /** * @@ -186,10 +188,10 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (parameters_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(1, getParameters()); } - if (metadata_ != null) { + if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(2, getMetadata()); } getUnknownFields().writeTo(output); @@ -201,10 +203,10 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (parameters_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getParameters()); } - if (metadata_ != null) { + if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getMetadata()); } size += getUnknownFields().getSerializedSize(); @@ -379,10 +381,20 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.vertexai.api.ExplanationSpec.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getParametersFieldBuilder(); + getMetadataFieldBuilder(); + } } @java.lang.Override @@ -435,12 +447,16 @@ public com.google.cloud.vertexai.api.ExplanationSpec buildPartial() { private void buildPartial0(com.google.cloud.vertexai.api.ExplanationSpec result) { int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.parameters_ = parametersBuilder_ == null ? parameters_ : parametersBuilder_.build(); + to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000002) != 0)) { result.metadata_ = metadataBuilder_ == null ? metadata_ : metadataBuilder_.build(); + to_bitField0_ |= 0x00000002; } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -665,8 +681,10 @@ public Builder mergeParameters(com.google.cloud.vertexai.api.ExplanationParamete } else { parametersBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000001; - onChanged(); + if (parameters_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } return this; } /** @@ -868,8 +886,10 @@ public Builder mergeMetadata(com.google.cloud.vertexai.api.ExplanationMetadata v } else { metadataBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000002; - onChanged(); + if (metadata_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } return this; } /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationSpecOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationSpecOrBuilder.java index ef1408e902a7..877d2f5eecfa 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationSpecOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationSpecOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/explanation.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface ExplanationSpecOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationSpecOverride.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationSpecOverride.java index e232e2ce9d0b..6bce1245692d 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationSpecOverride.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationSpecOverride.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/explanation.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** @@ -62,6 +63,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.vertexai.api.ExplanationSpecOverride.Builder.class); } + private int bitField0_; public static final int PARAMETERS_FIELD_NUMBER = 1; private com.google.cloud.vertexai.api.ExplanationParameters parameters_; /** @@ -79,7 +81,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { */ @java.lang.Override public boolean hasParameters() { - return parameters_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** * @@ -133,7 +135,7 @@ public com.google.cloud.vertexai.api.ExplanationParametersOrBuilder getParameter */ @java.lang.Override public boolean hasMetadata() { - return metadata_ != null; + return ((bitField0_ & 0x00000002) != 0); } /** * @@ -183,7 +185,7 @@ public com.google.cloud.vertexai.api.ExplanationMetadataOverrideOrBuilder getMet */ @java.lang.Override public boolean hasExamplesOverride() { - return examplesOverride_ != null; + return ((bitField0_ & 0x00000004) != 0); } /** * @@ -232,13 +234,13 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (parameters_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(1, getParameters()); } - if (metadata_ != null) { + if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(2, getMetadata()); } - if (examplesOverride_ != null) { + if (((bitField0_ & 0x00000004) != 0)) { output.writeMessage(3, getExamplesOverride()); } getUnknownFields().writeTo(output); @@ -250,13 +252,13 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (parameters_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getParameters()); } - if (metadata_ != null) { + if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getMetadata()); } - if (examplesOverride_ != null) { + if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getExamplesOverride()); } size += getUnknownFields().getSerializedSize(); @@ -442,10 +444,21 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.vertexai.api.ExplanationSpecOverride.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getParametersFieldBuilder(); + getMetadataFieldBuilder(); + getExamplesOverrideFieldBuilder(); + } } @java.lang.Override @@ -503,16 +516,21 @@ public com.google.cloud.vertexai.api.ExplanationSpecOverride buildPartial() { private void buildPartial0(com.google.cloud.vertexai.api.ExplanationSpecOverride result) { int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.parameters_ = parametersBuilder_ == null ? parameters_ : parametersBuilder_.build(); + to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000002) != 0)) { result.metadata_ = metadataBuilder_ == null ? metadata_ : metadataBuilder_.build(); + to_bitField0_ |= 0x00000002; } if (((from_bitField0_ & 0x00000004) != 0)) { result.examplesOverride_ = examplesOverrideBuilder_ == null ? examplesOverride_ : examplesOverrideBuilder_.build(); + to_bitField0_ |= 0x00000004; } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -748,8 +766,10 @@ public Builder mergeParameters(com.google.cloud.vertexai.api.ExplanationParamete } else { parametersBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000001; - onChanged(); + if (parameters_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } return this; } /** @@ -941,8 +961,10 @@ public Builder mergeMetadata(com.google.cloud.vertexai.api.ExplanationMetadataOv } else { metadataBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000002; - onChanged(); + if (metadata_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } return this; } /** @@ -1127,8 +1149,10 @@ public Builder mergeExamplesOverride(com.google.cloud.vertexai.api.ExamplesOverr } else { examplesOverrideBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000004; - onChanged(); + if (examplesOverride_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } return this; } /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationSpecOverrideOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationSpecOverrideOrBuilder.java index f9ae78fad97b..5b362f3dc496 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationSpecOverrideOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ExplanationSpecOverrideOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/explanation.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface ExplanationSpecOverrideOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FeatureNoiseSigma.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FeatureNoiseSigma.java index 27dbd09d9739..a80a4b47a4fc 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FeatureNoiseSigma.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FeatureNoiseSigma.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/explanation.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FeatureNoiseSigmaOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FeatureNoiseSigmaOrBuilder.java index c4ff5ab33304..e26ef0f8cf9e 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FeatureNoiseSigmaOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FeatureNoiseSigmaOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/explanation.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface FeatureNoiseSigmaOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FileData.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FileData.java index 0367acec68d0..2686835dba76 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FileData.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FileData.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/content.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FileDataOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FileDataOrBuilder.java index 8a5c493160e5..f3f930a29646 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FileDataOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FileDataOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/content.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface FileDataOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionCall.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionCall.java index 46d75e3a29d3..4ade083a520f 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionCall.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionCall.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/tool.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** @@ -64,6 +65,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.vertexai.api.FunctionCall.Builder.class); } + private int bitField0_; public static final int NAME_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -133,7 +135,7 @@ public com.google.protobuf.ByteString getNameBytes() { */ @java.lang.Override public boolean hasArgs() { - return args_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** * @@ -183,7 +185,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - if (args_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getArgs()); } getUnknownFields().writeTo(output); @@ -198,7 +200,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - if (args_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getArgs()); } size += getUnknownFields().getSerializedSize(); @@ -370,10 +372,19 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.vertexai.api.FunctionCall.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getArgsFieldBuilder(); + } } @java.lang.Override @@ -425,9 +436,12 @@ private void buildPartial0(com.google.cloud.vertexai.api.FunctionCall result) { if (((from_bitField0_ & 0x00000001) != 0)) { result.name_ = name_; } + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000002) != 0)) { result.args_ = argsBuilder_ == null ? args_ : argsBuilder_.build(); + to_bitField0_ |= 0x00000001; } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -756,8 +770,10 @@ public Builder mergeArgs(com.google.protobuf.Struct value) { } else { argsBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000002; - onChanged(); + if (args_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } return this; } /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionCallOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionCallOrBuilder.java index 6668c5ec58bb..4881325cb95f 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionCallOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionCallOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/tool.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface FunctionCallOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionDeclaration.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionDeclaration.java index 9a27ab426461..46715e1a53d2 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionDeclaration.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionDeclaration.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/tool.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** @@ -67,6 +68,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.vertexai.api.FunctionDeclaration.Builder.class); } + private int bitField0_; public static final int NAME_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -205,7 +207,7 @@ public com.google.protobuf.ByteString getDescriptionBytes() { */ @java.lang.Override public boolean hasParameters() { - return parameters_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** * @@ -286,7 +288,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); } - if (parameters_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(3, getParameters()); } getUnknownFields().writeTo(output); @@ -304,7 +306,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); } - if (parameters_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getParameters()); } size += getUnknownFields().getSerializedSize(); @@ -481,10 +483,19 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.vertexai.api.FunctionDeclaration.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getParametersFieldBuilder(); + } } @java.lang.Override @@ -540,9 +551,12 @@ private void buildPartial0(com.google.cloud.vertexai.api.FunctionDeclaration res if (((from_bitField0_ & 0x00000002) != 0)) { result.description_ = description_; } + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000004) != 0)) { result.parameters_ = parametersBuilder_ == null ? parameters_ : parametersBuilder_.build(); + to_bitField0_ |= 0x00000001; } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -1066,8 +1080,10 @@ public Builder mergeParameters(com.google.cloud.vertexai.api.Schema value) { } else { parametersBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000004; - onChanged(); + if (parameters_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } return this; } /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionDeclarationOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionDeclarationOrBuilder.java index 4af75219e7ac..64dc5e4b4deb 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionDeclarationOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionDeclarationOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/tool.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface FunctionDeclarationOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionResponse.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionResponse.java index c57520814ea2..49a0860df37d 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionResponse.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionResponse.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/tool.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** @@ -65,6 +66,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.vertexai.api.FunctionResponse.Builder.class); } + private int bitField0_; public static final int NAME_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -133,7 +135,7 @@ public com.google.protobuf.ByteString getNameBytes() { */ @java.lang.Override public boolean hasResponse() { - return response_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** * @@ -181,7 +183,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - if (response_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getResponse()); } getUnknownFields().writeTo(output); @@ -196,7 +198,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - if (response_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getResponse()); } size += getUnknownFields().getSerializedSize(); @@ -369,10 +371,19 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.vertexai.api.FunctionResponse.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getResponseFieldBuilder(); + } } @java.lang.Override @@ -424,9 +435,12 @@ private void buildPartial0(com.google.cloud.vertexai.api.FunctionResponse result if (((from_bitField0_ & 0x00000001) != 0)) { result.name_ = name_; } + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000002) != 0)) { result.response_ = responseBuilder_ == null ? response_ : responseBuilder_.build(); + to_bitField0_ |= 0x00000001; } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -750,8 +764,10 @@ public Builder mergeResponse(com.google.protobuf.Struct value) { } else { responseBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000002; - onChanged(); + if (response_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } return this; } /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionResponseOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionResponseOrBuilder.java index 9e20fc8e84e6..61c209b8801e 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionResponseOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/FunctionResponseOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/tool.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface FunctionResponseOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GcsDestination.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GcsDestination.java index 8d23b7eca5d3..18fff1de8e03 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GcsDestination.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GcsDestination.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/io.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GcsDestinationOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GcsDestinationOrBuilder.java index 111a4faba8d8..afa51b0d4cd7 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GcsDestinationOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GcsDestinationOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/io.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface GcsDestinationOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GcsSource.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GcsSource.java index 71d1bd9383df..fe75b86a0078 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GcsSource.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GcsSource.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/io.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GcsSourceOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GcsSourceOrBuilder.java index 0ad3c779ec36..a9b422e997f9 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GcsSourceOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GcsSourceOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/io.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface GcsSourceOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenerateContentRequest.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenerateContentRequest.java index 4657b41497e2..72eff22ca758 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenerateContentRequest.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenerateContentRequest.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/prediction_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** @@ -65,6 +66,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.vertexai.api.GenerateContentRequest.Builder.class); } + private int bitField0_; public static final int MODEL_FIELD_NUMBER = 5; @SuppressWarnings("serial") @@ -234,8 +236,7 @@ public com.google.cloud.vertexai.api.ContentOrBuilder getContentsOrBuilder(int i * * A `Tool` is a piece of code that enables the system to interact with * external systems to perform an action, or set of actions, outside of - * knowledge and scope of the model. The only supported tool is currently - * `Function` + * knowledge and scope of the model. * * * @@ -255,8 +256,7 @@ public java.util.List getToolsList() { * * A `Tool` is a piece of code that enables the system to interact with * external systems to perform an action, or set of actions, outside of - * knowledge and scope of the model. The only supported tool is currently - * `Function` + * knowledge and scope of the model. * * * @@ -277,8 +277,7 @@ public java.util.List getToolsList() { * * A `Tool` is a piece of code that enables the system to interact with * external systems to perform an action, or set of actions, outside of - * knowledge and scope of the model. The only supported tool is currently - * `Function` + * knowledge and scope of the model. * * * @@ -298,8 +297,7 @@ public int getToolsCount() { * * A `Tool` is a piece of code that enables the system to interact with * external systems to perform an action, or set of actions, outside of - * knowledge and scope of the model. The only supported tool is currently - * `Function` + * knowledge and scope of the model. * * * @@ -319,8 +317,7 @@ public com.google.cloud.vertexai.api.Tool getTools(int index) { * * A `Tool` is a piece of code that enables the system to interact with * external systems to perform an action, or set of actions, outside of - * knowledge and scope of the model. The only supported tool is currently - * `Function` + * knowledge and scope of the model. * * * @@ -436,7 +433,7 @@ public com.google.cloud.vertexai.api.SafetySettingOrBuilder getSafetySettingsOrB */ @java.lang.Override public boolean hasGenerationConfig() { - return generationConfig_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** * @@ -495,7 +492,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < safetySettings_.size(); i++) { output.writeMessage(3, safetySettings_.get(i)); } - if (generationConfig_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(4, getGenerationConfig()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { @@ -519,7 +516,7 @@ public int getSerializedSize() { for (int i = 0; i < safetySettings_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, safetySettings_.get(i)); } - if (generationConfig_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getGenerationConfig()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { @@ -710,10 +707,22 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.vertexai.api.GenerateContentRequest.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getContentsFieldBuilder(); + getToolsFieldBuilder(); + getSafetySettingsFieldBuilder(); + getGenerationConfigFieldBuilder(); + } } @java.lang.Override @@ -818,10 +827,13 @@ private void buildPartial0(com.google.cloud.vertexai.api.GenerateContentRequest if (((from_bitField0_ & 0x00000001) != 0)) { result.model_ = model_; } + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000010) != 0)) { result.generationConfig_ = generationConfigBuilder_ == null ? generationConfig_ : generationConfigBuilder_.build(); + to_bitField0_ |= 0x00000001; } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -1653,8 +1665,7 @@ private void ensureToolsIsMutable() { * * A `Tool` is a piece of code that enables the system to interact with * external systems to perform an action, or set of actions, outside of - * knowledge and scope of the model. The only supported tool is currently - * `Function` + * knowledge and scope of the model. * * * @@ -1677,8 +1688,7 @@ public java.util.List getToolsList() { * * A `Tool` is a piece of code that enables the system to interact with * external systems to perform an action, or set of actions, outside of - * knowledge and scope of the model. The only supported tool is currently - * `Function` + * knowledge and scope of the model. * * * @@ -1701,8 +1711,7 @@ public int getToolsCount() { * * A `Tool` is a piece of code that enables the system to interact with * external systems to perform an action, or set of actions, outside of - * knowledge and scope of the model. The only supported tool is currently - * `Function` + * knowledge and scope of the model. * * * @@ -1725,8 +1734,7 @@ public com.google.cloud.vertexai.api.Tool getTools(int index) { * * A `Tool` is a piece of code that enables the system to interact with * external systems to perform an action, or set of actions, outside of - * knowledge and scope of the model. The only supported tool is currently - * `Function` + * knowledge and scope of the model. * * * @@ -1755,8 +1763,7 @@ public Builder setTools(int index, com.google.cloud.vertexai.api.Tool value) { * * A `Tool` is a piece of code that enables the system to interact with * external systems to perform an action, or set of actions, outside of - * knowledge and scope of the model. The only supported tool is currently - * `Function` + * knowledge and scope of the model. * * * @@ -1782,8 +1789,7 @@ public Builder setTools(int index, com.google.cloud.vertexai.api.Tool.Builder bu * * A `Tool` is a piece of code that enables the system to interact with * external systems to perform an action, or set of actions, outside of - * knowledge and scope of the model. The only supported tool is currently - * `Function` + * knowledge and scope of the model. * * * @@ -1812,8 +1818,7 @@ public Builder addTools(com.google.cloud.vertexai.api.Tool value) { * * A `Tool` is a piece of code that enables the system to interact with * external systems to perform an action, or set of actions, outside of - * knowledge and scope of the model. The only supported tool is currently - * `Function` + * knowledge and scope of the model. * * * @@ -1842,8 +1847,7 @@ public Builder addTools(int index, com.google.cloud.vertexai.api.Tool value) { * * A `Tool` is a piece of code that enables the system to interact with * external systems to perform an action, or set of actions, outside of - * knowledge and scope of the model. The only supported tool is currently - * `Function` + * knowledge and scope of the model. * * * @@ -1869,8 +1873,7 @@ public Builder addTools(com.google.cloud.vertexai.api.Tool.Builder builderForVal * * A `Tool` is a piece of code that enables the system to interact with * external systems to perform an action, or set of actions, outside of - * knowledge and scope of the model. The only supported tool is currently - * `Function` + * knowledge and scope of the model. * * * @@ -1896,8 +1899,7 @@ public Builder addTools(int index, com.google.cloud.vertexai.api.Tool.Builder bu * * A `Tool` is a piece of code that enables the system to interact with * external systems to perform an action, or set of actions, outside of - * knowledge and scope of the model. The only supported tool is currently - * `Function` + * knowledge and scope of the model. * * * @@ -1924,8 +1926,7 @@ public Builder addAllTools( * * A `Tool` is a piece of code that enables the system to interact with * external systems to perform an action, or set of actions, outside of - * knowledge and scope of the model. The only supported tool is currently - * `Function` + * knowledge and scope of the model. * * * @@ -1951,8 +1952,7 @@ public Builder clearTools() { * * A `Tool` is a piece of code that enables the system to interact with * external systems to perform an action, or set of actions, outside of - * knowledge and scope of the model. The only supported tool is currently - * `Function` + * knowledge and scope of the model. * * * @@ -1978,8 +1978,7 @@ public Builder removeTools(int index) { * * A `Tool` is a piece of code that enables the system to interact with * external systems to perform an action, or set of actions, outside of - * knowledge and scope of the model. The only supported tool is currently - * `Function` + * knowledge and scope of the model. * * * @@ -1998,8 +1997,7 @@ public com.google.cloud.vertexai.api.Tool.Builder getToolsBuilder(int index) { * * A `Tool` is a piece of code that enables the system to interact with * external systems to perform an action, or set of actions, outside of - * knowledge and scope of the model. The only supported tool is currently - * `Function` + * knowledge and scope of the model. * * * @@ -2022,8 +2020,7 @@ public com.google.cloud.vertexai.api.ToolOrBuilder getToolsOrBuilder(int index) * * A `Tool` is a piece of code that enables the system to interact with * external systems to perform an action, or set of actions, outside of - * knowledge and scope of the model. The only supported tool is currently - * `Function` + * knowledge and scope of the model. * * * @@ -2047,8 +2044,7 @@ public com.google.cloud.vertexai.api.ToolOrBuilder getToolsOrBuilder(int index) * * A `Tool` is a piece of code that enables the system to interact with * external systems to perform an action, or set of actions, outside of - * knowledge and scope of the model. The only supported tool is currently - * `Function` + * knowledge and scope of the model. * * * @@ -2068,8 +2064,7 @@ public com.google.cloud.vertexai.api.Tool.Builder addToolsBuilder() { * * A `Tool` is a piece of code that enables the system to interact with * external systems to perform an action, or set of actions, outside of - * knowledge and scope of the model. The only supported tool is currently - * `Function` + * knowledge and scope of the model. * * * @@ -2089,8 +2084,7 @@ public com.google.cloud.vertexai.api.Tool.Builder addToolsBuilder(int index) { * * A `Tool` is a piece of code that enables the system to interact with * external systems to perform an action, or set of actions, outside of - * knowledge and scope of the model. The only supported tool is currently - * `Function` + * knowledge and scope of the model. * * * @@ -2641,8 +2635,10 @@ public Builder mergeGenerationConfig(com.google.cloud.vertexai.api.GenerationCon } else { generationConfigBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000010; - onChanged(); + if (generationConfig_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } return this; } /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenerateContentRequestOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenerateContentRequestOrBuilder.java index 42fe9a472af9..c1dbe68e72f7 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenerateContentRequestOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenerateContentRequestOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/prediction_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface GenerateContentRequestOrBuilder @@ -143,8 +144,7 @@ public interface GenerateContentRequestOrBuilder * * A `Tool` is a piece of code that enables the system to interact with * external systems to perform an action, or set of actions, outside of - * knowledge and scope of the model. The only supported tool is currently - * `Function` + * knowledge and scope of the model. * * * @@ -161,8 +161,7 @@ public interface GenerateContentRequestOrBuilder * * A `Tool` is a piece of code that enables the system to interact with * external systems to perform an action, or set of actions, outside of - * knowledge and scope of the model. The only supported tool is currently - * `Function` + * knowledge and scope of the model. * * * @@ -179,8 +178,7 @@ public interface GenerateContentRequestOrBuilder * * A `Tool` is a piece of code that enables the system to interact with * external systems to perform an action, or set of actions, outside of - * knowledge and scope of the model. The only supported tool is currently - * `Function` + * knowledge and scope of the model. * * * @@ -197,8 +195,7 @@ public interface GenerateContentRequestOrBuilder * * A `Tool` is a piece of code that enables the system to interact with * external systems to perform an action, or set of actions, outside of - * knowledge and scope of the model. The only supported tool is currently - * `Function` + * knowledge and scope of the model. * * * @@ -215,8 +212,7 @@ public interface GenerateContentRequestOrBuilder * * A `Tool` is a piece of code that enables the system to interact with * external systems to perform an action, or set of actions, outside of - * knowledge and scope of the model. The only supported tool is currently - * `Function` + * knowledge and scope of the model. * * * diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenerateContentResponse.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenerateContentResponse.java index a6e3ebb1ed95..438bd66091f5 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenerateContentResponse.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenerateContentResponse.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/prediction_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** @@ -2429,6 +2430,7 @@ public com.google.protobuf.Parser getParserForType() { } } + private int bitField0_; public static final int CANDIDATES_FIELD_NUMBER = 2; @SuppressWarnings("serial") @@ -2529,7 +2531,7 @@ public com.google.cloud.vertexai.api.CandidateOrBuilder getCandidatesOrBuilder(i */ @java.lang.Override public boolean hasPromptFeedback() { - return promptFeedback_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** * @@ -2589,7 +2591,7 @@ public com.google.cloud.vertexai.api.GenerateContentResponse.PromptFeedback getP */ @java.lang.Override public boolean hasUsageMetadata() { - return usageMetadata_ != null; + return ((bitField0_ & 0x00000002) != 0); } /** * @@ -2644,10 +2646,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < candidates_.size(); i++) { output.writeMessage(2, candidates_.get(i)); } - if (promptFeedback_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(3, getPromptFeedback()); } - if (usageMetadata_ != null) { + if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(4, getUsageMetadata()); } getUnknownFields().writeTo(output); @@ -2662,10 +2664,10 @@ public int getSerializedSize() { for (int i = 0; i < candidates_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, candidates_.get(i)); } - if (promptFeedback_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getPromptFeedback()); } - if (usageMetadata_ != null) { + if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getUsageMetadata()); } size += getUnknownFields().getSerializedSize(); @@ -2846,10 +2848,21 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.vertexai.api.GenerateContentResponse.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCandidatesFieldBuilder(); + getPromptFeedbackFieldBuilder(); + getUsageMetadataFieldBuilder(); + } } @java.lang.Override @@ -2923,14 +2936,18 @@ private void buildPartialRepeatedFields( private void buildPartial0(com.google.cloud.vertexai.api.GenerateContentResponse result) { int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000002) != 0)) { result.promptFeedback_ = promptFeedbackBuilder_ == null ? promptFeedback_ : promptFeedbackBuilder_.build(); + to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000004) != 0)) { result.usageMetadata_ = usageMetadataBuilder_ == null ? usageMetadata_ : usageMetadataBuilder_.build(); + to_bitField0_ |= 0x00000002; } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -3597,8 +3614,10 @@ public Builder mergePromptFeedback( } else { promptFeedbackBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000002; - onChanged(); + if (promptFeedback_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } return this; } /** @@ -3811,8 +3830,10 @@ public Builder mergeUsageMetadata( } else { usageMetadataBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000004; - onChanged(); + if (usageMetadata_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } return this; } /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenerateContentResponseOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenerateContentResponseOrBuilder.java index e52db294d803..77e99371413b 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenerateContentResponseOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenerateContentResponseOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/prediction_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface GenerateContentResponseOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenerationConfig.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenerationConfig.java index 7f7a41b119af..28abea0af9f1 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenerationConfig.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenerationConfig.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/content.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenerationConfigOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenerationConfigOrBuilder.java index 06d13dcded89..1a5e12b292b1 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenerationConfigOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenerationConfigOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/content.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface GenerationConfigOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenericOperationMetadata.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenericOperationMetadata.java index ca1da017d0c1..d16b9a932d81 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenericOperationMetadata.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenericOperationMetadata.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/operation.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** @@ -62,6 +63,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.vertexai.api.GenericOperationMetadata.Builder.class); } + private int bitField0_; public static final int PARTIAL_FAILURES_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -174,7 +176,7 @@ public com.google.rpc.StatusOrBuilder getPartialFailuresOrBuilder(int index) { */ @java.lang.Override public boolean hasCreateTime() { - return createTime_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** * @@ -225,7 +227,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { */ @java.lang.Override public boolean hasUpdateTime() { - return updateTime_ != null; + return ((bitField0_ & 0x00000002) != 0); } /** * @@ -279,10 +281,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < partialFailures_.size(); i++) { output.writeMessage(1, partialFailures_.get(i)); } - if (createTime_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getCreateTime()); } - if (updateTime_ != null) { + if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(3, getUpdateTime()); } getUnknownFields().writeTo(output); @@ -297,10 +299,10 @@ public int getSerializedSize() { for (int i = 0; i < partialFailures_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, partialFailures_.get(i)); } - if (createTime_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); } - if (updateTime_ != null) { + if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); } size += getUnknownFields().getSerializedSize(); @@ -481,10 +483,21 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.vertexai.api.GenericOperationMetadata.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPartialFailuresFieldBuilder(); + getCreateTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + } } @java.lang.Override @@ -558,12 +571,16 @@ private void buildPartialRepeatedFields( private void buildPartial0(com.google.cloud.vertexai.api.GenericOperationMetadata result) { int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000002) != 0)) { result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000004) != 0)) { result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -1261,8 +1278,10 @@ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { } else { createTimeBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000002; - onChanged(); + if (createTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } return this; } /** @@ -1472,8 +1491,10 @@ public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { } else { updateTimeBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000004; - onChanged(); + if (updateTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } return this; } /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenericOperationMetadataOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenericOperationMetadataOrBuilder.java index b3bbfb98c7a9..f904810dadaf 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenericOperationMetadataOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GenericOperationMetadataOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/operation.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface GenericOperationMetadataOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GetEndpointRequest.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GetEndpointRequest.java index 17b51e721759..2faec8266bba 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GetEndpointRequest.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GetEndpointRequest.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/endpoint_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GetEndpointRequestOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GetEndpointRequestOrBuilder.java index 245fd501d2eb..0c83dfc8ada9 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GetEndpointRequestOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/GetEndpointRequestOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/endpoint_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface GetEndpointRequestOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/HarmCategory.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/HarmCategory.java index 0f11e57d755e..85bded6c5774 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/HarmCategory.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/HarmCategory.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/content.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Int64Array.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Int64Array.java index ddf199946c21..984a058840b6 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Int64Array.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Int64Array.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/types.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** @@ -65,7 +66,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public static final int VALUES_FIELD_NUMBER = 1; @SuppressWarnings("serial") - private com.google.protobuf.Internal.LongList values_; + private com.google.protobuf.Internal.LongList values_ = emptyLongList(); /** * * @@ -354,7 +355,6 @@ public com.google.cloud.vertexai.api.Int64Array build() { public com.google.cloud.vertexai.api.Int64Array buildPartial() { com.google.cloud.vertexai.api.Int64Array result = new com.google.cloud.vertexai.api.Int64Array(this); - buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } @@ -362,16 +362,12 @@ public com.google.cloud.vertexai.api.Int64Array buildPartial() { return result; } - private void buildPartialRepeatedFields(com.google.cloud.vertexai.api.Int64Array result) { - if (((bitField0_ & 0x00000001) != 0)) { - values_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.values_ = values_; - } - private void buildPartial0(com.google.cloud.vertexai.api.Int64Array result) { int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + values_.makeImmutable(); + result.values_ = values_; + } } @java.lang.Override @@ -422,7 +418,8 @@ public Builder mergeFrom(com.google.cloud.vertexai.api.Int64Array other) { if (!other.values_.isEmpty()) { if (values_.isEmpty()) { values_ = other.values_; - bitField0_ = (bitField0_ & ~0x00000001); + values_.makeImmutable(); + bitField0_ |= 0x00000001; } else { ensureValuesIsMutable(); values_.addAll(other.values_); @@ -495,10 +492,10 @@ public Builder mergeFrom( private com.google.protobuf.Internal.LongList values_ = emptyLongList(); private void ensureValuesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - values_ = mutableCopy(values_); - bitField0_ |= 0x00000001; + if (!values_.isModifiable()) { + values_ = makeMutableCopy(values_); } + bitField0_ |= 0x00000001; } /** * @@ -512,9 +509,8 @@ private void ensureValuesIsMutable() { * @return A list containing the values. */ public java.util.List getValuesList() { - return ((bitField0_ & 0x00000001) != 0) - ? java.util.Collections.unmodifiableList(values_) - : values_; + values_.makeImmutable(); + return values_; } /** * @@ -562,6 +558,7 @@ public Builder setValues(int index, long value) { ensureValuesIsMutable(); values_.setLong(index, value); + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -581,6 +578,7 @@ public Builder addValues(long value) { ensureValuesIsMutable(); values_.addLong(value); + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -599,6 +597,7 @@ public Builder addValues(long value) { public Builder addAllValues(java.lang.Iterable values) { ensureValuesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, values_); + bitField0_ |= 0x00000001; onChanged(); return this; } diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Int64ArrayOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Int64ArrayOrBuilder.java index e27d36fcb9a4..ec0df16275c5 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Int64ArrayOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Int64ArrayOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/types.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface Int64ArrayOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/IntegratedGradientsAttribution.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/IntegratedGradientsAttribution.java index 16f78a6d7d78..4164aa71a0d8 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/IntegratedGradientsAttribution.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/IntegratedGradientsAttribution.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/explanation.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** @@ -63,6 +64,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.vertexai.api.IntegratedGradientsAttribution.Builder.class); } + private int bitField0_; public static final int STEP_COUNT_FIELD_NUMBER = 1; private int stepCount_ = 0; /** @@ -105,7 +107,7 @@ public int getStepCount() { */ @java.lang.Override public boolean hasSmoothGradConfig() { - return smoothGradConfig_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** * @@ -170,7 +172,7 @@ public com.google.cloud.vertexai.api.SmoothGradConfigOrBuilder getSmoothGradConf */ @java.lang.Override public boolean hasBlurBaselineConfig() { - return blurBaselineConfig_ != null; + return ((bitField0_ & 0x00000002) != 0); } /** * @@ -233,10 +235,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (stepCount_ != 0) { output.writeInt32(1, stepCount_); } - if (smoothGradConfig_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getSmoothGradConfig()); } - if (blurBaselineConfig_ != null) { + if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(3, getBlurBaselineConfig()); } getUnknownFields().writeTo(output); @@ -251,10 +253,10 @@ public int getSerializedSize() { if (stepCount_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, stepCount_); } - if (smoothGradConfig_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSmoothGradConfig()); } - if (blurBaselineConfig_ != null) { + if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getBlurBaselineConfig()); } size += getUnknownFields().getSerializedSize(); @@ -435,10 +437,20 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.vertexai.api.IntegratedGradientsAttribution.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getSmoothGradConfigFieldBuilder(); + getBlurBaselineConfigFieldBuilder(); + } } @java.lang.Override @@ -497,16 +509,20 @@ private void buildPartial0( if (((from_bitField0_ & 0x00000001) != 0)) { result.stepCount_ = stepCount_; } + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000002) != 0)) { result.smoothGradConfig_ = smoothGradConfigBuilder_ == null ? smoothGradConfig_ : smoothGradConfigBuilder_.build(); + to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000004) != 0)) { result.blurBaselineConfig_ = blurBaselineConfigBuilder_ == null ? blurBaselineConfig_ : blurBaselineConfigBuilder_.build(); + to_bitField0_ |= 0x00000002; } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -824,8 +840,10 @@ public Builder mergeSmoothGradConfig(com.google.cloud.vertexai.api.SmoothGradCon } else { smoothGradConfigBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000002; - onChanged(); + if (smoothGradConfig_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } return this; } /** @@ -1054,8 +1072,10 @@ public Builder mergeBlurBaselineConfig(com.google.cloud.vertexai.api.BlurBaselin } else { blurBaselineConfigBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000004; - onChanged(); + if (blurBaselineConfig_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } return this; } /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/IntegratedGradientsAttributionOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/IntegratedGradientsAttributionOrBuilder.java index 09e047d253ef..bfc9e69a9f5a 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/IntegratedGradientsAttributionOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/IntegratedGradientsAttributionOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/explanation.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface IntegratedGradientsAttributionOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/IoProto.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/IoProto.java index 401f63dd21c8..ccb0c6ab4eee 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/IoProto.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/IoProto.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/io.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public final class IoProto { @@ -74,26 +75,26 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { java.lang.String[] descriptorData = { "\n!google/cloud/vertexai/v1/io.proto\022\030goo" + "gle.cloud.vertexai.v1\032\037google/api/field_" - + "behavior.proto\"K\n\nAvroSource\022=\n\ngcs_sour" + + "behavior.proto\"J\n\nAvroSource\022<\n\ngcs_sour" + "ce\030\001 \001(\0132#.google.cloud.vertexai.v1.GcsS" - + "ourceB\004\342A\001\002\"J\n\tCsvSource\022=\n\ngcs_source\030\001" - + " \001(\0132#.google.cloud.vertexai.v1.GcsSourc" - + "eB\004\342A\001\002\"\037\n\tGcsSource\022\022\n\004uris\030\001 \003(\tB\004\342A\001\002" - + "\"1\n\016GcsDestination\022\037\n\021output_uri_prefix\030" - + "\001 \001(\tB\004\342A\001\002\")\n\016BigQuerySource\022\027\n\tinput_u" - + "ri\030\001 \001(\tB\004\342A\001\002\"/\n\023BigQueryDestination\022\030\n" - + "\noutput_uri\030\001 \001(\tB\004\342A\001\002\"Y\n\016CsvDestinatio" - + "n\022G\n\017gcs_destination\030\001 \001(\0132(.google.clou" - + "d.vertexai.v1.GcsDestinationB\004\342A\001\002\"^\n\023TF" - + "RecordDestination\022G\n\017gcs_destination\030\001 \001" - + "(\0132(.google.cloud.vertexai.v1.GcsDestina" - + "tionB\004\342A\001\002\"8\n\034ContainerRegistryDestinati" - + "on\022\030\n\noutput_uri\030\001 \001(\tB\004\342A\001\002B\304\001\n\035com.goo" - + "gle.cloud.vertexai.apiB\007IoProtoP\001Z>cloud" - + ".google.com/go/aiplatform/apiv1/aiplatfo" - + "rmpb;aiplatformpb\252\002\032Google.Cloud.AIPlatf" - + "orm.V1\312\002\032Google\\Cloud\\AIPlatform\\V1\352\002\035Go" - + "ogle::Cloud::AIPlatform::V1b\006proto3" + + "ourceB\003\340A\002\"I\n\tCsvSource\022<\n\ngcs_source\030\001 " + + "\001(\0132#.google.cloud.vertexai.v1.GcsSource" + + "B\003\340A\002\"\036\n\tGcsSource\022\021\n\004uris\030\001 \003(\tB\003\340A\002\"0\n" + + "\016GcsDestination\022\036\n\021output_uri_prefix\030\001 \001" + + "(\tB\003\340A\002\"(\n\016BigQuerySource\022\026\n\tinput_uri\030\001" + + " \001(\tB\003\340A\002\".\n\023BigQueryDestination\022\027\n\noutp" + + "ut_uri\030\001 \001(\tB\003\340A\002\"X\n\016CsvDestination\022F\n\017g" + + "cs_destination\030\001 \001(\0132(.google.cloud.vert" + + "exai.v1.GcsDestinationB\003\340A\002\"]\n\023TFRecordD" + + "estination\022F\n\017gcs_destination\030\001 \001(\0132(.go" + + "ogle.cloud.vertexai.v1.GcsDestinationB\003\340" + + "A\002\"7\n\034ContainerRegistryDestination\022\027\n\nou" + + "tput_uri\030\001 \001(\tB\003\340A\002B\304\001\n\035com.google.cloud" + + ".vertexai.apiB\007IoProtoP\001Z>cloud.google.c" + + "om/go/aiplatform/apiv1/aiplatformpb;aipl" + + "atformpb\252\002\032Google.Cloud.AIPlatform.V1\312\002\032" + + "Google\\Cloud\\AIPlatform\\V1\352\002\035Google::Clo" + + "ud::AIPlatform::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ListEndpointsRequest.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ListEndpointsRequest.java index 6f4ec0e4a943..4264c0c9b31d 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ListEndpointsRequest.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ListEndpointsRequest.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/endpoint_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** @@ -66,6 +67,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.vertexai.api.ListEndpointsRequest.Builder.class); } + private int bitField0_; public static final int PARENT_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -301,7 +303,7 @@ public com.google.protobuf.ByteString getPageTokenBytes() { */ @java.lang.Override public boolean hasReadMask() { - return readMask_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** * @@ -427,7 +429,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); } - if (readMask_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(5, getReadMask()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { @@ -454,7 +456,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); } - if (readMask_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getReadMask()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { @@ -640,10 +642,19 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.vertexai.api.ListEndpointsRequest.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getReadMaskFieldBuilder(); + } } @java.lang.Override @@ -708,12 +719,15 @@ private void buildPartial0(com.google.cloud.vertexai.api.ListEndpointsRequest re if (((from_bitField0_ & 0x00000008) != 0)) { result.pageToken_ = pageToken_; } + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000010) != 0)) { result.readMask_ = readMaskBuilder_ == null ? readMask_ : readMaskBuilder_.build(); + to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000020) != 0)) { result.orderBy_ = orderBy_; } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -1465,8 +1479,10 @@ public Builder mergeReadMask(com.google.protobuf.FieldMask value) { } else { readMaskBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000010; - onChanged(); + if (readMask_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } return this; } /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ListEndpointsRequestOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ListEndpointsRequestOrBuilder.java index 166a084e98fa..a52ea45c7c43 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ListEndpointsRequestOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ListEndpointsRequestOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/endpoint_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface ListEndpointsRequestOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ListEndpointsResponse.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ListEndpointsResponse.java index a28bfae6410a..5c51d809e0b9 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ListEndpointsResponse.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ListEndpointsResponse.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/endpoint_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ListEndpointsResponseOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ListEndpointsResponseOrBuilder.java index 182d6e198676..d2ee1eb2ef99 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ListEndpointsResponseOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ListEndpointsResponseOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/endpoint_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface ListEndpointsResponseOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/LlmUtilityServiceProto.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/LlmUtilityServiceProto.java index a40d5e39afcc..815972e3e6bd 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/LlmUtilityServiceProto.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/LlmUtilityServiceProto.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/llm_utility_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public final class LlmUtilityServiceProto { @@ -54,37 +55,37 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "/client.proto\032\037google/api/field_behavior" + ".proto\032\031google/api/resource.proto\0321googl" + "e/cloud/vertexai/v1/prediction_service.p" - + "roto\032\034google/protobuf/struct.proto\"\206\001\n\024C" - + "omputeTokensRequest\022=\n\010endpoint\030\001 \001(\tB+\342" - + "A\001\002\372A$\n\"aiplatform.googleapis.com/Endpoi" - + "nt\022/\n\tinstances\030\002 \003(\0132\026.google.protobuf." - + "ValueB\004\342A\001\002\"/\n\nTokensInfo\022\016\n\006tokens\030\001 \003(" - + "\014\022\021\n\ttoken_ids\030\002 \003(\003\"R\n\025ComputeTokensRes" - + "ponse\0229\n\013tokens_info\030\001 \003(\0132$.google.clou" - + "d.vertexai.v1.TokensInfo2\244\005\n\021LlmUtilityS" - + "ervice\022\231\002\n\013CountTokens\022,.google.cloud.ve" - + "rtexai.v1.CountTokensRequest\032-.google.cl" - + "oud.vertexai.v1.CountTokensResponse\"\254\001\332A" - + "\022endpoint,instances\202\323\344\223\002\220\001\"=/v1/{endpoin" - + "t=projects/*/locations/*/endpoints/*}:co" - + "untTokens:\001*ZL\"G/v1/{endpoint=projects/*" - + "/locations/*/publishers/*/models/*}:coun" - + "tTokens:\001*\022\243\002\n\rComputeTokens\022..google.cl" - + "oud.vertexai.v1.ComputeTokensRequest\032/.g" - + "oogle.cloud.vertexai.v1.ComputeTokensRes" - + "ponse\"\260\001\332A\022endpoint,instances\202\323\344\223\002\224\001\"?/v" - + "1/{endpoint=projects/*/locations/*/endpo" - + "ints/*}:computeTokens:\001*ZN\"I/v1/{endpoin" - + "t=projects/*/locations/*/publishers/*/mo" - + "dels/*}:computeTokens:\001*\032M\312A\031aiplatform." - + "googleapis.com\322A.https://www.googleapis." - + "com/auth/cloud-platformB\323\001\n\035com.google.c" - + "loud.vertexai.apiB\026LlmUtilityServiceProt" - + "oP\001Z>cloud.google.com/go/aiplatform/apiv" - + "1/aiplatformpb;aiplatformpb\252\002\032Google.Clo" - + "ud.AIPlatform.V1\312\002\032Google\\Cloud\\AIPlatfo" - + "rm\\V1\352\002\035Google::Cloud::AIPlatform::V1b\006p" - + "roto3" + + "roto\032\034google/protobuf/struct.proto\"\204\001\n\024C" + + "omputeTokensRequest\022<\n\010endpoint\030\001 \001(\tB*\340" + + "A\002\372A$\n\"aiplatform.googleapis.com/Endpoin" + + "t\022.\n\tinstances\030\002 \003(\0132\026.google.protobuf.V" + + "alueB\003\340A\002\"/\n\nTokensInfo\022\016\n\006tokens\030\001 \003(\014\022" + + "\021\n\ttoken_ids\030\002 \003(\003\"R\n\025ComputeTokensRespo" + + "nse\0229\n\013tokens_info\030\001 \003(\0132$.google.cloud." + + "vertexai.v1.TokensInfo2\244\005\n\021LlmUtilitySer" + + "vice\022\231\002\n\013CountTokens\022,.google.cloud.vert" + + "exai.v1.CountTokensRequest\032-.google.clou" + + "d.vertexai.v1.CountTokensResponse\"\254\001\332A\022e" + + "ndpoint,instances\202\323\344\223\002\220\001\"=/v1/{endpoint=" + + "projects/*/locations/*/endpoints/*}:coun" + + "tTokens:\001*ZL\"G/v1/{endpoint=projects/*/l" + + "ocations/*/publishers/*/models/*}:countT" + + "okens:\001*\022\243\002\n\rComputeTokens\022..google.clou" + + "d.vertexai.v1.ComputeTokensRequest\032/.goo" + + "gle.cloud.vertexai.v1.ComputeTokensRespo" + + "nse\"\260\001\332A\022endpoint,instances\202\323\344\223\002\224\001\"?/v1/" + + "{endpoint=projects/*/locations/*/endpoin" + + "ts/*}:computeTokens:\001*ZN\"I/v1/{endpoint=" + + "projects/*/locations/*/publishers/*/mode" + + "ls/*}:computeTokens:\001*\032M\312A\031aiplatform.go" + + "ogleapis.com\322A.https://www.googleapis.co" + + "m/auth/cloud-platformB\323\001\n\035com.google.clo" + + "ud.vertexai.apiB\026LlmUtilityServiceProtoP" + + "\001Z>cloud.google.com/go/aiplatform/apiv1/" + + "aiplatformpb;aiplatformpb\252\002\032Google.Cloud" + + ".AIPlatform.V1\312\002\032Google\\Cloud\\AIPlatform" + + "\\V1\352\002\035Google::Cloud::AIPlatform::V1b\006pro" + + "to3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MachineResourcesProto.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MachineResourcesProto.java index ecaa9dbcbdc1..7cd3136eeff1 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MachineResourcesProto.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MachineResourcesProto.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/machine_resources.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public final class MachineResourcesProto { @@ -75,38 +76,38 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "\n0google/cloud/vertexai/v1/machine_resou" + "rces.proto\022\030google.cloud.vertexai.v1\032\037go" + "ogle/api/field_behavior.proto\032/google/cl" - + "oud/vertexai/v1/accelerator_type.proto\"\253" - + "\001\n\013MachineSpec\022\032\n\014machine_type\030\001 \001(\tB\004\342A" - + "\001\005\022I\n\020accelerator_type\030\002 \001(\0162).google.cl" - + "oud.vertexai.v1.AcceleratorTypeB\004\342A\001\005\022\031\n" - + "\021accelerator_count\030\003 \001(\005\022\032\n\014tpu_topology" - + "\030\004 \001(\tB\004\342A\001\005\"\364\001\n\022DedicatedResources\022B\n\014m" - + "achine_spec\030\001 \001(\0132%.google.cloud.vertexa" - + "i.v1.MachineSpecB\005\342A\002\002\005\022 \n\021min_replica_c" - + "ount\030\002 \001(\005B\005\342A\002\002\005\022\037\n\021max_replica_count\030\003" - + " \001(\005B\004\342A\001\005\022W\n\030autoscaling_metric_specs\030\004" - + " \003(\0132/.google.cloud.vertexai.v1.Autoscal" - + "ingMetricSpecB\004\342A\001\005\"V\n\022AutomaticResource" - + "s\022\037\n\021min_replica_count\030\001 \001(\005B\004\342A\001\005\022\037\n\021ma" - + "x_replica_count\030\002 \001(\005B\004\342A\001\005\"\244\001\n\027BatchDed" - + "icatedResources\022B\n\014machine_spec\030\001 \001(\0132%." - + "google.cloud.vertexai.v1.MachineSpecB\005\342A" - + "\002\002\005\022$\n\026starting_replica_count\030\002 \001(\005B\004\342A\001" - + "\005\022\037\n\021max_replica_count\030\003 \001(\005B\004\342A\001\005\"0\n\021Re" - + "sourcesConsumed\022\033\n\rreplica_hours\030\001 \001(\001B\004" - + "\342A\001\003\"=\n\010DiskSpec\022\026\n\016boot_disk_type\030\001 \001(\t" - + "\022\031\n\021boot_disk_size_gb\030\002 \001(\005\"=\n\022Persisten" - + "tDiskSpec\022\021\n\tdisk_type\030\001 \001(\t\022\024\n\014disk_siz" - + "e_gb\030\002 \001(\003\"O\n\010NfsMount\022\024\n\006server\030\001 \001(\tB\004" - + "\342A\001\002\022\022\n\004path\030\002 \001(\tB\004\342A\001\002\022\031\n\013mount_point\030" - + "\003 \001(\tB\004\342A\001\002\"B\n\025AutoscalingMetricSpec\022\031\n\013" - + "metric_name\030\001 \001(\tB\004\342A\001\002\022\016\n\006target\030\002 \001(\005B" - + "\322\001\n\035com.google.cloud.vertexai.apiB\025Machi" - + "neResourcesProtoP\001Z>cloud.google.com/go/" - + "aiplatform/apiv1/aiplatformpb;aiplatform" - + "pb\252\002\032Google.Cloud.AIPlatform.V1\312\002\032Google" - + "\\Cloud\\AIPlatform\\V1\352\002\035Google::Cloud::AI" - + "Platform::V1b\006proto3" + + "oud/vertexai/v1/accelerator_type.proto\"\250" + + "\001\n\013MachineSpec\022\031\n\014machine_type\030\001 \001(\tB\003\340A" + + "\005\022H\n\020accelerator_type\030\002 \001(\0162).google.clo" + + "ud.vertexai.v1.AcceleratorTypeB\003\340A\005\022\031\n\021a" + + "ccelerator_count\030\003 \001(\005\022\031\n\014tpu_topology\030\004" + + " \001(\tB\003\340A\005\"\364\001\n\022DedicatedResources\022C\n\014mach" + + "ine_spec\030\001 \001(\0132%.google.cloud.vertexai.v" + + "1.MachineSpecB\006\340A\002\340A\005\022!\n\021min_replica_cou" + + "nt\030\002 \001(\005B\006\340A\002\340A\005\022\036\n\021max_replica_count\030\003 " + + "\001(\005B\003\340A\005\022V\n\030autoscaling_metric_specs\030\004 \003" + + "(\0132/.google.cloud.vertexai.v1.Autoscalin" + + "gMetricSpecB\003\340A\005\"T\n\022AutomaticResources\022\036" + + "\n\021min_replica_count\030\001 \001(\005B\003\340A\005\022\036\n\021max_re" + + "plica_count\030\002 \001(\005B\003\340A\005\"\243\001\n\027BatchDedicate" + + "dResources\022C\n\014machine_spec\030\001 \001(\0132%.googl" + + "e.cloud.vertexai.v1.MachineSpecB\006\340A\002\340A\005\022" + + "#\n\026starting_replica_count\030\002 \001(\005B\003\340A\005\022\036\n\021" + + "max_replica_count\030\003 \001(\005B\003\340A\005\"/\n\021Resource" + + "sConsumed\022\032\n\rreplica_hours\030\001 \001(\001B\003\340A\003\"=\n" + + "\010DiskSpec\022\026\n\016boot_disk_type\030\001 \001(\t\022\031\n\021boo" + + "t_disk_size_gb\030\002 \001(\005\"=\n\022PersistentDiskSp" + + "ec\022\021\n\tdisk_type\030\001 \001(\t\022\024\n\014disk_size_gb\030\002 " + + "\001(\003\"L\n\010NfsMount\022\023\n\006server\030\001 \001(\tB\003\340A\002\022\021\n\004" + + "path\030\002 \001(\tB\003\340A\002\022\030\n\013mount_point\030\003 \001(\tB\003\340A" + + "\002\"A\n\025AutoscalingMetricSpec\022\030\n\013metric_nam" + + "e\030\001 \001(\tB\003\340A\002\022\016\n\006target\030\002 \001(\005B\322\001\n\035com.goo" + + "gle.cloud.vertexai.apiB\025MachineResources" + + "ProtoP\001Z>cloud.google.com/go/aiplatform/" + + "apiv1/aiplatformpb;aiplatformpb\252\002\032Google" + + ".Cloud.AIPlatform.V1\312\002\032Google\\Cloud\\AIPl" + + "atform\\V1\352\002\035Google::Cloud::AIPlatform::V" + + "1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MachineSpec.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MachineSpec.java index 5d7fcc7cb691..51fb26bc0dc9 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MachineSpec.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MachineSpec.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/machine_resources.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MachineSpecOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MachineSpecOrBuilder.java index dbaf82eb3046..24d4f0a0542b 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MachineSpecOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MachineSpecOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/machine_resources.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface MachineSpecOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ModelExplanation.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ModelExplanation.java index f3944b1e61b0..4bb9f08e68ac 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ModelExplanation.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ModelExplanation.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/explanation.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ModelExplanationOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ModelExplanationOrBuilder.java index 70875876e32b..9aac1eebf6ad 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ModelExplanationOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ModelExplanationOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/explanation.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface ModelExplanationOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MutateDeployedModelOperationMetadata.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MutateDeployedModelOperationMetadata.java index e80ac0c994c9..9e7736312c0c 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MutateDeployedModelOperationMetadata.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MutateDeployedModelOperationMetadata.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/endpoint_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** @@ -63,6 +64,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.vertexai.api.MutateDeployedModelOperationMetadata.Builder.class); } + private int bitField0_; public static final int GENERIC_METADATA_FIELD_NUMBER = 1; private com.google.cloud.vertexai.api.GenericOperationMetadata genericMetadata_; /** @@ -78,7 +80,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { */ @java.lang.Override public boolean hasGenericMetadata() { - return genericMetadata_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** * @@ -128,7 +130,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (genericMetadata_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(1, getGenericMetadata()); } getUnknownFields().writeTo(output); @@ -140,7 +142,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (genericMetadata_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getGenericMetadata()); } size += getUnknownFields().getSerializedSize(); @@ -311,10 +313,19 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.vertexai.api.MutateDeployedModelOperationMetadata.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getGenericMetadataFieldBuilder(); + } } @java.lang.Override @@ -365,10 +376,13 @@ public com.google.cloud.vertexai.api.MutateDeployedModelOperationMetadata buildP private void buildPartial0( com.google.cloud.vertexai.api.MutateDeployedModelOperationMetadata result) { int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.genericMetadata_ = genericMetadataBuilder_ == null ? genericMetadata_ : genericMetadataBuilder_.build(); + to_bitField0_ |= 0x00000001; } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -580,8 +594,10 @@ public Builder mergeGenericMetadata( } else { genericMetadataBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000001; - onChanged(); + if (genericMetadata_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } return this; } /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MutateDeployedModelOperationMetadataOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MutateDeployedModelOperationMetadataOrBuilder.java index e9d093c07c43..27f97f913671 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MutateDeployedModelOperationMetadataOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MutateDeployedModelOperationMetadataOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/endpoint_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface MutateDeployedModelOperationMetadataOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MutateDeployedModelRequest.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MutateDeployedModelRequest.java index ba3a9cbcc094..b774646f7d39 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MutateDeployedModelRequest.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MutateDeployedModelRequest.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/endpoint_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** @@ -63,6 +64,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.vertexai.api.MutateDeployedModelRequest.Builder.class); } + private int bitField0_; public static final int ENDPOINT_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -150,7 +152,7 @@ public com.google.protobuf.ByteString getEndpointBytes() { */ @java.lang.Override public boolean hasDeployedModel() { - return deployedModel_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** * @@ -228,7 +230,7 @@ public com.google.cloud.vertexai.api.DeployedModelOrBuilder getDeployedModelOrBu */ @java.lang.Override public boolean hasUpdateMask() { - return updateMask_ != null; + return ((bitField0_ & 0x00000002) != 0); } /** * @@ -280,10 +282,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpoint_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, endpoint_); } - if (deployedModel_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getDeployedModel()); } - if (updateMask_ != null) { + if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(4, getUpdateMask()); } getUnknownFields().writeTo(output); @@ -298,10 +300,10 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpoint_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, endpoint_); } - if (deployedModel_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDeployedModel()); } - if (updateMask_ != null) { + if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getUpdateMask()); } size += getUnknownFields().getSerializedSize(); @@ -481,10 +483,20 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.vertexai.api.MutateDeployedModelRequest.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDeployedModelFieldBuilder(); + getUpdateMaskFieldBuilder(); + } } @java.lang.Override @@ -541,13 +553,17 @@ private void buildPartial0(com.google.cloud.vertexai.api.MutateDeployedModelRequ if (((from_bitField0_ & 0x00000001) != 0)) { result.endpoint_ = endpoint_; } + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000002) != 0)) { result.deployedModel_ = deployedModelBuilder_ == null ? deployedModel_ : deployedModelBuilder_.build(); + to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000004) != 0)) { result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000002; } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -964,8 +980,10 @@ public Builder mergeDeployedModel(com.google.cloud.vertexai.api.DeployedModel va } else { deployedModelBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000002; - onChanged(); + if (deployedModel_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } return this; } /** @@ -1209,8 +1227,10 @@ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { } else { updateMaskBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000004; - onChanged(); + if (updateMask_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } return this; } /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MutateDeployedModelRequestOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MutateDeployedModelRequestOrBuilder.java index 61100c463083..19c62c8ae969 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MutateDeployedModelRequestOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MutateDeployedModelRequestOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/endpoint_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface MutateDeployedModelRequestOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MutateDeployedModelResponse.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MutateDeployedModelResponse.java index ae80894d7014..320bfc4e3ea0 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MutateDeployedModelResponse.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MutateDeployedModelResponse.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/endpoint_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** @@ -61,6 +62,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.vertexai.api.MutateDeployedModelResponse.Builder.class); } + private int bitField0_; public static final int DEPLOYED_MODEL_FIELD_NUMBER = 1; private com.google.cloud.vertexai.api.DeployedModel deployedModel_; /** @@ -76,7 +78,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { */ @java.lang.Override public boolean hasDeployedModel() { - return deployedModel_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** * @@ -125,7 +127,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (deployedModel_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(1, getDeployedModel()); } getUnknownFields().writeTo(output); @@ -137,7 +139,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (deployedModel_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getDeployedModel()); } size += getUnknownFields().getSerializedSize(); @@ -306,10 +308,19 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.vertexai.api.MutateDeployedModelResponse.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDeployedModelFieldBuilder(); + } } @java.lang.Override @@ -357,10 +368,13 @@ public com.google.cloud.vertexai.api.MutateDeployedModelResponse buildPartial() private void buildPartial0(com.google.cloud.vertexai.api.MutateDeployedModelResponse result) { int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.deployedModel_ = deployedModelBuilder_ == null ? deployedModel_ : deployedModelBuilder_.build(); + to_bitField0_ |= 0x00000001; } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -566,8 +580,10 @@ public Builder mergeDeployedModel(com.google.cloud.vertexai.api.DeployedModel va } else { deployedModelBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000001; - onChanged(); + if (deployedModel_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } return this; } /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MutateDeployedModelResponseOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MutateDeployedModelResponseOrBuilder.java index 4f623a17059f..6d2574313664 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MutateDeployedModelResponseOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/MutateDeployedModelResponseOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/endpoint_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface MutateDeployedModelResponseOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Neighbor.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Neighbor.java index 64afd7f5e4af..10694f464d22 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Neighbor.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Neighbor.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/explanation.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/NeighborOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/NeighborOrBuilder.java index be2ca0f48de0..f25f54311242 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/NeighborOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/NeighborOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/explanation.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface NeighborOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/NfsMount.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/NfsMount.java index 2c20796db056..c42b0f0e1e9c 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/NfsMount.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/NfsMount.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/machine_resources.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/NfsMountOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/NfsMountOrBuilder.java index 376ca58c090f..ef8c6c5ef4e2 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/NfsMountOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/NfsMountOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/machine_resources.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface NfsMountOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/OpenApiProto.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/OpenApiProto.java index 266a6b930ef9..80826af97bb8 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/OpenApiProto.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/OpenApiProto.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/openapi.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public final class OpenApiProto { @@ -47,26 +48,25 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "\n&google/cloud/vertexai/v1/openapi.proto" + "\022\030google.cloud.vertexai.v1\032\037google/api/f" + "ield_behavior.proto\032\034google/protobuf/str" - + "uct.proto\"\270\003\n\006Schema\0222\n\004type\030\001 \001(\0162\036.goo" - + "gle.cloud.vertexai.v1.TypeB\004\342A\001\001\022\024\n\006form" - + "at\030\007 \001(\tB\004\342A\001\001\022\031\n\013description\030\010 \001(\tB\004\342A\001" - + "\001\022\026\n\010nullable\030\006 \001(\010B\004\342A\001\001\0225\n\005items\030\002 \001(\013" - + "2 .google.cloud.vertexai.v1.SchemaB\004\342A\001\001" - + "\022\022\n\004enum\030\t \003(\tB\004\342A\001\001\022J\n\nproperties\030\003 \003(\013" - + "20.google.cloud.vertexai.v1.Schema.Prope" - + "rtiesEntryB\004\342A\001\001\022\026\n\010required\030\005 \003(\tB\004\342A\001\001" - + "\022-\n\007example\030\004 \001(\0132\026.google.protobuf.Valu" - + "eB\004\342A\001\001\032S\n\017PropertiesEntry\022\013\n\003key\030\001 \001(\t\022" - + "/\n\005value\030\002 \001(\0132 .google.cloud.vertexai.v" - + "1.Schema:\0028\001*e\n\004Type\022\024\n\020TYPE_UNSPECIFIED" - + "\020\000\022\n\n\006STRING\020\001\022\n\n\006NUMBER\020\002\022\013\n\007INTEGER\020\003\022" - + "\013\n\007BOOLEAN\020\004\022\t\n\005ARRAY\020\005\022\n\n\006OBJECT\020\006B\311\001\n\035" - + "com.google.cloud.vertexai.apiB\014OpenApiPr" - + "otoP\001Z>cloud.google.com/go/aiplatform/ap" - + "iv1/aiplatformpb;aiplatformpb\252\002\032Google.C" - + "loud.AIPlatform.V1\312\002\032Google\\Cloud\\AIPlat" - + "form\\V1\352\002\035Google::Cloud::AIPlatform::V1b" - + "\006proto3" + + "uct.proto\"\257\003\n\006Schema\0221\n\004type\030\001 \001(\0162\036.goo" + + "gle.cloud.vertexai.v1.TypeB\003\340A\001\022\023\n\006forma" + + "t\030\007 \001(\tB\003\340A\001\022\030\n\013description\030\010 \001(\tB\003\340A\001\022\025" + + "\n\010nullable\030\006 \001(\010B\003\340A\001\0224\n\005items\030\002 \001(\0132 .g" + + "oogle.cloud.vertexai.v1.SchemaB\003\340A\001\022\021\n\004e" + + "num\030\t \003(\tB\003\340A\001\022I\n\nproperties\030\003 \003(\01320.goo" + + "gle.cloud.vertexai.v1.Schema.PropertiesE" + + "ntryB\003\340A\001\022\025\n\010required\030\005 \003(\tB\003\340A\001\022,\n\007exam" + + "ple\030\004 \001(\0132\026.google.protobuf.ValueB\003\340A\001\032S" + + "\n\017PropertiesEntry\022\013\n\003key\030\001 \001(\t\022/\n\005value\030" + + "\002 \001(\0132 .google.cloud.vertexai.v1.Schema:" + + "\0028\001*e\n\004Type\022\024\n\020TYPE_UNSPECIFIED\020\000\022\n\n\006STR" + + "ING\020\001\022\n\n\006NUMBER\020\002\022\013\n\007INTEGER\020\003\022\013\n\007BOOLEA" + + "N\020\004\022\t\n\005ARRAY\020\005\022\n\n\006OBJECT\020\006B\311\001\n\035com.googl" + + "e.cloud.vertexai.apiB\014OpenApiProtoP\001Z>cl" + + "oud.google.com/go/aiplatform/apiv1/aipla" + + "tformpb;aiplatformpb\252\002\032Google.Cloud.AIPl" + + "atform.V1\312\002\032Google\\Cloud\\AIPlatform\\V1\352\002" + + "\035Google::Cloud::AIPlatform::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/OperationProto.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/OperationProto.java index f47c00240f02..a0f5b854fec9 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/OperationProto.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/OperationProto.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/operation.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public final class OperationProto { @@ -48,19 +49,19 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "to\022\030google.cloud.vertexai.v1\032\037google/api" + "/field_behavior.proto\032\037google/protobuf/t" + "imestamp.proto\032\027google/rpc/status.proto\"" - + "\274\001\n\030GenericOperationMetadata\0222\n\020partial_" - + "failures\030\001 \003(\0132\022.google.rpc.StatusB\004\342A\001\003" - + "\0225\n\013create_time\030\002 \001(\0132\032.google.protobuf." - + "TimestampB\004\342A\001\003\0225\n\013update_time\030\003 \001(\0132\032.g" - + "oogle.protobuf.TimestampB\004\342A\001\003\"g\n\027Delete" - + "OperationMetadata\022L\n\020generic_metadata\030\001 " - + "\001(\01322.google.cloud.vertexai.v1.GenericOp" - + "erationMetadataB\313\001\n\035com.google.cloud.ver" - + "texai.apiB\016OperationProtoP\001Z>cloud.googl" - + "e.com/go/aiplatform/apiv1/aiplatformpb;a" - + "iplatformpb\252\002\032Google.Cloud.AIPlatform.V1" - + "\312\002\032Google\\Cloud\\AIPlatform\\V1\352\002\035Google::" - + "Cloud::AIPlatform::V1b\006proto3" + + "\271\001\n\030GenericOperationMetadata\0221\n\020partial_" + + "failures\030\001 \003(\0132\022.google.rpc.StatusB\003\340A\003\022" + + "4\n\013create_time\030\002 \001(\0132\032.google.protobuf.T" + + "imestampB\003\340A\003\0224\n\013update_time\030\003 \001(\0132\032.goo" + + "gle.protobuf.TimestampB\003\340A\003\"g\n\027DeleteOpe" + + "rationMetadata\022L\n\020generic_metadata\030\001 \001(\013" + + "22.google.cloud.vertexai.v1.GenericOpera" + + "tionMetadataB\313\001\n\035com.google.cloud.vertex" + + "ai.apiB\016OperationProtoP\001Z>cloud.google.c" + + "om/go/aiplatform/apiv1/aiplatformpb;aipl" + + "atformpb\252\002\032Google.Cloud.AIPlatform.V1\312\002\032" + + "Google\\Cloud\\AIPlatform\\V1\352\002\035Google::Clo" + + "ud::AIPlatform::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Part.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Part.java index 856b25763033..efed2b77c25b 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Part.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Part.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/content.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PartOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PartOrBuilder.java index f0f08d5430ea..7f486e7488f1 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PartOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PartOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/content.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface PartOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PersistentDiskSpec.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PersistentDiskSpec.java index 61051a8d180d..b3b699d02780 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PersistentDiskSpec.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PersistentDiskSpec.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/machine_resources.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PersistentDiskSpecOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PersistentDiskSpecOrBuilder.java index 2abce0b9d51e..6e08a12f1a51 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PersistentDiskSpecOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PersistentDiskSpecOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/machine_resources.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface PersistentDiskSpecOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PredictRequest.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PredictRequest.java index 3f3be203b856..68fe80485111 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PredictRequest.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PredictRequest.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/prediction_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** @@ -64,6 +65,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.vertexai.api.PredictRequest.Builder.class); } + private int bitField0_; public static final int ENDPOINT_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -257,7 +259,7 @@ public com.google.protobuf.ValueOrBuilder getInstancesOrBuilder(int index) { */ @java.lang.Override public boolean hasParameters() { - return parameters_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** * @@ -316,7 +318,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < instances_.size(); i++) { output.writeMessage(2, instances_.get(i)); } - if (parameters_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(3, getParameters()); } getUnknownFields().writeTo(output); @@ -334,7 +336,7 @@ public int getSerializedSize() { for (int i = 0; i < instances_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, instances_.get(i)); } - if (parameters_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getParameters()); } size += getUnknownFields().getSerializedSize(); @@ -510,10 +512,20 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.vertexai.api.PredictRequest.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getInstancesFieldBuilder(); + getParametersFieldBuilder(); + } } @java.lang.Override @@ -585,9 +597,12 @@ private void buildPartial0(com.google.cloud.vertexai.api.PredictRequest result) if (((from_bitField0_ & 0x00000001) != 0)) { result.endpoint_ = endpoint_; } + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000004) != 0)) { result.parameters_ = parametersBuilder_ == null ? parameters_ : parametersBuilder_.build(); + to_bitField0_ |= 0x00000001; } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -1509,8 +1524,10 @@ public Builder mergeParameters(com.google.protobuf.Value value) { } else { parametersBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000004; - onChanged(); + if (parameters_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } return this; } /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PredictRequestOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PredictRequestOrBuilder.java index b509245105ca..5389b4d28520 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PredictRequestOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PredictRequestOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/prediction_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface PredictRequestOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PredictRequestResponseLoggingConfig.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PredictRequestResponseLoggingConfig.java index 2d4d9b2555dd..9697264946a2 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PredictRequestResponseLoggingConfig.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PredictRequestResponseLoggingConfig.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/endpoint.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** @@ -62,6 +63,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig.Builder.class); } + private int bitField0_; public static final int ENABLED_FIELD_NUMBER = 1; private boolean enabled_ = false; /** @@ -119,7 +121,7 @@ public double getSamplingRate() { */ @java.lang.Override public boolean hasBigqueryDestination() { - return bigqueryDestination_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** * @@ -185,7 +187,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (java.lang.Double.doubleToRawLongBits(samplingRate_) != 0) { output.writeDouble(2, samplingRate_); } - if (bigqueryDestination_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(3, getBigqueryDestination()); } getUnknownFields().writeTo(output); @@ -203,7 +205,7 @@ public int getSerializedSize() { if (java.lang.Double.doubleToRawLongBits(samplingRate_) != 0) { size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, samplingRate_); } - if (bigqueryDestination_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getBigqueryDestination()); } size += getUnknownFields().getSerializedSize(); @@ -383,10 +385,19 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.vertexai.api.PredictRequestResponseLoggingConfig.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getBigqueryDestinationFieldBuilder(); + } } @java.lang.Override @@ -444,12 +455,15 @@ private void buildPartial0( if (((from_bitField0_ & 0x00000002) != 0)) { result.samplingRate_ = samplingRate_; } + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000004) != 0)) { result.bigqueryDestination_ = bigqueryDestinationBuilder_ == null ? bigqueryDestination_ : bigqueryDestinationBuilder_.build(); + to_bitField0_ |= 0x00000001; } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -812,8 +826,10 @@ public Builder mergeBigqueryDestination( } else { bigqueryDestinationBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000004; - onChanged(); + if (bigqueryDestination_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } return this; } /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PredictRequestResponseLoggingConfigOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PredictRequestResponseLoggingConfigOrBuilder.java index aecf19ecb2ae..984a2fd6c9c0 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PredictRequestResponseLoggingConfigOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PredictRequestResponseLoggingConfigOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/endpoint.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface PredictRequestResponseLoggingConfigOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PredictResponse.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PredictResponse.java index 6aaa8b360233..39d35ebf749d 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PredictResponse.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PredictResponse.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/prediction_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** @@ -67,6 +68,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.vertexai.api.PredictResponse.Builder.class); } + private int bitField0_; public static final int PREDICTIONS_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -390,7 +392,7 @@ public com.google.protobuf.ByteString getModelDisplayNameBytes() { */ @java.lang.Override public boolean hasMetadata() { - return metadata_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** * @@ -452,7 +454,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(modelVersionId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, modelVersionId_); } - if (metadata_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(6, getMetadata()); } getUnknownFields().writeTo(output); @@ -479,7 +481,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(modelVersionId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, modelVersionId_); } - if (metadata_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getMetadata()); } size += getUnknownFields().getSerializedSize(); @@ -664,10 +666,20 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.vertexai.api.PredictResponse.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPredictionsFieldBuilder(); + getMetadataFieldBuilder(); + } } @java.lang.Override @@ -751,9 +763,12 @@ private void buildPartial0(com.google.cloud.vertexai.api.PredictResponse result) if (((from_bitField0_ & 0x00000010) != 0)) { result.modelDisplayName_ = modelDisplayName_; } + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000020) != 0)) { result.metadata_ = metadataBuilder_ == null ? metadata_ : metadataBuilder_.build(); + to_bitField0_ |= 0x00000001; } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -1920,8 +1935,10 @@ public Builder mergeMetadata(com.google.protobuf.Value value) { } else { metadataBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000020; - onChanged(); + if (metadata_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } return this; } /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PredictResponseOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PredictResponseOrBuilder.java index 4c2fb4b478d1..f39bb2fdaf70 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PredictResponseOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PredictResponseOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/prediction_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface PredictResponseOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PredictionServiceProto.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PredictionServiceProto.java index fc08b52f56b4..a4b25e70f9a8 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PredictionServiceProto.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PredictionServiceProto.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/prediction_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public final class PredictionServiceProto { @@ -39,6 +40,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_vertexai_v1_RawPredictRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_vertexai_v1_RawPredictRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vertexai_v1_StreamRawPredictRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vertexai_v1_StreamRawPredictRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_vertexai_v1_DirectPredictRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -55,6 +60,22 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_vertexai_v1_DirectRawPredictResponse_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_vertexai_v1_DirectRawPredictResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vertexai_v1_StreamDirectPredictRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vertexai_v1_StreamDirectPredictRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vertexai_v1_StreamDirectPredictResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vertexai_v1_StreamDirectPredictResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vertexai_v1_StreamDirectRawPredictRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vertexai_v1_StreamDirectRawPredictRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_vertexai_v1_StreamDirectRawPredictResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_vertexai_v1_StreamDirectRawPredictResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_vertexai_v1_StreamingPredictRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -122,89 +143,105 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ai/v1/explanation.proto\032#google/cloud/ve" + "rtexai/v1/tool.proto\032$google/cloud/verte" + "xai/v1/types.proto\032\034google/protobuf/stru" - + "ct.proto\"\254\001\n\016PredictRequest\022=\n\010endpoint\030" - + "\001 \001(\tB+\342A\001\002\372A$\n\"aiplatform.googleapis.co" - + "m/Endpoint\022/\n\tinstances\030\002 \003(\0132\026.google.p" - + "rotobuf.ValueB\004\342A\001\002\022*\n\nparameters\030\003 \001(\0132" - + "\026.google.protobuf.Value\"\204\002\n\017PredictRespo" - + "nse\022+\n\013predictions\030\001 \003(\0132\026.google.protob" - + "uf.Value\022\031\n\021deployed_model_id\030\002 \001(\t\0227\n\005m" - + "odel\030\003 \001(\tB(\342A\001\003\372A!\n\037aiplatform.googleap" - + "is.com/Model\022\036\n\020model_version_id\030\005 \001(\tB\004" - + "\342A\001\003\022 \n\022model_display_name\030\004 \001(\tB\004\342A\001\003\022." - + "\n\010metadata\030\006 \001(\0132\026.google.protobuf.Value" - + "B\004\342A\001\003\"{\n\021RawPredictRequest\022=\n\010endpoint\030" - + "\001 \001(\tB+\342A\001\002\372A$\n\"aiplatform.googleapis.co" - + "m/Endpoint\022\'\n\thttp_body\030\002 \001(\0132\024.google.a" - + "pi.HttpBody\"\275\001\n\024DirectPredictRequest\022=\n\010" - + "endpoint\030\001 \001(\tB+\342A\001\002\372A$\n\"aiplatform.goog" - + "leapis.com/Endpoint\0220\n\006inputs\030\002 \003(\0132 .go" - + "ogle.cloud.vertexai.v1.Tensor\0224\n\nparamet" - + "ers\030\003 \001(\0132 .google.cloud.vertexai.v1.Ten" - + "sor\"\200\001\n\025DirectPredictResponse\0221\n\007outputs" - + "\030\001 \003(\0132 .google.cloud.vertexai.v1.Tensor" - + "\0224\n\nparameters\030\002 \001(\0132 .google.cloud.vert" - + "exai.v1.Tensor\"|\n\027DirectRawPredictReques" - + "t\022=\n\010endpoint\030\001 \001(\tB+\342A\001\002\372A$\n\"aiplatform" - + ".googleapis.com/Endpoint\022\023\n\013method_name\030" - + "\002 \001(\t\022\r\n\005input\030\003 \001(\014\"*\n\030DirectRawPredict" - + "Response\022\016\n\006output\030\001 \001(\014\"\300\001\n\027StreamingPr" - + "edictRequest\022=\n\010endpoint\030\001 \001(\tB+\342A\001\002\372A$\n" - + "\"aiplatform.googleapis.com/Endpoint\0220\n\006i" - + "nputs\030\002 \003(\0132 .google.cloud.vertexai.v1.T" - + "ensor\0224\n\nparameters\030\003 \001(\0132 .google.cloud" - + ".vertexai.v1.Tensor\"\203\001\n\030StreamingPredict" - + "Response\0221\n\007outputs\030\001 \003(\0132 .google.cloud" - + ".vertexai.v1.Tensor\0224\n\nparameters\030\002 \001(\0132" - + " .google.cloud.vertexai.v1.Tensor\"\177\n\032Str" - + "eamingRawPredictRequest\022=\n\010endpoint\030\001 \001(" - + "\tB+\342A\001\002\372A$\n\"aiplatform.googleapis.com/En" - + "dpoint\022\023\n\013method_name\030\002 \001(\t\022\r\n\005input\030\003 \001" - + "(\014\"-\n\033StreamingRawPredictResponse\022\016\n\006out" - + "put\030\001 \001(\014\"\235\002\n\016ExplainRequest\022=\n\010endpoint" - + "\030\001 \001(\tB+\342A\001\002\372A$\n\"aiplatform.googleapis.c" - + "om/Endpoint\022/\n\tinstances\030\002 \003(\0132\026.google." - + "protobuf.ValueB\004\342A\001\002\022*\n\nparameters\030\004 \001(\013" - + "2\026.google.protobuf.Value\022T\n\031explanation_" - + "spec_override\030\005 \001(\01321.google.cloud.verte" - + "xai.v1.ExplanationSpecOverride\022\031\n\021deploy" - + "ed_model_id\030\003 \001(\t\"\226\001\n\017ExplainResponse\022;\n" - + "\014explanations\030\001 \003(\0132%.google.cloud.verte" - + "xai.v1.Explanation\022\031\n\021deployed_model_id\030" - + "\002 \001(\t\022+\n\013predictions\030\003 \003(\0132\026.google.prot" - + "obuf.Value\"\324\001\n\022CountTokensRequest\022=\n\010end" - + "point\030\001 \001(\tB+\342A\001\002\372A$\n\"aiplatform.googlea" - + "pis.com/Endpoint\022\023\n\005model\030\003 \001(\tB\004\342A\001\002\022/\n" - + "\tinstances\030\002 \003(\0132\026.google.protobuf.Value" - + "B\004\342A\001\002\0229\n\010contents\030\004 \003(\0132!.google.cloud." - + "vertexai.v1.ContentB\004\342A\001\002\"N\n\023CountTokens" - + "Response\022\024\n\014total_tokens\030\001 \001(\005\022!\n\031total_" - + "billable_characters\030\002 \001(\005\"\262\002\n\026GenerateCo" - + "ntentRequest\022\023\n\005model\030\005 \001(\tB\004\342A\001\002\0229\n\010con" - + "tents\030\002 \003(\0132!.google.cloud.vertexai.v1.C" - + "ontentB\004\342A\001\002\0223\n\005tools\030\006 \003(\0132\036.google.clo" - + "ud.vertexai.v1.ToolB\004\342A\001\001\022F\n\017safety_sett" - + "ings\030\003 \003(\0132\'.google.cloud.vertexai.v1.Sa" - + "fetySettingB\004\342A\001\001\022K\n\021generation_config\030\004" - + " \001(\0132*.google.cloud.vertexai.v1.Generati" - + "onConfigB\004\342A\001\001\"\253\005\n\027GenerateContentRespon" - + "se\022=\n\ncandidates\030\002 \003(\0132#.google.cloud.ve" - + "rtexai.v1.CandidateB\004\342A\001\003\022_\n\017prompt_feed" - + "back\030\003 \001(\0132@.google.cloud.vertexai.v1.Ge" - + "nerateContentResponse.PromptFeedbackB\004\342A" - + "\001\003\022W\n\016usage_metadata\030\004 \001(\0132?.google.clou" - + "d.vertexai.v1.GenerateContentResponse.Us" - + "ageMetadata\032\256\002\n\016PromptFeedback\022j\n\014block_" - + "reason\030\001 \001(\0162N.google.cloud.vertexai.v1." - + "GenerateContentResponse.PromptFeedback.B" - + "lockedReasonB\004\342A\001\003\022D\n\016safety_ratings\030\002 \003" - + "(\0132&.google.cloud.vertexai.v1.SafetyRati" - + "ngB\004\342A\001\003\022\"\n\024block_reason_message\030\003 \001(\tB\004" - + "\342A\001\003\"F\n\rBlockedReason\022\036\n\032BLOCKED_REASON_" + + "ct.proto\"\252\001\n\016PredictRequest\022<\n\010endpoint\030" + + "\001 \001(\tB*\340A\002\372A$\n\"aiplatform.googleapis.com" + + "/Endpoint\022.\n\tinstances\030\002 \003(\0132\026.google.pr" + + "otobuf.ValueB\003\340A\002\022*\n\nparameters\030\003 \001(\0132\026." + + "google.protobuf.Value\"\200\002\n\017PredictRespons" + + "e\022+\n\013predictions\030\001 \003(\0132\026.google.protobuf" + + ".Value\022\031\n\021deployed_model_id\030\002 \001(\t\0226\n\005mod" + + "el\030\003 \001(\tB\'\340A\003\372A!\n\037aiplatform.googleapis." + + "com/Model\022\035\n\020model_version_id\030\005 \001(\tB\003\340A\003" + + "\022\037\n\022model_display_name\030\004 \001(\tB\003\340A\003\022-\n\010met" + + "adata\030\006 \001(\0132\026.google.protobuf.ValueB\003\340A\003" + + "\"z\n\021RawPredictRequest\022<\n\010endpoint\030\001 \001(\tB" + + "*\340A\002\372A$\n\"aiplatform.googleapis.com/Endpo" + + "int\022\'\n\thttp_body\030\002 \001(\0132\024.google.api.Http" + + "Body\"\200\001\n\027StreamRawPredictRequest\022<\n\010endp" + + "oint\030\001 \001(\tB*\340A\002\372A$\n\"aiplatform.googleapi" + + "s.com/Endpoint\022\'\n\thttp_body\030\002 \001(\0132\024.goog" + + "le.api.HttpBody\"\274\001\n\024DirectPredictRequest" + + "\022<\n\010endpoint\030\001 \001(\tB*\340A\002\372A$\n\"aiplatform.g" + + "oogleapis.com/Endpoint\0220\n\006inputs\030\002 \003(\0132 " + + ".google.cloud.vertexai.v1.Tensor\0224\n\npara" + + "meters\030\003 \001(\0132 .google.cloud.vertexai.v1." + + "Tensor\"\200\001\n\025DirectPredictResponse\0221\n\007outp" + + "uts\030\001 \003(\0132 .google.cloud.vertexai.v1.Ten" + + "sor\0224\n\nparameters\030\002 \001(\0132 .google.cloud.v" + + "ertexai.v1.Tensor\"{\n\027DirectRawPredictReq" + + "uest\022<\n\010endpoint\030\001 \001(\tB*\340A\002\372A$\n\"aiplatfo" + + "rm.googleapis.com/Endpoint\022\023\n\013method_nam" + + "e\030\002 \001(\t\022\r\n\005input\030\003 \001(\014\"*\n\030DirectRawPredi" + + "ctResponse\022\016\n\006output\030\001 \001(\014\"\314\001\n\032StreamDir" + + "ectPredictRequest\022<\n\010endpoint\030\001 \001(\tB*\340A\002" + + "\372A$\n\"aiplatform.googleapis.com/Endpoint\022" + + "5\n\006inputs\030\002 \003(\0132 .google.cloud.vertexai." + + "v1.TensorB\003\340A\001\0229\n\nparameters\030\003 \001(\0132 .goo" + + "gle.cloud.vertexai.v1.TensorB\003\340A\001\"\206\001\n\033St" + + "reamDirectPredictResponse\0221\n\007outputs\030\001 \003" + + "(\0132 .google.cloud.vertexai.v1.Tensor\0224\n\n" + + "parameters\030\002 \001(\0132 .google.cloud.vertexai" + + ".v1.Tensor\"\213\001\n\035StreamDirectRawPredictReq" + + "uest\022<\n\010endpoint\030\001 \001(\tB*\340A\002\372A$\n\"aiplatfo" + + "rm.googleapis.com/Endpoint\022\030\n\013method_nam" + + "e\030\002 \001(\tB\003\340A\001\022\022\n\005input\030\003 \001(\014B\003\340A\001\"0\n\036Stre" + + "amDirectRawPredictResponse\022\016\n\006output\030\001 \001" + + "(\014\"\277\001\n\027StreamingPredictRequest\022<\n\010endpoi" + + "nt\030\001 \001(\tB*\340A\002\372A$\n\"aiplatform.googleapis." + + "com/Endpoint\0220\n\006inputs\030\002 \003(\0132 .google.cl" + + "oud.vertexai.v1.Tensor\0224\n\nparameters\030\003 \001" + + "(\0132 .google.cloud.vertexai.v1.Tensor\"\203\001\n" + + "\030StreamingPredictResponse\0221\n\007outputs\030\001 \003" + + "(\0132 .google.cloud.vertexai.v1.Tensor\0224\n\n" + + "parameters\030\002 \001(\0132 .google.cloud.vertexai" + + ".v1.Tensor\"~\n\032StreamingRawPredictRequest" + + "\022<\n\010endpoint\030\001 \001(\tB*\340A\002\372A$\n\"aiplatform.g" + + "oogleapis.com/Endpoint\022\023\n\013method_name\030\002 " + + "\001(\t\022\r\n\005input\030\003 \001(\014\"-\n\033StreamingRawPredic" + + "tResponse\022\016\n\006output\030\001 \001(\014\"\233\002\n\016ExplainReq" + + "uest\022<\n\010endpoint\030\001 \001(\tB*\340A\002\372A$\n\"aiplatfo" + + "rm.googleapis.com/Endpoint\022.\n\tinstances\030" + + "\002 \003(\0132\026.google.protobuf.ValueB\003\340A\002\022*\n\npa" + + "rameters\030\004 \001(\0132\026.google.protobuf.Value\022T" + + "\n\031explanation_spec_override\030\005 \001(\01321.goog" + + "le.cloud.vertexai.v1.ExplanationSpecOver" + + "ride\022\031\n\021deployed_model_id\030\003 \001(\t\"\226\001\n\017Expl" + + "ainResponse\022;\n\014explanations\030\001 \003(\0132%.goog" + + "le.cloud.vertexai.v1.Explanation\022\031\n\021depl" + + "oyed_model_id\030\002 \001(\t\022+\n\013predictions\030\003 \003(\013" + + "2\026.google.protobuf.Value\"\320\001\n\022CountTokens" + + "Request\022<\n\010endpoint\030\001 \001(\tB*\340A\002\372A$\n\"aipla" + + "tform.googleapis.com/Endpoint\022\022\n\005model\030\003" + + " \001(\tB\003\340A\002\022.\n\tinstances\030\002 \003(\0132\026.google.pr" + + "otobuf.ValueB\003\340A\002\0228\n\010contents\030\004 \003(\0132!.go" + + "ogle.cloud.vertexai.v1.ContentB\003\340A\002\"N\n\023C" + + "ountTokensResponse\022\024\n\014total_tokens\030\001 \001(\005" + + "\022!\n\031total_billable_characters\030\002 \001(\005\"\255\002\n\026" + + "GenerateContentRequest\022\022\n\005model\030\005 \001(\tB\003\340" + + "A\002\0228\n\010contents\030\002 \003(\0132!.google.cloud.vert" + + "exai.v1.ContentB\003\340A\002\0222\n\005tools\030\006 \003(\0132\036.go" + + "ogle.cloud.vertexai.v1.ToolB\003\340A\001\022E\n\017safe" + + "ty_settings\030\003 \003(\0132\'.google.cloud.vertexa" + + "i.v1.SafetySettingB\003\340A\001\022J\n\021generation_co" + + "nfig\030\004 \001(\0132*.google.cloud.vertexai.v1.Ge" + + "nerationConfigB\003\340A\001\"\246\005\n\027GenerateContentR" + + "esponse\022<\n\ncandidates\030\002 \003(\0132#.google.clo" + + "ud.vertexai.v1.CandidateB\003\340A\003\022^\n\017prompt_" + + "feedback\030\003 \001(\0132@.google.cloud.vertexai.v" + + "1.GenerateContentResponse.PromptFeedback" + + "B\003\340A\003\022W\n\016usage_metadata\030\004 \001(\0132?.google.c" + + "loud.vertexai.v1.GenerateContentResponse" + + ".UsageMetadata\032\253\002\n\016PromptFeedback\022i\n\014blo" + + "ck_reason\030\001 \001(\0162N.google.cloud.vertexai." + + "v1.GenerateContentResponse.PromptFeedbac" + + "k.BlockedReasonB\003\340A\003\022C\n\016safety_ratings\030\002" + + " \003(\0132&.google.cloud.vertexai.v1.SafetyRa" + + "tingB\003\340A\003\022!\n\024block_reason_message\030\003 \001(\tB" + + "\003\340A\003\"F\n\rBlockedReason\022\036\n\032BLOCKED_REASON_" + "UNSPECIFIED\020\000\022\n\n\006SAFETY\020\001\022\t\n\005OTHER\020\002\032f\n\r" + "UsageMetadata\022\032\n\022prompt_token_count\030\001 \001(" + "\005\022\036\n\026candidates_token_count\030\002 \001(\005\022\031\n\021tot" - + "al_token_count\030\003 \001(\0052\321\020\n\021PredictionServi" + + "al_token_count\030\003 \001(\0052\257\027\n\021PredictionServi" + "ce\022\220\002\n\007Predict\022(.google.cloud.vertexai.v" + "1.PredictRequest\032).google.cloud.vertexai" + ".v1.PredictResponse\"\257\001\332A\035endpoint,instan" @@ -218,52 +255,73 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "point=projects/*/locations/*/endpoints/*" + "}:rawPredict:\001*ZK\"F/v1/{endpoint=project" + "s/*/locations/*/publishers/*/models/*}:r" - + "awPredict:\001*\022\274\001\n\rDirectPredict\022..google." - + "cloud.vertexai.v1.DirectPredictRequest\032/" - + ".google.cloud.vertexai.v1.DirectPredictR" - + "esponse\"J\202\323\344\223\002D\"?/v1/{endpoint=projects/" - + "*/locations/*/endpoints/*}:directPredict" - + ":\001*\022\310\001\n\020DirectRawPredict\0221.google.cloud." - + "vertexai.v1.DirectRawPredictRequest\0322.go" - + "ogle.cloud.vertexai.v1.DirectRawPredictR" - + "esponse\"M\202\323\344\223\002G\"B/v1/{endpoint=projects/" - + "*/locations/*/endpoints/*}:directRawPred" - + "ict:\001*\022\177\n\020StreamingPredict\0221.google.clou" - + "d.vertexai.v1.StreamingPredictRequest\0322." - + "google.cloud.vertexai.v1.StreamingPredic" - + "tResponse\"\000(\0010\001\022\261\002\n\026ServerStreamingPredi" - + "ct\0221.google.cloud.vertexai.v1.StreamingP" - + "redictRequest\0322.google.cloud.vertexai.v1" - + ".StreamingPredictResponse\"\255\001\202\323\344\223\002\246\001\"H/v1" - + "/{endpoint=projects/*/locations/*/endpoi" - + "nts/*}:serverStreamingPredict:\001*ZW\"R/v1/" - + "{endpoint=projects/*/locations/*/publish" - + "ers/*/models/*}:serverStreamingPredict:\001" - + "*0\001\022\210\001\n\023StreamingRawPredict\0224.google.clo" - + "ud.vertexai.v1.StreamingRawPredictReques" - + "t\0325.google.cloud.vertexai.v1.StreamingRa" - + "wPredictResponse\"\000(\0010\001\022\326\001\n\007Explain\022(.goo" - + "gle.cloud.vertexai.v1.ExplainRequest\032).g" - + "oogle.cloud.vertexai.v1.ExplainResponse\"" - + "v\332A/endpoint,instances,parameters,deploy" - + "ed_model_id\202\323\344\223\002>\"9/v1/{endpoint=project" - + "s/*/locations/*/endpoints/*}:explain:\001*\022" - + "\267\002\n\025StreamGenerateContent\0220.google.cloud" - + ".vertexai.v1.GenerateContentRequest\0321.go" - + "ogle.cloud.vertexai.v1.GenerateContentRe" - + "sponse\"\266\001\332A\016model,contents\202\323\344\223\002\236\001\"D/v1/{" - + "model=projects/*/locations/*/endpoints/*" - + "}:streamGenerateContent:\001*ZS\"N/v1/{model" - + "=projects/*/locations/*/publishers/*/mod" - + "els/*}:streamGenerateContent:\001*0\001\032M\312A\031ai" - + "platform.googleapis.com\322A.https://www.go" - + "ogleapis.com/auth/cloud-platformB\323\001\n\035com" - + ".google.cloud.vertexai.apiB\026PredictionSe" - + "rviceProtoP\001Z>cloud.google.com/go/aiplat" - + "form/apiv1/aiplatformpb;aiplatformpb\252\002\032G" - + "oogle.Cloud.AIPlatform.V1\312\002\032Google\\Cloud" - + "\\AIPlatform\\V1\352\002\035Google::Cloud::AIPlatfo" - + "rm::V1b\006proto3" + + "awPredict:\001*\022\226\002\n\020StreamRawPredict\0221.goog" + + "le.cloud.vertexai.v1.StreamRawPredictReq" + + "uest\032\024.google.api.HttpBody\"\266\001\332A\022endpoint" + + ",http_body\202\323\344\223\002\232\001\"B/v1/{endpoint=project" + + "s/*/locations/*/endpoints/*}:streamRawPr" + + "edict:\001*ZQ\"L/v1/{endpoint=projects/*/loc" + + "ations/*/publishers/*/models/*}:streamRa" + + "wPredict:\001*0\001\022\274\001\n\rDirectPredict\022..google" + + ".cloud.vertexai.v1.DirectPredictRequest\032" + + "/.google.cloud.vertexai.v1.DirectPredict" + + "Response\"J\202\323\344\223\002D\"?/v1/{endpoint=projects" + + "/*/locations/*/endpoints/*}:directPredic" + + "t:\001*\022\310\001\n\020DirectRawPredict\0221.google.cloud" + + ".vertexai.v1.DirectRawPredictRequest\0322.g" + + "oogle.cloud.vertexai.v1.DirectRawPredict" + + "Response\"M\202\323\344\223\002G\"B/v1/{endpoint=projects" + + "/*/locations/*/endpoints/*}:directRawPre" + + "dict:\001*\022\210\001\n\023StreamDirectPredict\0224.google" + + ".cloud.vertexai.v1.StreamDirectPredictRe" + + "quest\0325.google.cloud.vertexai.v1.StreamD" + + "irectPredictResponse\"\000(\0010\001\022\221\001\n\026StreamDir" + + "ectRawPredict\0227.google.cloud.vertexai.v1" + + ".StreamDirectRawPredictRequest\0328.google." + + "cloud.vertexai.v1.StreamDirectRawPredict" + + "Response\"\000(\0010\001\022\177\n\020StreamingPredict\0221.goo" + + "gle.cloud.vertexai.v1.StreamingPredictRe" + + "quest\0322.google.cloud.vertexai.v1.Streami" + + "ngPredictResponse\"\000(\0010\001\022\261\002\n\026ServerStream" + + "ingPredict\0221.google.cloud.vertexai.v1.St" + + "reamingPredictRequest\0322.google.cloud.ver" + + "texai.v1.StreamingPredictResponse\"\255\001\202\323\344\223" + + "\002\246\001\"H/v1/{endpoint=projects/*/locations/" + + "*/endpoints/*}:serverStreamingPredict:\001*" + + "ZW\"R/v1/{endpoint=projects/*/locations/*" + + "/publishers/*/models/*}:serverStreamingP" + + "redict:\001*0\001\022\210\001\n\023StreamingRawPredict\0224.go" + + "ogle.cloud.vertexai.v1.StreamingRawPredi" + + "ctRequest\0325.google.cloud.vertexai.v1.Str" + + "eamingRawPredictResponse\"\000(\0010\001\022\326\001\n\007Expla" + + "in\022(.google.cloud.vertexai.v1.ExplainReq" + + "uest\032).google.cloud.vertexai.v1.ExplainR" + + "esponse\"v\332A/endpoint,instances,parameter" + + "s,deployed_model_id\202\323\344\223\002>\"9/v1/{endpoint" + + "=projects/*/locations/*/endpoints/*}:exp" + + "lain:\001*\022\243\002\n\017GenerateContent\0220.google.clo" + + "ud.vertexai.v1.GenerateContentRequest\0321." + + "google.cloud.vertexai.v1.GenerateContent" + + "Response\"\252\001\332A\016model,contents\202\323\344\223\002\222\001\">/v1" + + "/{model=projects/*/locations/*/endpoints" + + "/*}:generateContent:\001*ZM\"H/v1/{model=pro" + + "jects/*/locations/*/publishers/*/models/" + + "*}:generateContent:\001*\022\267\002\n\025StreamGenerate" + + "Content\0220.google.cloud.vertexai.v1.Gener" + + "ateContentRequest\0321.google.cloud.vertexa" + + "i.v1.GenerateContentResponse\"\266\001\332A\016model," + + "contents\202\323\344\223\002\236\001\"D/v1/{model=projects/*/l" + + "ocations/*/endpoints/*}:streamGenerateCo" + + "ntent:\001*ZS\"N/v1/{model=projects/*/locati" + + "ons/*/publishers/*/models/*}:streamGener" + + "ateContent:\001*0\001\032M\312A\031aiplatform.googleapi" + + "s.com\322A.https://www.googleapis.com/auth/" + + "cloud-platformB\323\001\n\035com.google.cloud.vert" + + "exai.apiB\026PredictionServiceProtoP\001Z>clou" + + "d.google.com/go/aiplatform/apiv1/aiplatf" + + "ormpb;aiplatformpb\252\002\032Google.Cloud.AIPlat" + + "form.V1\312\002\032Google\\Cloud\\AIPlatform\\V1\352\002\035G" + + "oogle::Cloud::AIPlatform::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -309,8 +367,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Endpoint", "HttpBody", }); - internal_static_google_cloud_vertexai_v1_DirectPredictRequest_descriptor = + internal_static_google_cloud_vertexai_v1_StreamRawPredictRequest_descriptor = getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_vertexai_v1_StreamRawPredictRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vertexai_v1_StreamRawPredictRequest_descriptor, + new java.lang.String[] { + "Endpoint", "HttpBody", + }); + internal_static_google_cloud_vertexai_v1_DirectPredictRequest_descriptor = + getDescriptor().getMessageTypes().get(4); internal_static_google_cloud_vertexai_v1_DirectPredictRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_vertexai_v1_DirectPredictRequest_descriptor, @@ -318,7 +384,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Endpoint", "Inputs", "Parameters", }); internal_static_google_cloud_vertexai_v1_DirectPredictResponse_descriptor = - getDescriptor().getMessageTypes().get(4); + getDescriptor().getMessageTypes().get(5); internal_static_google_cloud_vertexai_v1_DirectPredictResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_vertexai_v1_DirectPredictResponse_descriptor, @@ -326,7 +392,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Outputs", "Parameters", }); internal_static_google_cloud_vertexai_v1_DirectRawPredictRequest_descriptor = - getDescriptor().getMessageTypes().get(5); + getDescriptor().getMessageTypes().get(6); internal_static_google_cloud_vertexai_v1_DirectRawPredictRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_vertexai_v1_DirectRawPredictRequest_descriptor, @@ -334,15 +400,47 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Endpoint", "MethodName", "Input", }); internal_static_google_cloud_vertexai_v1_DirectRawPredictResponse_descriptor = - getDescriptor().getMessageTypes().get(6); + getDescriptor().getMessageTypes().get(7); internal_static_google_cloud_vertexai_v1_DirectRawPredictResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_vertexai_v1_DirectRawPredictResponse_descriptor, new java.lang.String[] { "Output", }); + internal_static_google_cloud_vertexai_v1_StreamDirectPredictRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_vertexai_v1_StreamDirectPredictRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vertexai_v1_StreamDirectPredictRequest_descriptor, + new java.lang.String[] { + "Endpoint", "Inputs", "Parameters", + }); + internal_static_google_cloud_vertexai_v1_StreamDirectPredictResponse_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_vertexai_v1_StreamDirectPredictResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vertexai_v1_StreamDirectPredictResponse_descriptor, + new java.lang.String[] { + "Outputs", "Parameters", + }); + internal_static_google_cloud_vertexai_v1_StreamDirectRawPredictRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_vertexai_v1_StreamDirectRawPredictRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vertexai_v1_StreamDirectRawPredictRequest_descriptor, + new java.lang.String[] { + "Endpoint", "MethodName", "Input", + }); + internal_static_google_cloud_vertexai_v1_StreamDirectRawPredictResponse_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_vertexai_v1_StreamDirectRawPredictResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_vertexai_v1_StreamDirectRawPredictResponse_descriptor, + new java.lang.String[] { + "Output", + }); internal_static_google_cloud_vertexai_v1_StreamingPredictRequest_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageTypes().get(12); internal_static_google_cloud_vertexai_v1_StreamingPredictRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_vertexai_v1_StreamingPredictRequest_descriptor, @@ -350,7 +448,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Endpoint", "Inputs", "Parameters", }); internal_static_google_cloud_vertexai_v1_StreamingPredictResponse_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageTypes().get(13); internal_static_google_cloud_vertexai_v1_StreamingPredictResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_vertexai_v1_StreamingPredictResponse_descriptor, @@ -358,7 +456,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Outputs", "Parameters", }); internal_static_google_cloud_vertexai_v1_StreamingRawPredictRequest_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageTypes().get(14); internal_static_google_cloud_vertexai_v1_StreamingRawPredictRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_vertexai_v1_StreamingRawPredictRequest_descriptor, @@ -366,7 +464,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Endpoint", "MethodName", "Input", }); internal_static_google_cloud_vertexai_v1_StreamingRawPredictResponse_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageTypes().get(15); internal_static_google_cloud_vertexai_v1_StreamingRawPredictResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_vertexai_v1_StreamingRawPredictResponse_descriptor, @@ -374,7 +472,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Output", }); internal_static_google_cloud_vertexai_v1_ExplainRequest_descriptor = - getDescriptor().getMessageTypes().get(11); + getDescriptor().getMessageTypes().get(16); internal_static_google_cloud_vertexai_v1_ExplainRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_vertexai_v1_ExplainRequest_descriptor, @@ -382,7 +480,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Endpoint", "Instances", "Parameters", "ExplanationSpecOverride", "DeployedModelId", }); internal_static_google_cloud_vertexai_v1_ExplainResponse_descriptor = - getDescriptor().getMessageTypes().get(12); + getDescriptor().getMessageTypes().get(17); internal_static_google_cloud_vertexai_v1_ExplainResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_vertexai_v1_ExplainResponse_descriptor, @@ -390,7 +488,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Explanations", "DeployedModelId", "Predictions", }); internal_static_google_cloud_vertexai_v1_CountTokensRequest_descriptor = - getDescriptor().getMessageTypes().get(13); + getDescriptor().getMessageTypes().get(18); internal_static_google_cloud_vertexai_v1_CountTokensRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_vertexai_v1_CountTokensRequest_descriptor, @@ -398,7 +496,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Endpoint", "Model", "Instances", "Contents", }); internal_static_google_cloud_vertexai_v1_CountTokensResponse_descriptor = - getDescriptor().getMessageTypes().get(14); + getDescriptor().getMessageTypes().get(19); internal_static_google_cloud_vertexai_v1_CountTokensResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_vertexai_v1_CountTokensResponse_descriptor, @@ -406,7 +504,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "TotalTokens", "TotalBillableCharacters", }); internal_static_google_cloud_vertexai_v1_GenerateContentRequest_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageTypes().get(20); internal_static_google_cloud_vertexai_v1_GenerateContentRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_vertexai_v1_GenerateContentRequest_descriptor, @@ -414,7 +512,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Model", "Contents", "Tools", "SafetySettings", "GenerationConfig", }); internal_static_google_cloud_vertexai_v1_GenerateContentResponse_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageTypes().get(21); internal_static_google_cloud_vertexai_v1_GenerateContentResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_vertexai_v1_GenerateContentResponse_descriptor, diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Presets.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Presets.java index 06585359610f..8786089d86ff 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Presets.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Presets.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/explanation.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PresetsOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PresetsOrBuilder.java index 916858272e68..ea41f12c6923 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PresetsOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PresetsOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/explanation.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface PresetsOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PrivateEndpoints.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PrivateEndpoints.java index 5cbba6acd96e..e1c41771c3c0 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PrivateEndpoints.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PrivateEndpoints.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/endpoint.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PrivateEndpointsOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PrivateEndpointsOrBuilder.java index 77bf976dee3f..9959c82819b3 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PrivateEndpointsOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/PrivateEndpointsOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/endpoint.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface PrivateEndpointsOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RawPredictRequest.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RawPredictRequest.java index 3a8da42eaecf..22bfe4dda4b9 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RawPredictRequest.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RawPredictRequest.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/prediction_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** @@ -63,6 +64,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.vertexai.api.RawPredictRequest.Builder.class); } + private int bitField0_; public static final int ENDPOINT_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -151,7 +153,7 @@ public com.google.protobuf.ByteString getEndpointBytes() { */ @java.lang.Override public boolean hasHttpBody() { - return httpBody_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** * @@ -227,7 +229,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpoint_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, endpoint_); } - if (httpBody_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getHttpBody()); } getUnknownFields().writeTo(output); @@ -242,7 +244,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpoint_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, endpoint_); } - if (httpBody_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getHttpBody()); } size += getUnknownFields().getSerializedSize(); @@ -413,10 +415,19 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.vertexai.api.RawPredictRequest.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getHttpBodyFieldBuilder(); + } } @java.lang.Override @@ -468,9 +479,12 @@ private void buildPartial0(com.google.cloud.vertexai.api.RawPredictRequest resul if (((from_bitField0_ & 0x00000001) != 0)) { result.endpoint_ = endpoint_; } + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000002) != 0)) { result.httpBody_ = httpBodyBuilder_ == null ? httpBody_ : httpBodyBuilder_.build(); + to_bitField0_ |= 0x00000001; } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -880,8 +894,10 @@ public Builder mergeHttpBody(com.google.api.HttpBody value) { } else { httpBodyBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000002; - onChanged(); + if (httpBody_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } return this; } /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RawPredictRequestOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RawPredictRequestOrBuilder.java index 372051cd3e67..59d34a30c5c0 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RawPredictRequestOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/RawPredictRequestOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/prediction_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface RawPredictRequestOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ResourcesConsumed.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ResourcesConsumed.java index 638e4e8b35ea..df79d91f95cf 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ResourcesConsumed.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ResourcesConsumed.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/machine_resources.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ResourcesConsumedOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ResourcesConsumedOrBuilder.java index ef0820d081bb..67731de1e4bc 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ResourcesConsumedOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ResourcesConsumedOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/machine_resources.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface ResourcesConsumedOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SafetyRating.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SafetyRating.java index 5a24c4713704..0d1dbc13345d 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SafetyRating.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SafetyRating.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/content.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SafetyRatingOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SafetyRatingOrBuilder.java index e26d4786d517..8cb60f54a6ba 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SafetyRatingOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SafetyRatingOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/content.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface SafetyRatingOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SafetySetting.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SafetySetting.java index eab6b10566c9..58f4bf0ffa36 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SafetySetting.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SafetySetting.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/content.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SafetySettingOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SafetySettingOrBuilder.java index 563b5e209a29..89af78026bc1 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SafetySettingOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SafetySettingOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/content.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface SafetySettingOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SampledShapleyAttribution.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SampledShapleyAttribution.java index e5af179d7860..08649c276faa 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SampledShapleyAttribution.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SampledShapleyAttribution.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/explanation.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SampledShapleyAttributionOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SampledShapleyAttributionOrBuilder.java index 407e01339b2f..85ca7e994d38 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SampledShapleyAttributionOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SampledShapleyAttributionOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/explanation.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface SampledShapleyAttributionOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Schema.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Schema.java index 8d718ea68cfc..7ef975ebafdf 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Schema.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Schema.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/openapi.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** @@ -61,7 +62,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings({"rawtypes"}) @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { switch (number) { case 3: return internalGetProperties(); @@ -80,6 +82,7 @@ protected com.google.protobuf.MapField internalGetMapField(int number) { com.google.cloud.vertexai.api.Schema.Builder.class); } + private int bitField0_; public static final int TYPE_FIELD_NUMBER = 1; private int type_ = 0; /** @@ -256,7 +259,7 @@ public boolean getNullable() { */ @java.lang.Override public boolean hasItems() { - return items_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** * @@ -558,7 +561,7 @@ public com.google.protobuf.ByteString getRequiredBytes(int index) { */ @java.lang.Override public boolean hasExample() { - return example_ != null; + return ((bitField0_ & 0x00000002) != 0); } /** * @@ -608,12 +611,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (type_ != com.google.cloud.vertexai.api.Type.TYPE_UNSPECIFIED.getNumber()) { output.writeEnum(1, type_); } - if (items_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getItems()); } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetProperties(), PropertiesDefaultEntryHolder.defaultEntry, 3); - if (example_ != null) { + if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(4, getExample()); } for (int i = 0; i < required_.size(); i++) { @@ -643,7 +646,7 @@ public int getSerializedSize() { if (type_ != com.google.cloud.vertexai.api.Type.TYPE_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_); } - if (items_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getItems()); } for (java.util.Map.Entry entry : @@ -657,7 +660,7 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, properties__); } - if (example_ != null) { + if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getExample()); } { @@ -875,7 +878,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { switch (number) { case 3: return internalGetProperties(); @@ -885,7 +889,8 @@ protected com.google.protobuf.MapField internalGetMapField(int number) { } @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { switch (number) { case 3: return internalGetMutableProperties(); @@ -905,10 +910,20 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.vertexai.api.Schema.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getItemsFieldBuilder(); + getExampleFieldBuilder(); + } } @java.lang.Override @@ -979,16 +994,18 @@ private void buildPartial0(com.google.cloud.vertexai.api.Schema result) { if (((from_bitField0_ & 0x00000008) != 0)) { result.nullable_ = nullable_; } + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000010) != 0)) { result.items_ = itemsBuilder_ == null ? items_ : itemsBuilder_.build(); + to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000020) != 0)) { enum_.makeImmutable(); result.enum_ = enum_; } if (((from_bitField0_ & 0x00000040) != 0)) { - result.properties_ = internalGetProperties(); - result.properties_.makeImmutable(); + result.properties_ = + internalGetProperties().build(PropertiesDefaultEntryHolder.defaultEntry); } if (((from_bitField0_ & 0x00000080) != 0)) { required_.makeImmutable(); @@ -996,7 +1013,9 @@ private void buildPartial0(com.google.cloud.vertexai.api.Schema result) { } if (((from_bitField0_ & 0x00000100) != 0)) { result.example_ = exampleBuilder_ == null ? example_ : exampleBuilder_.build(); + to_bitField0_ |= 0x00000002; } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -1134,7 +1153,7 @@ public Builder mergeFrom( PropertiesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); internalGetMutableProperties() - .getMutableMap() + .ensureBuilderMap() .put(properties__.getKey(), properties__.getValue()); bitField0_ |= 0x00000040; break; @@ -1676,8 +1695,10 @@ public Builder mergeItems(com.google.cloud.vertexai.api.Schema value) { } else { itemsBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000010; - onChanged(); + if (items_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } return this; } /** @@ -1951,26 +1972,56 @@ public Builder addEnumBytes(com.google.protobuf.ByteString value) { return this; } - private com.google.protobuf.MapField + private static final class PropertiesConverter + implements com.google.protobuf.MapFieldBuilder.Converter< + java.lang.String, + com.google.cloud.vertexai.api.SchemaOrBuilder, + com.google.cloud.vertexai.api.Schema> { + @java.lang.Override + public com.google.cloud.vertexai.api.Schema build( + com.google.cloud.vertexai.api.SchemaOrBuilder val) { + if (val instanceof com.google.cloud.vertexai.api.Schema) { + return (com.google.cloud.vertexai.api.Schema) val; + } + return ((com.google.cloud.vertexai.api.Schema.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry + defaultEntry() { + return PropertiesDefaultEntryHolder.defaultEntry; + } + }; + + private static final PropertiesConverter propertiesConverter = new PropertiesConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.cloud.vertexai.api.SchemaOrBuilder, + com.google.cloud.vertexai.api.Schema, + com.google.cloud.vertexai.api.Schema.Builder> properties_; - private com.google.protobuf.MapField + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.cloud.vertexai.api.SchemaOrBuilder, + com.google.cloud.vertexai.api.Schema, + com.google.cloud.vertexai.api.Schema.Builder> internalGetProperties() { if (properties_ == null) { - return com.google.protobuf.MapField.emptyMapField( - PropertiesDefaultEntryHolder.defaultEntry); + return new com.google.protobuf.MapFieldBuilder<>(propertiesConverter); } return properties_; } - private com.google.protobuf.MapField + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.cloud.vertexai.api.SchemaOrBuilder, + com.google.cloud.vertexai.api.Schema, + com.google.cloud.vertexai.api.Schema.Builder> internalGetMutableProperties() { if (properties_ == null) { - properties_ = - com.google.protobuf.MapField.newMapField(PropertiesDefaultEntryHolder.defaultEntry); - } - if (!properties_.isMutable()) { - properties_ = properties_.copy(); + properties_ = new com.google.protobuf.MapFieldBuilder<>(propertiesConverter); } bitField0_ |= 0x00000040; onChanged(); @@ -1978,7 +2029,7 @@ public Builder addEnumBytes(com.google.protobuf.ByteString value) { } public int getPropertiesCount() { - return internalGetProperties().getMap().size(); + return internalGetProperties().ensureBuilderMap().size(); } /** * @@ -1996,7 +2047,7 @@ public boolean containsProperties(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } - return internalGetProperties().getMap().containsKey(key); + return internalGetProperties().ensureBuilderMap().containsKey(key); } /** Use {@link #getPropertiesMap()} instead. */ @java.lang.Override @@ -2018,7 +2069,7 @@ public java.util.Map get @java.lang.Override public java.util.Map getPropertiesMap() { - return internalGetProperties().getMap(); + return internalGetProperties().getImmutableMap(); } /** * @@ -2039,9 +2090,9 @@ public java.util.Map get if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetProperties().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; + java.util.Map map = + internalGetMutableProperties().ensureBuilderMap(); + return map.containsKey(key) ? propertiesConverter.build(map.get(key)) : defaultValue; } /** * @@ -2059,17 +2110,17 @@ public com.google.cloud.vertexai.api.Schema getPropertiesOrThrow(java.lang.Strin if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetProperties().getMap(); + java.util.Map map = + internalGetMutableProperties().ensureBuilderMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } - return map.get(key); + return propertiesConverter.build(map.get(key)); } public Builder clearProperties() { bitField0_ = (bitField0_ & ~0x00000040); - internalGetMutableProperties().getMutableMap().clear(); + internalGetMutableProperties().clear(); return this; } /** @@ -2087,7 +2138,7 @@ public Builder removeProperties(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableProperties().getMutableMap().remove(key); + internalGetMutableProperties().ensureBuilderMap().remove(key); return this; } /** Use alternate mutation accessors instead. */ @@ -2095,7 +2146,7 @@ public Builder removeProperties(java.lang.String key) { public java.util.Map getMutableProperties() { bitField0_ |= 0x00000040; - return internalGetMutableProperties().getMutableMap(); + return internalGetMutableProperties().ensureMessageMap(); } /** * @@ -2115,7 +2166,7 @@ public Builder putProperties(java.lang.String key, com.google.cloud.vertexai.api if (value == null) { throw new NullPointerException("map value"); } - internalGetMutableProperties().getMutableMap().put(key, value); + internalGetMutableProperties().ensureBuilderMap().put(key, value); bitField0_ |= 0x00000040; return this; } @@ -2132,10 +2183,42 @@ public Builder putProperties(java.lang.String key, com.google.cloud.vertexai.api */ public Builder putAllProperties( java.util.Map values) { - internalGetMutableProperties().getMutableMap().putAll(values); + for (java.util.Map.Entry e : + values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableProperties().ensureBuilderMap().putAll(values); bitField0_ |= 0x00000040; return this; } + /** + * + * + *
+     * Optional. Properties of Type.OBJECT.
+     * 
+ * + * + * map<string, .google.cloud.vertexai.v1.Schema> properties = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.vertexai.api.Schema.Builder putPropertiesBuilderIfAbsent( + java.lang.String key) { + java.util.Map builderMap = + internalGetMutableProperties().ensureBuilderMap(); + com.google.cloud.vertexai.api.SchemaOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = com.google.cloud.vertexai.api.Schema.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof com.google.cloud.vertexai.api.Schema) { + entry = ((com.google.cloud.vertexai.api.Schema) entry).toBuilder(); + builderMap.put(key, entry); + } + return (com.google.cloud.vertexai.api.Schema.Builder) entry; + } private com.google.protobuf.LazyStringArrayList required_ = com.google.protobuf.LazyStringArrayList.emptyList(); @@ -2416,8 +2499,10 @@ public Builder mergeExample(com.google.protobuf.Value value) { } else { exampleBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000100; - onChanged(); + if (example_ != null) { + bitField0_ |= 0x00000100; + onChanged(); + } return this; } /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SchemaOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SchemaOrBuilder.java index 457594777aa4..5f85753aca11 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SchemaOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SchemaOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/openapi.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface SchemaOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SmoothGradConfig.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SmoothGradConfig.java index a3092823cdaf..328cb4692b8a 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SmoothGradConfig.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SmoothGradConfig.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/explanation.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SmoothGradConfigOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SmoothGradConfigOrBuilder.java index cbe97af195b4..4fe6f48641d7 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SmoothGradConfigOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/SmoothGradConfigOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/explanation.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface SmoothGradConfigOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamDirectPredictRequest.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamDirectPredictRequest.java new file mode 100644 index 000000000000..d3782eaa0791 --- /dev/null +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamDirectPredictRequest.java @@ -0,0 +1,1508 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vertexai/v1/prediction_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.vertexai.api; + +/** + * + * + *
+ * 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.vertexai.v1.StreamDirectPredictRequest} + */ +public final class StreamDirectPredictRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.vertexai.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.vertexai.api.PredictionServiceProto + .internal_static_google_cloud_vertexai_v1_StreamDirectPredictRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vertexai.api.PredictionServiceProto + .internal_static_google_cloud_vertexai_v1_StreamDirectPredictRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vertexai.api.StreamDirectPredictRequest.class, + com.google.cloud.vertexai.api.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 inputs_; + /** + * + * + *
+   * Optional. The prediction input.
+   * 
+ * + * + * repeated .google.cloud.vertexai.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getInputsList() { + return inputs_; + } + /** + * + * + *
+   * Optional. The prediction input.
+   * 
+ * + * + * repeated .google.cloud.vertexai.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getInputsOrBuilderList() { + return inputs_; + } + /** + * + * + *
+   * Optional. The prediction input.
+   * 
+ * + * + * repeated .google.cloud.vertexai.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.vertexai.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.vertexai.api.Tensor getInputs(int index) { + return inputs_.get(index); + } + /** + * + * + *
+   * Optional. The prediction input.
+   * 
+ * + * + * repeated .google.cloud.vertexai.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.vertexai.api.TensorOrBuilder getInputsOrBuilder(int index) { + return inputs_.get(index); + } + + public static final int PARAMETERS_FIELD_NUMBER = 3; + private com.google.cloud.vertexai.api.Tensor parameters_; + /** + * + * + *
+   * Optional. The parameters that govern the prediction.
+   * 
+ * + * + * .google.cloud.vertexai.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.vertexai.v1.Tensor parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The parameters. + */ + @java.lang.Override + public com.google.cloud.vertexai.api.Tensor getParameters() { + return parameters_ == null + ? com.google.cloud.vertexai.api.Tensor.getDefaultInstance() + : parameters_; + } + /** + * + * + *
+   * Optional. The parameters that govern the prediction.
+   * 
+ * + * + * .google.cloud.vertexai.v1.Tensor parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.vertexai.api.TensorOrBuilder getParametersOrBuilder() { + return parameters_ == null + ? com.google.cloud.vertexai.api.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.vertexai.api.StreamDirectPredictRequest)) { + return super.equals(obj); + } + com.google.cloud.vertexai.api.StreamDirectPredictRequest other = + (com.google.cloud.vertexai.api.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.vertexai.api.StreamDirectPredictRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.vertexai.api.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.vertexai.api.StreamDirectPredictRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.vertexai.api.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.vertexai.api.StreamDirectPredictRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.vertexai.api.StreamDirectPredictRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.vertexai.api.StreamDirectPredictRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.vertexai.api.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.vertexai.api.StreamDirectPredictRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.vertexai.api.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.vertexai.api.StreamDirectPredictRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.vertexai.api.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.vertexai.api.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.vertexai.v1.StreamDirectPredictRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.StreamDirectPredictRequest) + com.google.cloud.vertexai.api.StreamDirectPredictRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.vertexai.api.PredictionServiceProto + .internal_static_google_cloud_vertexai_v1_StreamDirectPredictRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vertexai.api.PredictionServiceProto + .internal_static_google_cloud_vertexai_v1_StreamDirectPredictRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vertexai.api.StreamDirectPredictRequest.class, + com.google.cloud.vertexai.api.StreamDirectPredictRequest.Builder.class); + } + + // Construct using com.google.cloud.vertexai.api.StreamDirectPredictRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getInputsFieldBuilder(); + getParametersFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + endpoint_ = ""; + if (inputsBuilder_ == null) { + inputs_ = java.util.Collections.emptyList(); + } else { + inputs_ = null; + inputsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + parameters_ = null; + if (parametersBuilder_ != null) { + parametersBuilder_.dispose(); + parametersBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.vertexai.api.PredictionServiceProto + .internal_static_google_cloud_vertexai_v1_StreamDirectPredictRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vertexai.api.StreamDirectPredictRequest getDefaultInstanceForType() { + return com.google.cloud.vertexai.api.StreamDirectPredictRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vertexai.api.StreamDirectPredictRequest build() { + com.google.cloud.vertexai.api.StreamDirectPredictRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vertexai.api.StreamDirectPredictRequest buildPartial() { + com.google.cloud.vertexai.api.StreamDirectPredictRequest result = + new com.google.cloud.vertexai.api.StreamDirectPredictRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.vertexai.api.StreamDirectPredictRequest result) { + if (inputsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + inputs_ = java.util.Collections.unmodifiableList(inputs_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.inputs_ = inputs_; + } else { + result.inputs_ = inputsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.vertexai.api.StreamDirectPredictRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.endpoint_ = endpoint_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.parameters_ = parametersBuilder_ == null ? parameters_ : parametersBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vertexai.api.StreamDirectPredictRequest) { + return mergeFrom((com.google.cloud.vertexai.api.StreamDirectPredictRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vertexai.api.StreamDirectPredictRequest other) { + if (other == com.google.cloud.vertexai.api.StreamDirectPredictRequest.getDefaultInstance()) + return this; + if (!other.getEndpoint().isEmpty()) { + endpoint_ = other.endpoint_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (inputsBuilder_ == null) { + if (!other.inputs_.isEmpty()) { + if (inputs_.isEmpty()) { + inputs_ = other.inputs_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureInputsIsMutable(); + inputs_.addAll(other.inputs_); + } + onChanged(); + } + } else { + if (!other.inputs_.isEmpty()) { + if (inputsBuilder_.isEmpty()) { + inputsBuilder_.dispose(); + inputsBuilder_ = null; + inputs_ = other.inputs_; + bitField0_ = (bitField0_ & ~0x00000002); + inputsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getInputsFieldBuilder() + : null; + } else { + inputsBuilder_.addAllMessages(other.inputs_); + } + } + } + if (other.hasParameters()) { + mergeParameters(other.getParameters()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + endpoint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + com.google.cloud.vertexai.api.Tensor m = + input.readMessage( + com.google.cloud.vertexai.api.Tensor.parser(), extensionRegistry); + if (inputsBuilder_ == null) { + ensureInputsIsMutable(); + inputs_.add(m); + } else { + inputsBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + input.readMessage(getParametersFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object 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. + */ + 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 inputs_ = + java.util.Collections.emptyList(); + + private void ensureInputsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + inputs_ = new java.util.ArrayList(inputs_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vertexai.api.Tensor, + com.google.cloud.vertexai.api.Tensor.Builder, + com.google.cloud.vertexai.api.TensorOrBuilder> + inputsBuilder_; + + /** + * + * + *
+     * Optional. The prediction input.
+     * 
+ * + * + * repeated .google.cloud.vertexai.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getInputsList() { + if (inputsBuilder_ == null) { + return java.util.Collections.unmodifiableList(inputs_); + } else { + return inputsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Optional. The prediction input.
+     * 
+ * + * + * repeated .google.cloud.vertexai.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.vertexai.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.vertexai.api.Tensor getInputs(int index) { + if (inputsBuilder_ == null) { + return inputs_.get(index); + } else { + return inputsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Optional. The prediction input.
+     * 
+ * + * + * repeated .google.cloud.vertexai.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setInputs(int index, com.google.cloud.vertexai.api.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.vertexai.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setInputs( + int index, com.google.cloud.vertexai.api.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.vertexai.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addInputs(com.google.cloud.vertexai.api.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.vertexai.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addInputs(int index, com.google.cloud.vertexai.api.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.vertexai.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addInputs(com.google.cloud.vertexai.api.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.vertexai.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addInputs( + int index, com.google.cloud.vertexai.api.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.vertexai.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllInputs( + java.lang.Iterable 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.vertexai.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.vertexai.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.vertexai.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.vertexai.api.Tensor.Builder getInputsBuilder(int index) { + return getInputsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Optional. The prediction input.
+     * 
+ * + * + * repeated .google.cloud.vertexai.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.vertexai.api.TensorOrBuilder getInputsOrBuilder(int index) { + if (inputsBuilder_ == null) { + return inputs_.get(index); + } else { + return inputsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Optional. The prediction input.
+     * 
+ * + * + * repeated .google.cloud.vertexai.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getInputsOrBuilderList() { + if (inputsBuilder_ != null) { + return inputsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(inputs_); + } + } + /** + * + * + *
+     * Optional. The prediction input.
+     * 
+ * + * + * repeated .google.cloud.vertexai.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.vertexai.api.Tensor.Builder addInputsBuilder() { + return getInputsFieldBuilder() + .addBuilder(com.google.cloud.vertexai.api.Tensor.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. The prediction input.
+     * 
+ * + * + * repeated .google.cloud.vertexai.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.vertexai.api.Tensor.Builder addInputsBuilder(int index) { + return getInputsFieldBuilder() + .addBuilder(index, com.google.cloud.vertexai.api.Tensor.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. The prediction input.
+     * 
+ * + * + * repeated .google.cloud.vertexai.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getInputsBuilderList() { + return getInputsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vertexai.api.Tensor, + com.google.cloud.vertexai.api.Tensor.Builder, + com.google.cloud.vertexai.api.TensorOrBuilder> + getInputsFieldBuilder() { + if (inputsBuilder_ == null) { + inputsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vertexai.api.Tensor, + com.google.cloud.vertexai.api.Tensor.Builder, + com.google.cloud.vertexai.api.TensorOrBuilder>( + inputs_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + inputs_ = null; + } + return inputsBuilder_; + } + + private com.google.cloud.vertexai.api.Tensor parameters_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vertexai.api.Tensor, + com.google.cloud.vertexai.api.Tensor.Builder, + com.google.cloud.vertexai.api.TensorOrBuilder> + parametersBuilder_; + /** + * + * + *
+     * Optional. The parameters that govern the prediction.
+     * 
+ * + * + * .google.cloud.vertexai.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.vertexai.v1.Tensor parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The parameters. + */ + public com.google.cloud.vertexai.api.Tensor getParameters() { + if (parametersBuilder_ == null) { + return parameters_ == null + ? com.google.cloud.vertexai.api.Tensor.getDefaultInstance() + : parameters_; + } else { + return parametersBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The parameters that govern the prediction.
+     * 
+ * + * + * .google.cloud.vertexai.v1.Tensor parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setParameters(com.google.cloud.vertexai.api.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.vertexai.v1.Tensor parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setParameters(com.google.cloud.vertexai.api.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.vertexai.v1.Tensor parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeParameters(com.google.cloud.vertexai.api.Tensor value) { + if (parametersBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && parameters_ != null + && parameters_ != com.google.cloud.vertexai.api.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.vertexai.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.vertexai.v1.Tensor parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.vertexai.api.Tensor.Builder getParametersBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getParametersFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The parameters that govern the prediction.
+     * 
+ * + * + * .google.cloud.vertexai.v1.Tensor parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.vertexai.api.TensorOrBuilder getParametersOrBuilder() { + if (parametersBuilder_ != null) { + return parametersBuilder_.getMessageOrBuilder(); + } else { + return parameters_ == null + ? com.google.cloud.vertexai.api.Tensor.getDefaultInstance() + : parameters_; + } + } + /** + * + * + *
+     * Optional. The parameters that govern the prediction.
+     * 
+ * + * + * .google.cloud.vertexai.v1.Tensor parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vertexai.api.Tensor, + com.google.cloud.vertexai.api.Tensor.Builder, + com.google.cloud.vertexai.api.TensorOrBuilder> + getParametersFieldBuilder() { + if (parametersBuilder_ == null) { + parametersBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vertexai.api.Tensor, + com.google.cloud.vertexai.api.Tensor.Builder, + com.google.cloud.vertexai.api.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.vertexai.v1.StreamDirectPredictRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.StreamDirectPredictRequest) + private static final com.google.cloud.vertexai.api.StreamDirectPredictRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.StreamDirectPredictRequest(); + } + + public static com.google.cloud.vertexai.api.StreamDirectPredictRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StreamDirectPredictRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vertexai.api.StreamDirectPredictRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamDirectPredictRequestOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamDirectPredictRequestOrBuilder.java new file mode 100644 index 000000000000..362783c695fb --- /dev/null +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamDirectPredictRequestOrBuilder.java @@ -0,0 +1,161 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vertexai/v1/prediction_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.vertexai.api; + +public interface StreamDirectPredictRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.StreamDirectPredictRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * 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.vertexai.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getInputsList(); + /** + * + * + *
+   * Optional. The prediction input.
+   * 
+ * + * + * repeated .google.cloud.vertexai.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.vertexai.api.Tensor getInputs(int index); + /** + * + * + *
+   * Optional. The prediction input.
+   * 
+ * + * + * repeated .google.cloud.vertexai.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getInputsCount(); + /** + * + * + *
+   * Optional. The prediction input.
+   * 
+ * + * + * repeated .google.cloud.vertexai.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getInputsOrBuilderList(); + /** + * + * + *
+   * Optional. The prediction input.
+   * 
+ * + * + * repeated .google.cloud.vertexai.v1.Tensor inputs = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.vertexai.api.TensorOrBuilder getInputsOrBuilder(int index); + + /** + * + * + *
+   * Optional. The parameters that govern the prediction.
+   * 
+ * + * + * .google.cloud.vertexai.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.vertexai.v1.Tensor parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The parameters. + */ + com.google.cloud.vertexai.api.Tensor getParameters(); + /** + * + * + *
+   * Optional. The parameters that govern the prediction.
+   * 
+ * + * + * .google.cloud.vertexai.v1.Tensor parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.vertexai.api.TensorOrBuilder getParametersOrBuilder(); +} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamDirectPredictResponse.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamDirectPredictResponse.java new file mode 100644 index 000000000000..aa873f79be5e --- /dev/null +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/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/vertexai/v1/prediction_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.vertexai.api; + +/** + * + * + *
+ * Response message for
+ * [PredictionService.StreamDirectPredict][google.cloud.aiplatform.v1.PredictionService.StreamDirectPredict].
+ * 
+ * + * Protobuf type {@code google.cloud.vertexai.v1.StreamDirectPredictResponse} + */ +public final class StreamDirectPredictResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.vertexai.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.vertexai.api.PredictionServiceProto + .internal_static_google_cloud_vertexai_v1_StreamDirectPredictResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vertexai.api.PredictionServiceProto + .internal_static_google_cloud_vertexai_v1_StreamDirectPredictResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vertexai.api.StreamDirectPredictResponse.class, + com.google.cloud.vertexai.api.StreamDirectPredictResponse.Builder.class); + } + + private int bitField0_; + public static final int OUTPUTS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List outputs_; + /** + * + * + *
+   * The prediction output.
+   * 
+ * + * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; + */ + @java.lang.Override + public java.util.List getOutputsList() { + return outputs_; + } + /** + * + * + *
+   * The prediction output.
+   * 
+ * + * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; + */ + @java.lang.Override + public java.util.List + getOutputsOrBuilderList() { + return outputs_; + } + /** + * + * + *
+   * The prediction output.
+   * 
+ * + * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; + */ + @java.lang.Override + public int getOutputsCount() { + return outputs_.size(); + } + /** + * + * + *
+   * The prediction output.
+   * 
+ * + * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; + */ + @java.lang.Override + public com.google.cloud.vertexai.api.Tensor getOutputs(int index) { + return outputs_.get(index); + } + /** + * + * + *
+   * The prediction output.
+   * 
+ * + * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; + */ + @java.lang.Override + public com.google.cloud.vertexai.api.TensorOrBuilder getOutputsOrBuilder(int index) { + return outputs_.get(index); + } + + public static final int PARAMETERS_FIELD_NUMBER = 2; + private com.google.cloud.vertexai.api.Tensor parameters_; + /** + * + * + *
+   * The parameters that govern the prediction.
+   * 
+ * + * .google.cloud.vertexai.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.vertexai.v1.Tensor parameters = 2; + * + * @return The parameters. + */ + @java.lang.Override + public com.google.cloud.vertexai.api.Tensor getParameters() { + return parameters_ == null + ? com.google.cloud.vertexai.api.Tensor.getDefaultInstance() + : parameters_; + } + /** + * + * + *
+   * The parameters that govern the prediction.
+   * 
+ * + * .google.cloud.vertexai.v1.Tensor parameters = 2; + */ + @java.lang.Override + public com.google.cloud.vertexai.api.TensorOrBuilder getParametersOrBuilder() { + return parameters_ == null + ? com.google.cloud.vertexai.api.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.vertexai.api.StreamDirectPredictResponse)) { + return super.equals(obj); + } + com.google.cloud.vertexai.api.StreamDirectPredictResponse other = + (com.google.cloud.vertexai.api.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.vertexai.api.StreamDirectPredictResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.vertexai.api.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.vertexai.api.StreamDirectPredictResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.vertexai.api.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.vertexai.api.StreamDirectPredictResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.vertexai.api.StreamDirectPredictResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.vertexai.api.StreamDirectPredictResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.vertexai.api.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.vertexai.api.StreamDirectPredictResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.vertexai.api.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.vertexai.api.StreamDirectPredictResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.vertexai.api.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.vertexai.api.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.vertexai.v1.StreamDirectPredictResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.StreamDirectPredictResponse) + com.google.cloud.vertexai.api.StreamDirectPredictResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.vertexai.api.PredictionServiceProto + .internal_static_google_cloud_vertexai_v1_StreamDirectPredictResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vertexai.api.PredictionServiceProto + .internal_static_google_cloud_vertexai_v1_StreamDirectPredictResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vertexai.api.StreamDirectPredictResponse.class, + com.google.cloud.vertexai.api.StreamDirectPredictResponse.Builder.class); + } + + // Construct using com.google.cloud.vertexai.api.StreamDirectPredictResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getOutputsFieldBuilder(); + getParametersFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (outputsBuilder_ == null) { + outputs_ = java.util.Collections.emptyList(); + } else { + outputs_ = null; + outputsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + parameters_ = null; + if (parametersBuilder_ != null) { + parametersBuilder_.dispose(); + parametersBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.vertexai.api.PredictionServiceProto + .internal_static_google_cloud_vertexai_v1_StreamDirectPredictResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.vertexai.api.StreamDirectPredictResponse getDefaultInstanceForType() { + return com.google.cloud.vertexai.api.StreamDirectPredictResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vertexai.api.StreamDirectPredictResponse build() { + com.google.cloud.vertexai.api.StreamDirectPredictResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vertexai.api.StreamDirectPredictResponse buildPartial() { + com.google.cloud.vertexai.api.StreamDirectPredictResponse result = + new com.google.cloud.vertexai.api.StreamDirectPredictResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.vertexai.api.StreamDirectPredictResponse result) { + if (outputsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + outputs_ = java.util.Collections.unmodifiableList(outputs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.outputs_ = outputs_; + } else { + result.outputs_ = outputsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.vertexai.api.StreamDirectPredictResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.parameters_ = parametersBuilder_ == null ? parameters_ : parametersBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vertexai.api.StreamDirectPredictResponse) { + return mergeFrom((com.google.cloud.vertexai.api.StreamDirectPredictResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vertexai.api.StreamDirectPredictResponse other) { + if (other == com.google.cloud.vertexai.api.StreamDirectPredictResponse.getDefaultInstance()) + return this; + if (outputsBuilder_ == null) { + if (!other.outputs_.isEmpty()) { + if (outputs_.isEmpty()) { + outputs_ = other.outputs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureOutputsIsMutable(); + outputs_.addAll(other.outputs_); + } + onChanged(); + } + } else { + if (!other.outputs_.isEmpty()) { + if (outputsBuilder_.isEmpty()) { + outputsBuilder_.dispose(); + outputsBuilder_ = null; + outputs_ = other.outputs_; + bitField0_ = (bitField0_ & ~0x00000001); + outputsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getOutputsFieldBuilder() + : null; + } else { + outputsBuilder_.addAllMessages(other.outputs_); + } + } + } + if (other.hasParameters()) { + mergeParameters(other.getParameters()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.vertexai.api.Tensor m = + input.readMessage( + com.google.cloud.vertexai.api.Tensor.parser(), extensionRegistry); + if (outputsBuilder_ == null) { + ensureOutputsIsMutable(); + outputs_.add(m); + } else { + outputsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + input.readMessage(getParametersFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List outputs_ = + java.util.Collections.emptyList(); + + private void ensureOutputsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + outputs_ = new java.util.ArrayList(outputs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vertexai.api.Tensor, + com.google.cloud.vertexai.api.Tensor.Builder, + com.google.cloud.vertexai.api.TensorOrBuilder> + outputsBuilder_; + + /** + * + * + *
+     * The prediction output.
+     * 
+ * + * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; + */ + public java.util.List getOutputsList() { + if (outputsBuilder_ == null) { + return java.util.Collections.unmodifiableList(outputs_); + } else { + return outputsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The prediction output.
+     * 
+ * + * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; + */ + public int getOutputsCount() { + if (outputsBuilder_ == null) { + return outputs_.size(); + } else { + return outputsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The prediction output.
+     * 
+ * + * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; + */ + public com.google.cloud.vertexai.api.Tensor getOutputs(int index) { + if (outputsBuilder_ == null) { + return outputs_.get(index); + } else { + return outputsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The prediction output.
+     * 
+ * + * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; + */ + public Builder setOutputs(int index, com.google.cloud.vertexai.api.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.vertexai.v1.Tensor outputs = 1; + */ + public Builder setOutputs( + int index, com.google.cloud.vertexai.api.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.vertexai.v1.Tensor outputs = 1; + */ + public Builder addOutputs(com.google.cloud.vertexai.api.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.vertexai.v1.Tensor outputs = 1; + */ + public Builder addOutputs(int index, com.google.cloud.vertexai.api.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.vertexai.v1.Tensor outputs = 1; + */ + public Builder addOutputs(com.google.cloud.vertexai.api.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.vertexai.v1.Tensor outputs = 1; + */ + public Builder addOutputs( + int index, com.google.cloud.vertexai.api.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.vertexai.v1.Tensor outputs = 1; + */ + public Builder addAllOutputs( + java.lang.Iterable 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.vertexai.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.vertexai.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.vertexai.v1.Tensor outputs = 1; + */ + public com.google.cloud.vertexai.api.Tensor.Builder getOutputsBuilder(int index) { + return getOutputsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The prediction output.
+     * 
+ * + * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; + */ + public com.google.cloud.vertexai.api.TensorOrBuilder getOutputsOrBuilder(int index) { + if (outputsBuilder_ == null) { + return outputs_.get(index); + } else { + return outputsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The prediction output.
+     * 
+ * + * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; + */ + public java.util.List + getOutputsOrBuilderList() { + if (outputsBuilder_ != null) { + return outputsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(outputs_); + } + } + /** + * + * + *
+     * The prediction output.
+     * 
+ * + * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; + */ + public com.google.cloud.vertexai.api.Tensor.Builder addOutputsBuilder() { + return getOutputsFieldBuilder() + .addBuilder(com.google.cloud.vertexai.api.Tensor.getDefaultInstance()); + } + /** + * + * + *
+     * The prediction output.
+     * 
+ * + * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; + */ + public com.google.cloud.vertexai.api.Tensor.Builder addOutputsBuilder(int index) { + return getOutputsFieldBuilder() + .addBuilder(index, com.google.cloud.vertexai.api.Tensor.getDefaultInstance()); + } + /** + * + * + *
+     * The prediction output.
+     * 
+ * + * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; + */ + public java.util.List getOutputsBuilderList() { + return getOutputsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vertexai.api.Tensor, + com.google.cloud.vertexai.api.Tensor.Builder, + com.google.cloud.vertexai.api.TensorOrBuilder> + getOutputsFieldBuilder() { + if (outputsBuilder_ == null) { + outputsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.vertexai.api.Tensor, + com.google.cloud.vertexai.api.Tensor.Builder, + com.google.cloud.vertexai.api.TensorOrBuilder>( + outputs_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + outputs_ = null; + } + return outputsBuilder_; + } + + private com.google.cloud.vertexai.api.Tensor parameters_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vertexai.api.Tensor, + com.google.cloud.vertexai.api.Tensor.Builder, + com.google.cloud.vertexai.api.TensorOrBuilder> + parametersBuilder_; + /** + * + * + *
+     * The parameters that govern the prediction.
+     * 
+ * + * .google.cloud.vertexai.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.vertexai.v1.Tensor parameters = 2; + * + * @return The parameters. + */ + public com.google.cloud.vertexai.api.Tensor getParameters() { + if (parametersBuilder_ == null) { + return parameters_ == null + ? com.google.cloud.vertexai.api.Tensor.getDefaultInstance() + : parameters_; + } else { + return parametersBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The parameters that govern the prediction.
+     * 
+ * + * .google.cloud.vertexai.v1.Tensor parameters = 2; + */ + public Builder setParameters(com.google.cloud.vertexai.api.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.vertexai.v1.Tensor parameters = 2; + */ + public Builder setParameters(com.google.cloud.vertexai.api.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.vertexai.v1.Tensor parameters = 2; + */ + public Builder mergeParameters(com.google.cloud.vertexai.api.Tensor value) { + if (parametersBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && parameters_ != null + && parameters_ != com.google.cloud.vertexai.api.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.vertexai.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.vertexai.v1.Tensor parameters = 2; + */ + public com.google.cloud.vertexai.api.Tensor.Builder getParametersBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getParametersFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The parameters that govern the prediction.
+     * 
+ * + * .google.cloud.vertexai.v1.Tensor parameters = 2; + */ + public com.google.cloud.vertexai.api.TensorOrBuilder getParametersOrBuilder() { + if (parametersBuilder_ != null) { + return parametersBuilder_.getMessageOrBuilder(); + } else { + return parameters_ == null + ? com.google.cloud.vertexai.api.Tensor.getDefaultInstance() + : parameters_; + } + } + /** + * + * + *
+     * The parameters that govern the prediction.
+     * 
+ * + * .google.cloud.vertexai.v1.Tensor parameters = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vertexai.api.Tensor, + com.google.cloud.vertexai.api.Tensor.Builder, + com.google.cloud.vertexai.api.TensorOrBuilder> + getParametersFieldBuilder() { + if (parametersBuilder_ == null) { + parametersBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.vertexai.api.Tensor, + com.google.cloud.vertexai.api.Tensor.Builder, + com.google.cloud.vertexai.api.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.vertexai.v1.StreamDirectPredictResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.StreamDirectPredictResponse) + private static final com.google.cloud.vertexai.api.StreamDirectPredictResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.StreamDirectPredictResponse(); + } + + public static com.google.cloud.vertexai.api.StreamDirectPredictResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StreamDirectPredictResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vertexai.api.StreamDirectPredictResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamDirectPredictResponseOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamDirectPredictResponseOrBuilder.java new file mode 100644 index 000000000000..95c78b5d1678 --- /dev/null +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamDirectPredictResponseOrBuilder.java @@ -0,0 +1,112 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vertexai/v1/prediction_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.vertexai.api; + +public interface StreamDirectPredictResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.StreamDirectPredictResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The prediction output.
+   * 
+ * + * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; + */ + java.util.List getOutputsList(); + /** + * + * + *
+   * The prediction output.
+   * 
+ * + * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; + */ + com.google.cloud.vertexai.api.Tensor getOutputs(int index); + /** + * + * + *
+   * The prediction output.
+   * 
+ * + * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; + */ + int getOutputsCount(); + /** + * + * + *
+   * The prediction output.
+   * 
+ * + * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; + */ + java.util.List getOutputsOrBuilderList(); + /** + * + * + *
+   * The prediction output.
+   * 
+ * + * repeated .google.cloud.vertexai.v1.Tensor outputs = 1; + */ + com.google.cloud.vertexai.api.TensorOrBuilder getOutputsOrBuilder(int index); + + /** + * + * + *
+   * The parameters that govern the prediction.
+   * 
+ * + * .google.cloud.vertexai.v1.Tensor parameters = 2; + * + * @return Whether the parameters field is set. + */ + boolean hasParameters(); + /** + * + * + *
+   * The parameters that govern the prediction.
+   * 
+ * + * .google.cloud.vertexai.v1.Tensor parameters = 2; + * + * @return The parameters. + */ + com.google.cloud.vertexai.api.Tensor getParameters(); + /** + * + * + *
+   * The parameters that govern the prediction.
+   * 
+ * + * .google.cloud.vertexai.v1.Tensor parameters = 2; + */ + com.google.cloud.vertexai.api.TensorOrBuilder getParametersOrBuilder(); +} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamDirectRawPredictRequest.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamDirectRawPredictRequest.java new file mode 100644 index 000000000000..8dabd851b073 --- /dev/null +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamDirectRawPredictRequest.java @@ -0,0 +1,998 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vertexai/v1/prediction_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.vertexai.api; + +/** + * + * + *
+ * 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.vertexai.v1.StreamDirectRawPredictRequest} + */ +public final class StreamDirectRawPredictRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.vertexai.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.vertexai.api.PredictionServiceProto + .internal_static_google_cloud_vertexai_v1_StreamDirectRawPredictRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vertexai.api.PredictionServiceProto + .internal_static_google_cloud_vertexai_v1_StreamDirectRawPredictRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vertexai.api.StreamDirectRawPredictRequest.class, + com.google.cloud.vertexai.api.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.vertexai.api.StreamDirectRawPredictRequest)) { + return super.equals(obj); + } + com.google.cloud.vertexai.api.StreamDirectRawPredictRequest other = + (com.google.cloud.vertexai.api.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.vertexai.api.StreamDirectRawPredictRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.vertexai.api.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.vertexai.api.StreamDirectRawPredictRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.vertexai.api.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.vertexai.api.StreamDirectRawPredictRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.vertexai.api.StreamDirectRawPredictRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.vertexai.api.StreamDirectRawPredictRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.vertexai.api.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.vertexai.api.StreamDirectRawPredictRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.vertexai.api.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.vertexai.api.StreamDirectRawPredictRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.vertexai.api.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.vertexai.api.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.vertexai.v1.StreamDirectRawPredictRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.StreamDirectRawPredictRequest) + com.google.cloud.vertexai.api.StreamDirectRawPredictRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.vertexai.api.PredictionServiceProto + .internal_static_google_cloud_vertexai_v1_StreamDirectRawPredictRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vertexai.api.PredictionServiceProto + .internal_static_google_cloud_vertexai_v1_StreamDirectRawPredictRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vertexai.api.StreamDirectRawPredictRequest.class, + com.google.cloud.vertexai.api.StreamDirectRawPredictRequest.Builder.class); + } + + // Construct using com.google.cloud.vertexai.api.StreamDirectRawPredictRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + endpoint_ = ""; + methodName_ = ""; + input_ = com.google.protobuf.ByteString.EMPTY; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.vertexai.api.PredictionServiceProto + .internal_static_google_cloud_vertexai_v1_StreamDirectRawPredictRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vertexai.api.StreamDirectRawPredictRequest getDefaultInstanceForType() { + return com.google.cloud.vertexai.api.StreamDirectRawPredictRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vertexai.api.StreamDirectRawPredictRequest build() { + com.google.cloud.vertexai.api.StreamDirectRawPredictRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vertexai.api.StreamDirectRawPredictRequest buildPartial() { + com.google.cloud.vertexai.api.StreamDirectRawPredictRequest result = + new com.google.cloud.vertexai.api.StreamDirectRawPredictRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.vertexai.api.StreamDirectRawPredictRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.endpoint_ = endpoint_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.methodName_ = methodName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.input_ = input_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vertexai.api.StreamDirectRawPredictRequest) { + return mergeFrom((com.google.cloud.vertexai.api.StreamDirectRawPredictRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vertexai.api.StreamDirectRawPredictRequest other) { + if (other == com.google.cloud.vertexai.api.StreamDirectRawPredictRequest.getDefaultInstance()) + return this; + if (!other.getEndpoint().isEmpty()) { + endpoint_ = other.endpoint_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getMethodName().isEmpty()) { + methodName_ = other.methodName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getInput() != com.google.protobuf.ByteString.EMPTY) { + setInput(other.getInput()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + endpoint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + methodName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input_ = input.readBytes(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object 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. + */ + 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.vertexai.v1.StreamDirectRawPredictRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.StreamDirectRawPredictRequest) + private static final com.google.cloud.vertexai.api.StreamDirectRawPredictRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.StreamDirectRawPredictRequest(); + } + + public static com.google.cloud.vertexai.api.StreamDirectRawPredictRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StreamDirectRawPredictRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vertexai.api.StreamDirectRawPredictRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamDirectRawPredictRequestOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamDirectRawPredictRequestOrBuilder.java new file mode 100644 index 000000000000..fe35983efba8 --- /dev/null +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamDirectRawPredictRequestOrBuilder.java @@ -0,0 +1,109 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vertexai/v1/prediction_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.vertexai.api; + +public interface StreamDirectRawPredictRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.StreamDirectRawPredictRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * 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-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamDirectRawPredictResponse.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamDirectRawPredictResponse.java new file mode 100644 index 000000000000..b165cacc17e8 --- /dev/null +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/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/vertexai/v1/prediction_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.vertexai.api; + +/** + * + * + *
+ * Response message for
+ * [PredictionService.StreamDirectRawPredict][google.cloud.aiplatform.v1.PredictionService.StreamDirectRawPredict].
+ * 
+ * + * Protobuf type {@code google.cloud.vertexai.v1.StreamDirectRawPredictResponse} + */ +public final class StreamDirectRawPredictResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.vertexai.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.vertexai.api.PredictionServiceProto + .internal_static_google_cloud_vertexai_v1_StreamDirectRawPredictResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vertexai.api.PredictionServiceProto + .internal_static_google_cloud_vertexai_v1_StreamDirectRawPredictResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vertexai.api.StreamDirectRawPredictResponse.class, + com.google.cloud.vertexai.api.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.vertexai.api.StreamDirectRawPredictResponse)) { + return super.equals(obj); + } + com.google.cloud.vertexai.api.StreamDirectRawPredictResponse other = + (com.google.cloud.vertexai.api.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.vertexai.api.StreamDirectRawPredictResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.vertexai.api.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.vertexai.api.StreamDirectRawPredictResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.vertexai.api.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.vertexai.api.StreamDirectRawPredictResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.vertexai.api.StreamDirectRawPredictResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.vertexai.api.StreamDirectRawPredictResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.vertexai.api.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.vertexai.api.StreamDirectRawPredictResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.vertexai.api.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.vertexai.api.StreamDirectRawPredictResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.vertexai.api.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.vertexai.api.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.vertexai.v1.StreamDirectRawPredictResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.StreamDirectRawPredictResponse) + com.google.cloud.vertexai.api.StreamDirectRawPredictResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.vertexai.api.PredictionServiceProto + .internal_static_google_cloud_vertexai_v1_StreamDirectRawPredictResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vertexai.api.PredictionServiceProto + .internal_static_google_cloud_vertexai_v1_StreamDirectRawPredictResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vertexai.api.StreamDirectRawPredictResponse.class, + com.google.cloud.vertexai.api.StreamDirectRawPredictResponse.Builder.class); + } + + // Construct using com.google.cloud.vertexai.api.StreamDirectRawPredictResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + output_ = com.google.protobuf.ByteString.EMPTY; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.vertexai.api.PredictionServiceProto + .internal_static_google_cloud_vertexai_v1_StreamDirectRawPredictResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.vertexai.api.StreamDirectRawPredictResponse + getDefaultInstanceForType() { + return com.google.cloud.vertexai.api.StreamDirectRawPredictResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vertexai.api.StreamDirectRawPredictResponse build() { + com.google.cloud.vertexai.api.StreamDirectRawPredictResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vertexai.api.StreamDirectRawPredictResponse buildPartial() { + com.google.cloud.vertexai.api.StreamDirectRawPredictResponse result = + new com.google.cloud.vertexai.api.StreamDirectRawPredictResponse(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.vertexai.api.StreamDirectRawPredictResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.output_ = output_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vertexai.api.StreamDirectRawPredictResponse) { + return mergeFrom((com.google.cloud.vertexai.api.StreamDirectRawPredictResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vertexai.api.StreamDirectRawPredictResponse other) { + if (other + == com.google.cloud.vertexai.api.StreamDirectRawPredictResponse.getDefaultInstance()) + return this; + if (other.getOutput() != com.google.protobuf.ByteString.EMPTY) { + setOutput(other.getOutput()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + output_ = input.readBytes(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.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_; + } + /** + * + * + *
+     * The prediction output.
+     * 
+ * + * bytes output = 1; + * + * @param value The output to set. + * @return This builder for chaining. + */ + public Builder setOutput(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + output_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The prediction output.
+     * 
+ * + * bytes output = 1; + * + * @return This builder for chaining. + */ + public Builder clearOutput() { + bitField0_ = (bitField0_ & ~0x00000001); + output_ = getDefaultInstance().getOutput(); + 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.vertexai.v1.StreamDirectRawPredictResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.StreamDirectRawPredictResponse) + private static final com.google.cloud.vertexai.api.StreamDirectRawPredictResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.StreamDirectRawPredictResponse(); + } + + public static com.google.cloud.vertexai.api.StreamDirectRawPredictResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StreamDirectRawPredictResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vertexai.api.StreamDirectRawPredictResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamDirectRawPredictResponseOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamDirectRawPredictResponseOrBuilder.java new file mode 100644 index 000000000000..403d32c4d812 --- /dev/null +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamDirectRawPredictResponseOrBuilder.java @@ -0,0 +1,39 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vertexai/v1/prediction_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.vertexai.api; + +public interface StreamDirectRawPredictResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.StreamDirectRawPredictResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The prediction output.
+   * 
+ * + * bytes output = 1; + * + * @return The output. + */ + com.google.protobuf.ByteString getOutput(); +} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamRawPredictRequest.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamRawPredictRequest.java new file mode 100644 index 000000000000..a45fa016c2b7 --- /dev/null +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamRawPredictRequest.java @@ -0,0 +1,926 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vertexai/v1/prediction_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.vertexai.api; + +/** + * + * + *
+ * Request message for
+ * [PredictionService.StreamRawPredict][google.cloud.aiplatform.v1.PredictionService.StreamRawPredict].
+ * 
+ * + * Protobuf type {@code google.cloud.vertexai.v1.StreamRawPredictRequest} + */ +public final class StreamRawPredictRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.vertexai.v1.StreamRawPredictRequest) + StreamRawPredictRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use StreamRawPredictRequest.newBuilder() to construct. + private StreamRawPredictRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StreamRawPredictRequest() { + endpoint_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new StreamRawPredictRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.vertexai.api.PredictionServiceProto + .internal_static_google_cloud_vertexai_v1_StreamRawPredictRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vertexai.api.PredictionServiceProto + .internal_static_google_cloud_vertexai_v1_StreamRawPredictRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vertexai.api.StreamRawPredictRequest.class, + com.google.cloud.vertexai.api.StreamRawPredictRequest.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 HTTP_BODY_FIELD_NUMBER = 2; + private com.google.api.HttpBody httpBody_; + /** + * + * + *
+   * The prediction input. Supports HTTP headers and arbitrary data payload.
+   * 
+ * + * .google.api.HttpBody http_body = 2; + * + * @return Whether the httpBody field is set. + */ + @java.lang.Override + public boolean hasHttpBody() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+   * The prediction input. Supports HTTP headers and arbitrary data payload.
+   * 
+ * + * .google.api.HttpBody http_body = 2; + * + * @return The httpBody. + */ + @java.lang.Override + public com.google.api.HttpBody getHttpBody() { + return httpBody_ == null ? com.google.api.HttpBody.getDefaultInstance() : httpBody_; + } + /** + * + * + *
+   * The prediction input. Supports HTTP headers and arbitrary data payload.
+   * 
+ * + * .google.api.HttpBody http_body = 2; + */ + @java.lang.Override + public com.google.api.HttpBodyOrBuilder getHttpBodyOrBuilder() { + return httpBody_ == null ? com.google.api.HttpBody.getDefaultInstance() : httpBody_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpoint_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, endpoint_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getHttpBody()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpoint_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, endpoint_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getHttpBody()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.vertexai.api.StreamRawPredictRequest)) { + return super.equals(obj); + } + com.google.cloud.vertexai.api.StreamRawPredictRequest other = + (com.google.cloud.vertexai.api.StreamRawPredictRequest) obj; + + if (!getEndpoint().equals(other.getEndpoint())) return false; + if (hasHttpBody() != other.hasHttpBody()) return false; + if (hasHttpBody()) { + if (!getHttpBody().equals(other.getHttpBody())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENDPOINT_FIELD_NUMBER; + hash = (53 * hash) + getEndpoint().hashCode(); + if (hasHttpBody()) { + hash = (37 * hash) + HTTP_BODY_FIELD_NUMBER; + hash = (53 * hash) + getHttpBody().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.vertexai.api.StreamRawPredictRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.vertexai.api.StreamRawPredictRequest 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.vertexai.api.StreamRawPredictRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.vertexai.api.StreamRawPredictRequest 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.vertexai.api.StreamRawPredictRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.vertexai.api.StreamRawPredictRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.vertexai.api.StreamRawPredictRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.vertexai.api.StreamRawPredictRequest 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.vertexai.api.StreamRawPredictRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.vertexai.api.StreamRawPredictRequest 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.vertexai.api.StreamRawPredictRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.vertexai.api.StreamRawPredictRequest 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.vertexai.api.StreamRawPredictRequest 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.StreamRawPredict][google.cloud.aiplatform.v1.PredictionService.StreamRawPredict].
+   * 
+ * + * Protobuf type {@code google.cloud.vertexai.v1.StreamRawPredictRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.vertexai.v1.StreamRawPredictRequest) + com.google.cloud.vertexai.api.StreamRawPredictRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.vertexai.api.PredictionServiceProto + .internal_static_google_cloud_vertexai_v1_StreamRawPredictRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.vertexai.api.PredictionServiceProto + .internal_static_google_cloud_vertexai_v1_StreamRawPredictRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.vertexai.api.StreamRawPredictRequest.class, + com.google.cloud.vertexai.api.StreamRawPredictRequest.Builder.class); + } + + // Construct using com.google.cloud.vertexai.api.StreamRawPredictRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getHttpBodyFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + endpoint_ = ""; + httpBody_ = null; + if (httpBodyBuilder_ != null) { + httpBodyBuilder_.dispose(); + httpBodyBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.vertexai.api.PredictionServiceProto + .internal_static_google_cloud_vertexai_v1_StreamRawPredictRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.vertexai.api.StreamRawPredictRequest getDefaultInstanceForType() { + return com.google.cloud.vertexai.api.StreamRawPredictRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.vertexai.api.StreamRawPredictRequest build() { + com.google.cloud.vertexai.api.StreamRawPredictRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.vertexai.api.StreamRawPredictRequest buildPartial() { + com.google.cloud.vertexai.api.StreamRawPredictRequest result = + new com.google.cloud.vertexai.api.StreamRawPredictRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.vertexai.api.StreamRawPredictRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.endpoint_ = endpoint_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.httpBody_ = httpBodyBuilder_ == null ? httpBody_ : httpBodyBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.vertexai.api.StreamRawPredictRequest) { + return mergeFrom((com.google.cloud.vertexai.api.StreamRawPredictRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.vertexai.api.StreamRawPredictRequest other) { + if (other == com.google.cloud.vertexai.api.StreamRawPredictRequest.getDefaultInstance()) + return this; + if (!other.getEndpoint().isEmpty()) { + endpoint_ = other.endpoint_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasHttpBody()) { + mergeHttpBody(other.getHttpBody()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + endpoint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getHttpBodyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object endpoint_ = ""; + /** + * + * + *
+     * Required. The name of the Endpoint requested to serve the prediction.
+     * Format:
+     * `projects/{project}/locations/{location}/endpoints/{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 com.google.api.HttpBody httpBody_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.HttpBody, + com.google.api.HttpBody.Builder, + com.google.api.HttpBodyOrBuilder> + httpBodyBuilder_; + /** + * + * + *
+     * The prediction input. Supports HTTP headers and arbitrary data payload.
+     * 
+ * + * .google.api.HttpBody http_body = 2; + * + * @return Whether the httpBody field is set. + */ + public boolean hasHttpBody() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * The prediction input. Supports HTTP headers and arbitrary data payload.
+     * 
+ * + * .google.api.HttpBody http_body = 2; + * + * @return The httpBody. + */ + public com.google.api.HttpBody getHttpBody() { + if (httpBodyBuilder_ == null) { + return httpBody_ == null ? com.google.api.HttpBody.getDefaultInstance() : httpBody_; + } else { + return httpBodyBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The prediction input. Supports HTTP headers and arbitrary data payload.
+     * 
+ * + * .google.api.HttpBody http_body = 2; + */ + public Builder setHttpBody(com.google.api.HttpBody value) { + if (httpBodyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + httpBody_ = value; + } else { + httpBodyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The prediction input. Supports HTTP headers and arbitrary data payload.
+     * 
+ * + * .google.api.HttpBody http_body = 2; + */ + public Builder setHttpBody(com.google.api.HttpBody.Builder builderForValue) { + if (httpBodyBuilder_ == null) { + httpBody_ = builderForValue.build(); + } else { + httpBodyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The prediction input. Supports HTTP headers and arbitrary data payload.
+     * 
+ * + * .google.api.HttpBody http_body = 2; + */ + public Builder mergeHttpBody(com.google.api.HttpBody value) { + if (httpBodyBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && httpBody_ != null + && httpBody_ != com.google.api.HttpBody.getDefaultInstance()) { + getHttpBodyBuilder().mergeFrom(value); + } else { + httpBody_ = value; + } + } else { + httpBodyBuilder_.mergeFrom(value); + } + if (httpBody_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+     * The prediction input. Supports HTTP headers and arbitrary data payload.
+     * 
+ * + * .google.api.HttpBody http_body = 2; + */ + public Builder clearHttpBody() { + bitField0_ = (bitField0_ & ~0x00000002); + httpBody_ = null; + if (httpBodyBuilder_ != null) { + httpBodyBuilder_.dispose(); + httpBodyBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * The prediction input. Supports HTTP headers and arbitrary data payload.
+     * 
+ * + * .google.api.HttpBody http_body = 2; + */ + public com.google.api.HttpBody.Builder getHttpBodyBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getHttpBodyFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The prediction input. Supports HTTP headers and arbitrary data payload.
+     * 
+ * + * .google.api.HttpBody http_body = 2; + */ + public com.google.api.HttpBodyOrBuilder getHttpBodyOrBuilder() { + if (httpBodyBuilder_ != null) { + return httpBodyBuilder_.getMessageOrBuilder(); + } else { + return httpBody_ == null ? com.google.api.HttpBody.getDefaultInstance() : httpBody_; + } + } + /** + * + * + *
+     * The prediction input. Supports HTTP headers and arbitrary data payload.
+     * 
+ * + * .google.api.HttpBody http_body = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.HttpBody, + com.google.api.HttpBody.Builder, + com.google.api.HttpBodyOrBuilder> + getHttpBodyFieldBuilder() { + if (httpBodyBuilder_ == null) { + httpBodyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.api.HttpBody, + com.google.api.HttpBody.Builder, + com.google.api.HttpBodyOrBuilder>(getHttpBody(), getParentForChildren(), isClean()); + httpBody_ = null; + } + return httpBodyBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.vertexai.v1.StreamRawPredictRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.vertexai.v1.StreamRawPredictRequest) + private static final com.google.cloud.vertexai.api.StreamRawPredictRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.vertexai.api.StreamRawPredictRequest(); + } + + public static com.google.cloud.vertexai.api.StreamRawPredictRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StreamRawPredictRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.vertexai.api.StreamRawPredictRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamRawPredictRequestOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamRawPredictRequestOrBuilder.java new file mode 100644 index 000000000000..4f30ef04b6a9 --- /dev/null +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamRawPredictRequestOrBuilder.java @@ -0,0 +1,94 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/vertexai/v1/prediction_service.proto + +// Protobuf Java Version: 3.25.2 +package com.google.cloud.vertexai.api; + +public interface StreamRawPredictRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.vertexai.v1.StreamRawPredictRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * 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(); + + /** + * + * + *
+   * The prediction input. Supports HTTP headers and arbitrary data payload.
+   * 
+ * + * .google.api.HttpBody http_body = 2; + * + * @return Whether the httpBody field is set. + */ + boolean hasHttpBody(); + /** + * + * + *
+   * The prediction input. Supports HTTP headers and arbitrary data payload.
+   * 
+ * + * .google.api.HttpBody http_body = 2; + * + * @return The httpBody. + */ + com.google.api.HttpBody getHttpBody(); + /** + * + * + *
+   * The prediction input. Supports HTTP headers and arbitrary data payload.
+   * 
+ * + * .google.api.HttpBody http_body = 2; + */ + com.google.api.HttpBodyOrBuilder getHttpBodyOrBuilder(); +} diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamingPredictRequest.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamingPredictRequest.java index fe112888df7c..844f162170f0 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamingPredictRequest.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamingPredictRequest.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/prediction_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** @@ -68,6 +69,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.vertexai.api.StreamingPredictRequest.Builder.class); } + private int bitField0_; public static final int ENDPOINT_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -213,7 +215,7 @@ public com.google.cloud.vertexai.api.TensorOrBuilder getInputsOrBuilder(int inde */ @java.lang.Override public boolean hasParameters() { - return parameters_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** * @@ -268,7 +270,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < inputs_.size(); i++) { output.writeMessage(2, inputs_.get(i)); } - if (parameters_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(3, getParameters()); } getUnknownFields().writeTo(output); @@ -286,7 +288,7 @@ public int getSerializedSize() { for (int i = 0; i < inputs_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, inputs_.get(i)); } - if (parameters_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getParameters()); } size += getUnknownFields().getSerializedSize(); @@ -467,10 +469,20 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.vertexai.api.StreamingPredictRequest.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getInputsFieldBuilder(); + getParametersFieldBuilder(); + } } @java.lang.Override @@ -543,9 +555,12 @@ private void buildPartial0(com.google.cloud.vertexai.api.StreamingPredictRequest if (((from_bitField0_ & 0x00000001) != 0)) { result.endpoint_ = endpoint_; } + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000004) != 0)) { result.parameters_ = parametersBuilder_ == null ? parameters_ : parametersBuilder_.build(); + to_bitField0_ |= 0x00000001; } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -1275,8 +1290,10 @@ public Builder mergeParameters(com.google.cloud.vertexai.api.Tensor value) { } else { parametersBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000004; - onChanged(); + if (parameters_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } return this; } /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamingPredictRequestOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamingPredictRequestOrBuilder.java index 28ec37961d2b..27745c4c13e3 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamingPredictRequestOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamingPredictRequestOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/prediction_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface StreamingPredictRequestOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamingPredictResponse.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamingPredictResponse.java index f2480416193e..dea19a2c5633 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamingPredictResponse.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamingPredictResponse.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/prediction_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** @@ -63,6 +64,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.vertexai.api.StreamingPredictResponse.Builder.class); } + private int bitField0_; public static final int OUTPUTS_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -149,7 +151,7 @@ public com.google.cloud.vertexai.api.TensorOrBuilder getOutputsOrBuilder(int ind */ @java.lang.Override public boolean hasParameters() { - return parameters_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** * @@ -201,7 +203,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < outputs_.size(); i++) { output.writeMessage(1, outputs_.get(i)); } - if (parameters_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getParameters()); } getUnknownFields().writeTo(output); @@ -216,7 +218,7 @@ public int getSerializedSize() { for (int i = 0; i < outputs_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, outputs_.get(i)); } - if (parameters_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getParameters()); } size += getUnknownFields().getSerializedSize(); @@ -390,10 +392,20 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.vertexai.api.StreamingPredictResponse.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getOutputsFieldBuilder(); + getParametersFieldBuilder(); + } } @java.lang.Override @@ -462,9 +474,12 @@ private void buildPartialRepeatedFields( private void buildPartial0(com.google.cloud.vertexai.api.StreamingPredictResponse result) { int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000002) != 0)) { result.parameters_ = parametersBuilder_ == null ? parameters_ : parametersBuilder_.build(); + to_bitField0_ |= 0x00000001; } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -1057,8 +1072,10 @@ public Builder mergeParameters(com.google.cloud.vertexai.api.Tensor value) { } else { parametersBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000002; - onChanged(); + if (parameters_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } return this; } /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamingPredictResponseOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamingPredictResponseOrBuilder.java index a6fe42f1b5e4..4ad28f2d793a 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamingPredictResponseOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamingPredictResponseOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/prediction_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface StreamingPredictResponseOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamingRawPredictRequest.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamingRawPredictRequest.java index b7185952e5b8..4ab3db101df8 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamingRawPredictRequest.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamingRawPredictRequest.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/prediction_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamingRawPredictRequestOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamingRawPredictRequestOrBuilder.java index e0880614d5ff..fd2c23e03d4a 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamingRawPredictRequestOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamingRawPredictRequestOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/prediction_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface StreamingRawPredictRequestOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamingRawPredictResponse.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamingRawPredictResponse.java index 7aaeea3c9ee2..4ecb11d71790 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamingRawPredictResponse.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamingRawPredictResponse.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/prediction_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamingRawPredictResponseOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamingRawPredictResponseOrBuilder.java index d10a9fc7431f..904d66f6ce41 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamingRawPredictResponseOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StreamingRawPredictResponseOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/prediction_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface StreamingRawPredictResponseOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StringArray.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StringArray.java index 46c5e93f18de..e24eb2500dd7 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StringArray.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StringArray.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/types.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StringArrayOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StringArrayOrBuilder.java index 156bb74af625..ddc519ff59cc 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StringArrayOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/StringArrayOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/types.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface StringArrayOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/TFRecordDestination.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/TFRecordDestination.java index 9c6ed21dba6d..8edd6b965587 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/TFRecordDestination.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/TFRecordDestination.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/io.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** @@ -60,6 +61,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.vertexai.api.TFRecordDestination.Builder.class); } + private int bitField0_; public static final int GCS_DESTINATION_FIELD_NUMBER = 1; private com.google.cloud.vertexai.api.GcsDestination gcsDestination_; /** @@ -77,7 +79,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { */ @java.lang.Override public boolean hasGcsDestination() { - return gcsDestination_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** * @@ -130,7 +132,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (gcsDestination_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(1, getGcsDestination()); } getUnknownFields().writeTo(output); @@ -142,7 +144,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (gcsDestination_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getGcsDestination()); } size += getUnknownFields().getSerializedSize(); @@ -309,10 +311,19 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.vertexai.api.TFRecordDestination.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getGcsDestinationFieldBuilder(); + } } @java.lang.Override @@ -360,10 +371,13 @@ public com.google.cloud.vertexai.api.TFRecordDestination buildPartial() { private void buildPartial0(com.google.cloud.vertexai.api.TFRecordDestination result) { int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.gcsDestination_ = gcsDestinationBuilder_ == null ? gcsDestination_ : gcsDestinationBuilder_.build(); + to_bitField0_ |= 0x00000001; } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -580,8 +594,10 @@ public Builder mergeGcsDestination(com.google.cloud.vertexai.api.GcsDestination } else { gcsDestinationBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000001; - onChanged(); + if (gcsDestination_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } return this; } /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/TFRecordDestinationOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/TFRecordDestinationOrBuilder.java index 44719a54b497..c94d9ac778c7 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/TFRecordDestinationOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/TFRecordDestinationOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/io.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface TFRecordDestinationOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Tensor.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Tensor.java index d0516cbac1db..1624ee1628bc 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Tensor.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Tensor.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/types.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** @@ -42,7 +43,7 @@ private Tensor() { shape_ = emptyLongList(); boolVal_ = emptyBooleanList(); stringVal_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bytesVal_ = java.util.Collections.emptyList(); + bytesVal_ = emptyList(com.google.protobuf.ByteString.class); floatVal_ = emptyFloatList(); doubleVal_ = emptyDoubleList(); intVal_ = emptyIntList(); @@ -66,7 +67,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings({"rawtypes"}) @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { switch (number) { case 12: return internalGetStructVal(); @@ -328,7 +330,7 @@ public com.google.cloud.vertexai.api.Tensor.DataType getDtype() { public static final int SHAPE_FIELD_NUMBER = 2; @SuppressWarnings("serial") - private com.google.protobuf.Internal.LongList shape_; + private com.google.protobuf.Internal.LongList shape_ = emptyLongList(); /** * * @@ -379,7 +381,7 @@ public long getShape(int index) { public static final int BOOL_VAL_FIELD_NUMBER = 3; @SuppressWarnings("serial") - private com.google.protobuf.Internal.BooleanList boolVal_; + private com.google.protobuf.Internal.BooleanList boolVal_ = emptyBooleanList(); /** * * @@ -509,7 +511,8 @@ public com.google.protobuf.ByteString getStringValBytes(int index) { public static final int BYTES_VAL_FIELD_NUMBER = 15; @SuppressWarnings("serial") - private java.util.List bytesVal_; + private com.google.protobuf.Internal.ProtobufList bytesVal_ = + emptyList(com.google.protobuf.ByteString.class); /** * * @@ -558,7 +561,7 @@ public com.google.protobuf.ByteString getBytesVal(int index) { public static final int FLOAT_VAL_FIELD_NUMBER = 5; @SuppressWarnings("serial") - private com.google.protobuf.Internal.FloatList floatVal_; + private com.google.protobuf.Internal.FloatList floatVal_ = emptyFloatList(); /** * * @@ -609,7 +612,7 @@ public float getFloatVal(int index) { public static final int DOUBLE_VAL_FIELD_NUMBER = 6; @SuppressWarnings("serial") - private com.google.protobuf.Internal.DoubleList doubleVal_; + private com.google.protobuf.Internal.DoubleList doubleVal_ = emptyDoubleList(); /** * * @@ -660,7 +663,7 @@ public double getDoubleVal(int index) { public static final int INT_VAL_FIELD_NUMBER = 7; @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList intVal_; + private com.google.protobuf.Internal.IntList intVal_ = emptyIntList(); /** * * @@ -717,7 +720,7 @@ public int getIntVal(int index) { public static final int INT64_VAL_FIELD_NUMBER = 8; @SuppressWarnings("serial") - private com.google.protobuf.Internal.LongList int64Val_; + private com.google.protobuf.Internal.LongList int64Val_ = emptyLongList(); /** * * @@ -768,7 +771,7 @@ public long getInt64Val(int index) { public static final int UINT_VAL_FIELD_NUMBER = 9; @SuppressWarnings("serial") - private com.google.protobuf.Internal.IntList uintVal_; + private com.google.protobuf.Internal.IntList uintVal_ = emptyIntList(); /** * * @@ -825,7 +828,7 @@ public int getUintVal(int index) { public static final int UINT64_VAL_FIELD_NUMBER = 10; @SuppressWarnings("serial") - private com.google.protobuf.Internal.LongList uint64Val_; + private com.google.protobuf.Internal.LongList uint64Val_ = emptyLongList(); /** * * @@ -1507,7 +1510,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { switch (number) { case 12: return internalGetStructVal(); @@ -1517,7 +1521,8 @@ protected com.google.protobuf.MapField internalGetMapField(int number) { } @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { switch (number) { case 12: return internalGetMutableStructVal(); @@ -1551,7 +1556,7 @@ public Builder clear() { shape_ = emptyLongList(); boolVal_ = emptyBooleanList(); stringVal_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bytesVal_ = java.util.Collections.emptyList(); + bytesVal_ = emptyList(com.google.protobuf.ByteString.class); floatVal_ = emptyFloatList(); doubleVal_ = emptyDoubleList(); intVal_ = emptyIntList(); @@ -1602,51 +1607,6 @@ public com.google.cloud.vertexai.api.Tensor buildPartial() { } private void buildPartialRepeatedFields(com.google.cloud.vertexai.api.Tensor result) { - if (((bitField0_ & 0x00000002) != 0)) { - shape_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.shape_ = shape_; - if (((bitField0_ & 0x00000004) != 0)) { - boolVal_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.boolVal_ = boolVal_; - if (((bitField0_ & 0x00000010) != 0)) { - bytesVal_ = java.util.Collections.unmodifiableList(bytesVal_); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.bytesVal_ = bytesVal_; - if (((bitField0_ & 0x00000020) != 0)) { - floatVal_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000020); - } - result.floatVal_ = floatVal_; - if (((bitField0_ & 0x00000040) != 0)) { - doubleVal_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000040); - } - result.doubleVal_ = doubleVal_; - if (((bitField0_ & 0x00000080) != 0)) { - intVal_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000080); - } - result.intVal_ = intVal_; - if (((bitField0_ & 0x00000100) != 0)) { - int64Val_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000100); - } - result.int64Val_ = int64Val_; - if (((bitField0_ & 0x00000200) != 0)) { - uintVal_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000200); - } - result.uintVal_ = uintVal_; - if (((bitField0_ & 0x00000400) != 0)) { - uint64Val_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000400); - } - result.uint64Val_ = uint64Val_; if (listValBuilder_ == null) { if (((bitField0_ & 0x00000800) != 0)) { listVal_ = java.util.Collections.unmodifiableList(listVal_); @@ -1663,13 +1623,48 @@ private void buildPartial0(com.google.cloud.vertexai.api.Tensor result) { if (((from_bitField0_ & 0x00000001) != 0)) { result.dtype_ = dtype_; } + if (((from_bitField0_ & 0x00000002) != 0)) { + shape_.makeImmutable(); + result.shape_ = shape_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + boolVal_.makeImmutable(); + result.boolVal_ = boolVal_; + } if (((from_bitField0_ & 0x00000008) != 0)) { stringVal_.makeImmutable(); result.stringVal_ = stringVal_; } + if (((from_bitField0_ & 0x00000010) != 0)) { + bytesVal_.makeImmutable(); + result.bytesVal_ = bytesVal_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + floatVal_.makeImmutable(); + result.floatVal_ = floatVal_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + doubleVal_.makeImmutable(); + result.doubleVal_ = doubleVal_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + intVal_.makeImmutable(); + result.intVal_ = intVal_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + int64Val_.makeImmutable(); + result.int64Val_ = int64Val_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + uintVal_.makeImmutable(); + result.uintVal_ = uintVal_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + uint64Val_.makeImmutable(); + result.uint64Val_ = uint64Val_; + } if (((from_bitField0_ & 0x00001000) != 0)) { - result.structVal_ = internalGetStructVal(); - result.structVal_.makeImmutable(); + result.structVal_ = internalGetStructVal().build(StructValDefaultEntryHolder.defaultEntry); } if (((from_bitField0_ & 0x00002000) != 0)) { result.tensorVal_ = tensorVal_; @@ -1727,7 +1722,8 @@ public Builder mergeFrom(com.google.cloud.vertexai.api.Tensor other) { if (!other.shape_.isEmpty()) { if (shape_.isEmpty()) { shape_ = other.shape_; - bitField0_ = (bitField0_ & ~0x00000002); + shape_.makeImmutable(); + bitField0_ |= 0x00000002; } else { ensureShapeIsMutable(); shape_.addAll(other.shape_); @@ -1737,7 +1733,8 @@ public Builder mergeFrom(com.google.cloud.vertexai.api.Tensor other) { if (!other.boolVal_.isEmpty()) { if (boolVal_.isEmpty()) { boolVal_ = other.boolVal_; - bitField0_ = (bitField0_ & ~0x00000004); + boolVal_.makeImmutable(); + bitField0_ |= 0x00000004; } else { ensureBoolValIsMutable(); boolVal_.addAll(other.boolVal_); @@ -1757,7 +1754,8 @@ public Builder mergeFrom(com.google.cloud.vertexai.api.Tensor other) { if (!other.bytesVal_.isEmpty()) { if (bytesVal_.isEmpty()) { bytesVal_ = other.bytesVal_; - bitField0_ = (bitField0_ & ~0x00000010); + bytesVal_.makeImmutable(); + bitField0_ |= 0x00000010; } else { ensureBytesValIsMutable(); bytesVal_.addAll(other.bytesVal_); @@ -1767,7 +1765,8 @@ public Builder mergeFrom(com.google.cloud.vertexai.api.Tensor other) { if (!other.floatVal_.isEmpty()) { if (floatVal_.isEmpty()) { floatVal_ = other.floatVal_; - bitField0_ = (bitField0_ & ~0x00000020); + floatVal_.makeImmutable(); + bitField0_ |= 0x00000020; } else { ensureFloatValIsMutable(); floatVal_.addAll(other.floatVal_); @@ -1777,7 +1776,8 @@ public Builder mergeFrom(com.google.cloud.vertexai.api.Tensor other) { if (!other.doubleVal_.isEmpty()) { if (doubleVal_.isEmpty()) { doubleVal_ = other.doubleVal_; - bitField0_ = (bitField0_ & ~0x00000040); + doubleVal_.makeImmutable(); + bitField0_ |= 0x00000040; } else { ensureDoubleValIsMutable(); doubleVal_.addAll(other.doubleVal_); @@ -1787,7 +1787,8 @@ public Builder mergeFrom(com.google.cloud.vertexai.api.Tensor other) { if (!other.intVal_.isEmpty()) { if (intVal_.isEmpty()) { intVal_ = other.intVal_; - bitField0_ = (bitField0_ & ~0x00000080); + intVal_.makeImmutable(); + bitField0_ |= 0x00000080; } else { ensureIntValIsMutable(); intVal_.addAll(other.intVal_); @@ -1797,7 +1798,8 @@ public Builder mergeFrom(com.google.cloud.vertexai.api.Tensor other) { if (!other.int64Val_.isEmpty()) { if (int64Val_.isEmpty()) { int64Val_ = other.int64Val_; - bitField0_ = (bitField0_ & ~0x00000100); + int64Val_.makeImmutable(); + bitField0_ |= 0x00000100; } else { ensureInt64ValIsMutable(); int64Val_.addAll(other.int64Val_); @@ -1807,7 +1809,8 @@ public Builder mergeFrom(com.google.cloud.vertexai.api.Tensor other) { if (!other.uintVal_.isEmpty()) { if (uintVal_.isEmpty()) { uintVal_ = other.uintVal_; - bitField0_ = (bitField0_ & ~0x00000200); + uintVal_.makeImmutable(); + bitField0_ |= 0x00000200; } else { ensureUintValIsMutable(); uintVal_.addAll(other.uintVal_); @@ -1817,7 +1820,8 @@ public Builder mergeFrom(com.google.cloud.vertexai.api.Tensor other) { if (!other.uint64Val_.isEmpty()) { if (uint64Val_.isEmpty()) { uint64Val_ = other.uint64Val_; - bitField0_ = (bitField0_ & ~0x00000400); + uint64Val_.makeImmutable(); + bitField0_ |= 0x00000400; } else { ensureUint64ValIsMutable(); uint64Val_.addAll(other.uint64Val_); @@ -1917,7 +1921,8 @@ public Builder mergeFrom( { int length = input.readRawVarint32(); int limit = input.pushLimit(length); - ensureBoolValIsMutable(); + int alloc = length > 4096 ? 4096 : length; + ensureBoolValIsMutable(alloc / 1); while (input.getBytesUntilLimit() > 0) { boolVal_.addBoolean(input.readBool()); } @@ -1935,7 +1940,8 @@ public Builder mergeFrom( { int length = input.readRawVarint32(); int limit = input.pushLimit(length); - ensureFloatValIsMutable(); + int alloc = length > 4096 ? 4096 : length; + ensureFloatValIsMutable(alloc / 4); while (input.getBytesUntilLimit() > 0) { floatVal_.addFloat(input.readFloat()); } @@ -1953,7 +1959,8 @@ public Builder mergeFrom( { int length = input.readRawVarint32(); int limit = input.pushLimit(length); - ensureDoubleValIsMutable(); + int alloc = length > 4096 ? 4096 : length; + ensureDoubleValIsMutable(alloc / 8); while (input.getBytesUntilLimit() > 0) { doubleVal_.addDouble(input.readDouble()); } @@ -2053,7 +2060,7 @@ public Builder mergeFrom( StructValDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); internalGetMutableStructVal() - .getMutableMap() + .ensureBuilderMap() .put(structVal__.getKey(), structVal__.getValue()); bitField0_ |= 0x00001000; break; @@ -2190,10 +2197,10 @@ public Builder clearDtype() { private com.google.protobuf.Internal.LongList shape_ = emptyLongList(); private void ensureShapeIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - shape_ = mutableCopy(shape_); - bitField0_ |= 0x00000002; + if (!shape_.isModifiable()) { + shape_ = makeMutableCopy(shape_); } + bitField0_ |= 0x00000002; } /** * @@ -2207,9 +2214,8 @@ private void ensureShapeIsMutable() { * @return A list containing the shape. */ public java.util.List getShapeList() { - return ((bitField0_ & 0x00000002) != 0) - ? java.util.Collections.unmodifiableList(shape_) - : shape_; + shape_.makeImmutable(); + return shape_; } /** * @@ -2257,6 +2263,7 @@ public Builder setShape(int index, long value) { ensureShapeIsMutable(); shape_.setLong(index, value); + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -2276,6 +2283,7 @@ public Builder addShape(long value) { ensureShapeIsMutable(); shape_.addLong(value); + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -2294,6 +2302,7 @@ public Builder addShape(long value) { public Builder addAllShape(java.lang.Iterable values) { ensureShapeIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, shape_); + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -2318,10 +2327,17 @@ public Builder clearShape() { private com.google.protobuf.Internal.BooleanList boolVal_ = emptyBooleanList(); private void ensureBoolValIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - boolVal_ = mutableCopy(boolVal_); - bitField0_ |= 0x00000004; + if (!boolVal_.isModifiable()) { + boolVal_ = makeMutableCopy(boolVal_); } + bitField0_ |= 0x00000004; + } + + private void ensureBoolValIsMutable(int capacity) { + if (!boolVal_.isModifiable()) { + boolVal_ = makeMutableCopy(boolVal_, capacity); + } + bitField0_ |= 0x00000004; } /** * @@ -2340,9 +2356,8 @@ private void ensureBoolValIsMutable() { * @return A list containing the boolVal. */ public java.util.List getBoolValList() { - return ((bitField0_ & 0x00000004) != 0) - ? java.util.Collections.unmodifiableList(boolVal_) - : boolVal_; + boolVal_.makeImmutable(); + return boolVal_; } /** * @@ -2405,6 +2420,7 @@ public Builder setBoolVal(int index, boolean value) { ensureBoolValIsMutable(); boolVal_.setBoolean(index, value); + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -2429,6 +2445,7 @@ public Builder addBoolVal(boolean value) { ensureBoolValIsMutable(); boolVal_.addBoolean(value); + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -2452,6 +2469,7 @@ public Builder addBoolVal(boolean value) { public Builder addAllBoolVal(java.lang.Iterable values) { ensureBoolValIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, boolVal_); + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -2652,14 +2670,14 @@ public Builder addStringValBytes(com.google.protobuf.ByteString value) { return this; } - private java.util.List bytesVal_ = - java.util.Collections.emptyList(); + private com.google.protobuf.Internal.ProtobufList bytesVal_ = + emptyList(com.google.protobuf.ByteString.class); private void ensureBytesValIsMutable() { - if (!((bitField0_ & 0x00000010) != 0)) { - bytesVal_ = new java.util.ArrayList(bytesVal_); - bitField0_ |= 0x00000010; + if (!bytesVal_.isModifiable()) { + bytesVal_ = makeMutableCopy(bytesVal_); } + bitField0_ |= 0x00000010; } /** * @@ -2673,9 +2691,8 @@ private void ensureBytesValIsMutable() { * @return A list containing the bytesVal. */ public java.util.List getBytesValList() { - return ((bitField0_ & 0x00000010) != 0) - ? java.util.Collections.unmodifiableList(bytesVal_) - : bytesVal_; + bytesVal_.makeImmutable(); + return bytesVal_; } /** * @@ -2725,6 +2742,7 @@ public Builder setBytesVal(int index, com.google.protobuf.ByteString value) { } ensureBytesValIsMutable(); bytesVal_.set(index, value); + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -2746,6 +2764,7 @@ public Builder addBytesVal(com.google.protobuf.ByteString value) { } ensureBytesValIsMutable(); bytesVal_.add(value); + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -2765,6 +2784,7 @@ public Builder addAllBytesVal( java.lang.Iterable values) { ensureBytesValIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, bytesVal_); + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -2780,7 +2800,7 @@ public Builder addAllBytesVal( * @return This builder for chaining. */ public Builder clearBytesVal() { - bytesVal_ = java.util.Collections.emptyList(); + bytesVal_ = emptyList(com.google.protobuf.ByteString.class); bitField0_ = (bitField0_ & ~0x00000010); onChanged(); return this; @@ -2789,10 +2809,17 @@ public Builder clearBytesVal() { private com.google.protobuf.Internal.FloatList floatVal_ = emptyFloatList(); private void ensureFloatValIsMutable() { - if (!((bitField0_ & 0x00000020) != 0)) { - floatVal_ = mutableCopy(floatVal_); - bitField0_ |= 0x00000020; + if (!floatVal_.isModifiable()) { + floatVal_ = makeMutableCopy(floatVal_); } + bitField0_ |= 0x00000020; + } + + private void ensureFloatValIsMutable(int capacity) { + if (!floatVal_.isModifiable()) { + floatVal_ = makeMutableCopy(floatVal_, capacity); + } + bitField0_ |= 0x00000020; } /** * @@ -2806,9 +2833,8 @@ private void ensureFloatValIsMutable() { * @return A list containing the floatVal. */ public java.util.List getFloatValList() { - return ((bitField0_ & 0x00000020) != 0) - ? java.util.Collections.unmodifiableList(floatVal_) - : floatVal_; + floatVal_.makeImmutable(); + return floatVal_; } /** * @@ -2856,6 +2882,7 @@ public Builder setFloatVal(int index, float value) { ensureFloatValIsMutable(); floatVal_.setFloat(index, value); + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -2875,6 +2902,7 @@ public Builder addFloatVal(float value) { ensureFloatValIsMutable(); floatVal_.addFloat(value); + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -2893,6 +2921,7 @@ public Builder addFloatVal(float value) { public Builder addAllFloatVal(java.lang.Iterable values) { ensureFloatValIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, floatVal_); + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -2917,10 +2946,17 @@ public Builder clearFloatVal() { private com.google.protobuf.Internal.DoubleList doubleVal_ = emptyDoubleList(); private void ensureDoubleValIsMutable() { - if (!((bitField0_ & 0x00000040) != 0)) { - doubleVal_ = mutableCopy(doubleVal_); - bitField0_ |= 0x00000040; + if (!doubleVal_.isModifiable()) { + doubleVal_ = makeMutableCopy(doubleVal_); + } + bitField0_ |= 0x00000040; + } + + private void ensureDoubleValIsMutable(int capacity) { + if (!doubleVal_.isModifiable()) { + doubleVal_ = makeMutableCopy(doubleVal_, capacity); } + bitField0_ |= 0x00000040; } /** * @@ -2934,9 +2970,8 @@ private void ensureDoubleValIsMutable() { * @return A list containing the doubleVal. */ public java.util.List getDoubleValList() { - return ((bitField0_ & 0x00000040) != 0) - ? java.util.Collections.unmodifiableList(doubleVal_) - : doubleVal_; + doubleVal_.makeImmutable(); + return doubleVal_; } /** * @@ -2984,6 +3019,7 @@ public Builder setDoubleVal(int index, double value) { ensureDoubleValIsMutable(); doubleVal_.setDouble(index, value); + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -3003,6 +3039,7 @@ public Builder addDoubleVal(double value) { ensureDoubleValIsMutable(); doubleVal_.addDouble(value); + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -3021,6 +3058,7 @@ public Builder addDoubleVal(double value) { public Builder addAllDoubleVal(java.lang.Iterable values) { ensureDoubleValIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, doubleVal_); + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -3045,10 +3083,10 @@ public Builder clearDoubleVal() { private com.google.protobuf.Internal.IntList intVal_ = emptyIntList(); private void ensureIntValIsMutable() { - if (!((bitField0_ & 0x00000080) != 0)) { - intVal_ = mutableCopy(intVal_); - bitField0_ |= 0x00000080; + if (!intVal_.isModifiable()) { + intVal_ = makeMutableCopy(intVal_); } + bitField0_ |= 0x00000080; } /** * @@ -3064,9 +3102,8 @@ private void ensureIntValIsMutable() { * @return A list containing the intVal. */ public java.util.List getIntValList() { - return ((bitField0_ & 0x00000080) != 0) - ? java.util.Collections.unmodifiableList(intVal_) - : intVal_; + intVal_.makeImmutable(); + return intVal_; } /** * @@ -3120,6 +3157,7 @@ public Builder setIntVal(int index, int value) { ensureIntValIsMutable(); intVal_.setInt(index, value); + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -3141,6 +3179,7 @@ public Builder addIntVal(int value) { ensureIntValIsMutable(); intVal_.addInt(value); + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -3161,6 +3200,7 @@ public Builder addIntVal(int value) { public Builder addAllIntVal(java.lang.Iterable values) { ensureIntValIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, intVal_); + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -3187,10 +3227,10 @@ public Builder clearIntVal() { private com.google.protobuf.Internal.LongList int64Val_ = emptyLongList(); private void ensureInt64ValIsMutable() { - if (!((bitField0_ & 0x00000100) != 0)) { - int64Val_ = mutableCopy(int64Val_); - bitField0_ |= 0x00000100; + if (!int64Val_.isModifiable()) { + int64Val_ = makeMutableCopy(int64Val_); } + bitField0_ |= 0x00000100; } /** * @@ -3204,9 +3244,8 @@ private void ensureInt64ValIsMutable() { * @return A list containing the int64Val. */ public java.util.List getInt64ValList() { - return ((bitField0_ & 0x00000100) != 0) - ? java.util.Collections.unmodifiableList(int64Val_) - : int64Val_; + int64Val_.makeImmutable(); + return int64Val_; } /** * @@ -3254,6 +3293,7 @@ public Builder setInt64Val(int index, long value) { ensureInt64ValIsMutable(); int64Val_.setLong(index, value); + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -3273,6 +3313,7 @@ public Builder addInt64Val(long value) { ensureInt64ValIsMutable(); int64Val_.addLong(value); + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -3291,6 +3332,7 @@ public Builder addInt64Val(long value) { public Builder addAllInt64Val(java.lang.Iterable values) { ensureInt64ValIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, int64Val_); + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -3315,10 +3357,10 @@ public Builder clearInt64Val() { private com.google.protobuf.Internal.IntList uintVal_ = emptyIntList(); private void ensureUintValIsMutable() { - if (!((bitField0_ & 0x00000200) != 0)) { - uintVal_ = mutableCopy(uintVal_); - bitField0_ |= 0x00000200; + if (!uintVal_.isModifiable()) { + uintVal_ = makeMutableCopy(uintVal_); } + bitField0_ |= 0x00000200; } /** * @@ -3334,9 +3376,8 @@ private void ensureUintValIsMutable() { * @return A list containing the uintVal. */ public java.util.List getUintValList() { - return ((bitField0_ & 0x00000200) != 0) - ? java.util.Collections.unmodifiableList(uintVal_) - : uintVal_; + uintVal_.makeImmutable(); + return uintVal_; } /** * @@ -3390,6 +3431,7 @@ public Builder setUintVal(int index, int value) { ensureUintValIsMutable(); uintVal_.setInt(index, value); + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -3411,6 +3453,7 @@ public Builder addUintVal(int value) { ensureUintValIsMutable(); uintVal_.addInt(value); + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -3431,6 +3474,7 @@ public Builder addUintVal(int value) { public Builder addAllUintVal(java.lang.Iterable values) { ensureUintValIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, uintVal_); + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -3457,10 +3501,10 @@ public Builder clearUintVal() { private com.google.protobuf.Internal.LongList uint64Val_ = emptyLongList(); private void ensureUint64ValIsMutable() { - if (!((bitField0_ & 0x00000400) != 0)) { - uint64Val_ = mutableCopy(uint64Val_); - bitField0_ |= 0x00000400; + if (!uint64Val_.isModifiable()) { + uint64Val_ = makeMutableCopy(uint64Val_); } + bitField0_ |= 0x00000400; } /** * @@ -3474,9 +3518,8 @@ private void ensureUint64ValIsMutable() { * @return A list containing the uint64Val. */ public java.util.List getUint64ValList() { - return ((bitField0_ & 0x00000400) != 0) - ? java.util.Collections.unmodifiableList(uint64Val_) - : uint64Val_; + uint64Val_.makeImmutable(); + return uint64Val_; } /** * @@ -3524,6 +3567,7 @@ public Builder setUint64Val(int index, long value) { ensureUint64ValIsMutable(); uint64Val_.setLong(index, value); + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -3543,6 +3587,7 @@ public Builder addUint64Val(long value) { ensureUint64ValIsMutable(); uint64Val_.addLong(value); + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -3561,6 +3606,7 @@ public Builder addUint64Val(long value) { public Builder addAllUint64Val(java.lang.Iterable values) { ensureUint64ValIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, uint64Val_); + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -3930,25 +3976,56 @@ public java.util.List getListValBu return listValBuilder_; } - private com.google.protobuf.MapField + private static final class StructValConverter + implements com.google.protobuf.MapFieldBuilder.Converter< + java.lang.String, + com.google.cloud.vertexai.api.TensorOrBuilder, + com.google.cloud.vertexai.api.Tensor> { + @java.lang.Override + public com.google.cloud.vertexai.api.Tensor build( + com.google.cloud.vertexai.api.TensorOrBuilder val) { + if (val instanceof com.google.cloud.vertexai.api.Tensor) { + return (com.google.cloud.vertexai.api.Tensor) val; + } + return ((com.google.cloud.vertexai.api.Tensor.Builder) val).build(); + } + + @java.lang.Override + public com.google.protobuf.MapEntry + defaultEntry() { + return StructValDefaultEntryHolder.defaultEntry; + } + }; + + private static final StructValConverter structValConverter = new StructValConverter(); + + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.cloud.vertexai.api.TensorOrBuilder, + com.google.cloud.vertexai.api.Tensor, + com.google.cloud.vertexai.api.Tensor.Builder> structVal_; - private com.google.protobuf.MapField + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.cloud.vertexai.api.TensorOrBuilder, + com.google.cloud.vertexai.api.Tensor, + com.google.cloud.vertexai.api.Tensor.Builder> internalGetStructVal() { if (structVal_ == null) { - return com.google.protobuf.MapField.emptyMapField(StructValDefaultEntryHolder.defaultEntry); + return new com.google.protobuf.MapFieldBuilder<>(structValConverter); } return structVal_; } - private com.google.protobuf.MapField + private com.google.protobuf.MapFieldBuilder< + java.lang.String, + com.google.cloud.vertexai.api.TensorOrBuilder, + com.google.cloud.vertexai.api.Tensor, + com.google.cloud.vertexai.api.Tensor.Builder> internalGetMutableStructVal() { if (structVal_ == null) { - structVal_ = - com.google.protobuf.MapField.newMapField(StructValDefaultEntryHolder.defaultEntry); - } - if (!structVal_.isMutable()) { - structVal_ = structVal_.copy(); + structVal_ = new com.google.protobuf.MapFieldBuilder<>(structValConverter); } bitField0_ |= 0x00001000; onChanged(); @@ -3956,7 +4033,7 @@ public java.util.List getListValBu } public int getStructValCount() { - return internalGetStructVal().getMap().size(); + return internalGetStructVal().ensureBuilderMap().size(); } /** * @@ -3972,7 +4049,7 @@ public boolean containsStructVal(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } - return internalGetStructVal().getMap().containsKey(key); + return internalGetStructVal().ensureBuilderMap().containsKey(key); } /** Use {@link #getStructValMap()} instead. */ @java.lang.Override @@ -3991,7 +4068,7 @@ public java.util.Map get */ @java.lang.Override public java.util.Map getStructValMap() { - return internalGetStructVal().getMap(); + return internalGetStructVal().getImmutableMap(); } /** * @@ -4010,9 +4087,9 @@ public java.util.Map get if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetStructVal().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; + java.util.Map map = + internalGetMutableStructVal().ensureBuilderMap(); + return map.containsKey(key) ? structValConverter.build(map.get(key)) : defaultValue; } /** * @@ -4028,17 +4105,17 @@ public com.google.cloud.vertexai.api.Tensor getStructValOrThrow(java.lang.String if (key == null) { throw new NullPointerException("map key"); } - java.util.Map map = - internalGetStructVal().getMap(); + java.util.Map map = + internalGetMutableStructVal().ensureBuilderMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } - return map.get(key); + return structValConverter.build(map.get(key)); } public Builder clearStructVal() { bitField0_ = (bitField0_ & ~0x00001000); - internalGetMutableStructVal().getMutableMap().clear(); + internalGetMutableStructVal().clear(); return this; } /** @@ -4054,7 +4131,7 @@ public Builder removeStructVal(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } - internalGetMutableStructVal().getMutableMap().remove(key); + internalGetMutableStructVal().ensureBuilderMap().remove(key); return this; } /** Use alternate mutation accessors instead. */ @@ -4062,7 +4139,7 @@ public Builder removeStructVal(java.lang.String key) { public java.util.Map getMutableStructVal() { bitField0_ |= 0x00001000; - return internalGetMutableStructVal().getMutableMap(); + return internalGetMutableStructVal().ensureMessageMap(); } /** * @@ -4080,7 +4157,7 @@ public Builder putStructVal(java.lang.String key, com.google.cloud.vertexai.api. if (value == null) { throw new NullPointerException("map value"); } - internalGetMutableStructVal().getMutableMap().put(key, value); + internalGetMutableStructVal().ensureBuilderMap().put(key, value); bitField0_ |= 0x00001000; return this; } @@ -4095,10 +4172,40 @@ public Builder putStructVal(java.lang.String key, com.google.cloud.vertexai.api. */ public Builder putAllStructVal( java.util.Map values) { - internalGetMutableStructVal().getMutableMap().putAll(values); + for (java.util.Map.Entry e : + values.entrySet()) { + if (e.getKey() == null || e.getValue() == null) { + throw new NullPointerException(); + } + } + internalGetMutableStructVal().ensureBuilderMap().putAll(values); bitField0_ |= 0x00001000; return this; } + /** + * + * + *
+     * A map of string to tensor.
+     * 
+ * + * map<string, .google.cloud.vertexai.v1.Tensor> struct_val = 12; + */ + public com.google.cloud.vertexai.api.Tensor.Builder putStructValBuilderIfAbsent( + java.lang.String key) { + java.util.Map builderMap = + internalGetMutableStructVal().ensureBuilderMap(); + com.google.cloud.vertexai.api.TensorOrBuilder entry = builderMap.get(key); + if (entry == null) { + entry = com.google.cloud.vertexai.api.Tensor.newBuilder(); + builderMap.put(key, entry); + } + if (entry instanceof com.google.cloud.vertexai.api.Tensor) { + entry = ((com.google.cloud.vertexai.api.Tensor) entry).toBuilder(); + builderMap.put(key, entry); + } + return (com.google.cloud.vertexai.api.Tensor.Builder) entry; + } private com.google.protobuf.ByteString tensorVal_ = com.google.protobuf.ByteString.EMPTY; /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/TensorOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/TensorOrBuilder.java index 6f1c58166edd..289197b0802b 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/TensorOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/TensorOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/types.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface TensorOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/TokensInfo.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/TokensInfo.java index 62d726a3715d..f05e369378fa 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/TokensInfo.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/TokensInfo.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/llm_utility_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** @@ -38,7 +39,7 @@ private TokensInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { } private TokensInfo() { - tokens_ = java.util.Collections.emptyList(); + tokens_ = emptyList(com.google.protobuf.ByteString.class); tokenIds_ = emptyLongList(); } @@ -66,7 +67,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { public static final int TOKENS_FIELD_NUMBER = 1; @SuppressWarnings("serial") - private java.util.List tokens_; + private com.google.protobuf.Internal.ProtobufList tokens_ = + emptyList(com.google.protobuf.ByteString.class); /** * * @@ -115,7 +117,7 @@ public com.google.protobuf.ByteString getTokens(int index) { public static final int TOKEN_IDS_FIELD_NUMBER = 2; @SuppressWarnings("serial") - private com.google.protobuf.Internal.LongList tokenIds_; + private com.google.protobuf.Internal.LongList tokenIds_ = emptyLongList(); /** * * @@ -393,7 +395,7 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { public Builder clear() { super.clear(); bitField0_ = 0; - tokens_ = java.util.Collections.emptyList(); + tokens_ = emptyList(com.google.protobuf.ByteString.class); tokenIds_ = emptyLongList(); return this; } @@ -422,7 +424,6 @@ public com.google.cloud.vertexai.api.TokensInfo build() { public com.google.cloud.vertexai.api.TokensInfo buildPartial() { com.google.cloud.vertexai.api.TokensInfo result = new com.google.cloud.vertexai.api.TokensInfo(this); - buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } @@ -430,21 +431,16 @@ public com.google.cloud.vertexai.api.TokensInfo buildPartial() { return result; } - private void buildPartialRepeatedFields(com.google.cloud.vertexai.api.TokensInfo result) { - if (((bitField0_ & 0x00000001) != 0)) { - tokens_ = java.util.Collections.unmodifiableList(tokens_); - bitField0_ = (bitField0_ & ~0x00000001); + private void buildPartial0(com.google.cloud.vertexai.api.TokensInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + tokens_.makeImmutable(); + result.tokens_ = tokens_; } - result.tokens_ = tokens_; - if (((bitField0_ & 0x00000002) != 0)) { + if (((from_bitField0_ & 0x00000002) != 0)) { tokenIds_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000002); + result.tokenIds_ = tokenIds_; } - result.tokenIds_ = tokenIds_; - } - - private void buildPartial0(com.google.cloud.vertexai.api.TokensInfo result) { - int from_bitField0_ = bitField0_; } @java.lang.Override @@ -495,7 +491,8 @@ public Builder mergeFrom(com.google.cloud.vertexai.api.TokensInfo other) { if (!other.tokens_.isEmpty()) { if (tokens_.isEmpty()) { tokens_ = other.tokens_; - bitField0_ = (bitField0_ & ~0x00000001); + tokens_.makeImmutable(); + bitField0_ |= 0x00000001; } else { ensureTokensIsMutable(); tokens_.addAll(other.tokens_); @@ -505,7 +502,8 @@ public Builder mergeFrom(com.google.cloud.vertexai.api.TokensInfo other) { if (!other.tokenIds_.isEmpty()) { if (tokenIds_.isEmpty()) { tokenIds_ = other.tokenIds_; - bitField0_ = (bitField0_ & ~0x00000002); + tokenIds_.makeImmutable(); + bitField0_ |= 0x00000002; } else { ensureTokenIdsIsMutable(); tokenIds_.addAll(other.tokenIds_); @@ -582,14 +580,14 @@ public Builder mergeFrom( private int bitField0_; - private java.util.List tokens_ = - java.util.Collections.emptyList(); + private com.google.protobuf.Internal.ProtobufList tokens_ = + emptyList(com.google.protobuf.ByteString.class); private void ensureTokensIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - tokens_ = new java.util.ArrayList(tokens_); - bitField0_ |= 0x00000001; + if (!tokens_.isModifiable()) { + tokens_ = makeMutableCopy(tokens_); } + bitField0_ |= 0x00000001; } /** * @@ -603,9 +601,8 @@ private void ensureTokensIsMutable() { * @return A list containing the tokens. */ public java.util.List getTokensList() { - return ((bitField0_ & 0x00000001) != 0) - ? java.util.Collections.unmodifiableList(tokens_) - : tokens_; + tokens_.makeImmutable(); + return tokens_; } /** * @@ -655,6 +652,7 @@ public Builder setTokens(int index, com.google.protobuf.ByteString value) { } ensureTokensIsMutable(); tokens_.set(index, value); + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -676,6 +674,7 @@ public Builder addTokens(com.google.protobuf.ByteString value) { } ensureTokensIsMutable(); tokens_.add(value); + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -695,6 +694,7 @@ public Builder addAllTokens( java.lang.Iterable values) { ensureTokensIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tokens_); + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -710,7 +710,7 @@ public Builder addAllTokens( * @return This builder for chaining. */ public Builder clearTokens() { - tokens_ = java.util.Collections.emptyList(); + tokens_ = emptyList(com.google.protobuf.ByteString.class); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; @@ -719,10 +719,10 @@ public Builder clearTokens() { private com.google.protobuf.Internal.LongList tokenIds_ = emptyLongList(); private void ensureTokenIdsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - tokenIds_ = mutableCopy(tokenIds_); - bitField0_ |= 0x00000002; + if (!tokenIds_.isModifiable()) { + tokenIds_ = makeMutableCopy(tokenIds_); } + bitField0_ |= 0x00000002; } /** * @@ -736,9 +736,8 @@ private void ensureTokenIdsIsMutable() { * @return A list containing the tokenIds. */ public java.util.List getTokenIdsList() { - return ((bitField0_ & 0x00000002) != 0) - ? java.util.Collections.unmodifiableList(tokenIds_) - : tokenIds_; + tokenIds_.makeImmutable(); + return tokenIds_; } /** * @@ -786,6 +785,7 @@ public Builder setTokenIds(int index, long value) { ensureTokenIdsIsMutable(); tokenIds_.setLong(index, value); + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -805,6 +805,7 @@ public Builder addTokenIds(long value) { ensureTokenIdsIsMutable(); tokenIds_.addLong(value); + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -823,6 +824,7 @@ public Builder addTokenIds(long value) { public Builder addAllTokenIds(java.lang.Iterable values) { ensureTokenIdsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tokenIds_); + bitField0_ |= 0x00000002; onChanged(); return this; } diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/TokensInfoOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/TokensInfoOrBuilder.java index 0ef6a5d0f34f..515b4963acba 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/TokensInfoOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/TokensInfoOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/llm_utility_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface TokensInfoOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Tool.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Tool.java index 06b23c2a9761..7a48f61b8a09 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Tool.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Tool.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/tool.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ToolOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ToolOrBuilder.java index 5dd77677dfbe..6faf76400bda 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ToolOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ToolOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/tool.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface ToolOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ToolProto.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ToolProto.java index 589461a6950c..a97321f4b8eb 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ToolProto.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/ToolProto.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/tool.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public final class ToolProto { @@ -56,22 +57,21 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "oogle.cloud.vertexai.v1\032\037google/api/fiel" + "d_behavior.proto\032&google/cloud/vertexai/" + "v1/openapi.proto\032\034google/protobuf/struct" - + ".proto\"Z\n\004Tool\022R\n\025function_declarations\030" + + ".proto\"Y\n\004Tool\022Q\n\025function_declarations\030" + "\001 \003(\0132-.google.cloud.vertexai.v1.Functio" - + "nDeclarationB\004\342A\001\001\"\200\001\n\023FunctionDeclarati" - + "on\022\022\n\004name\030\001 \001(\tB\004\342A\001\002\022\031\n\013description\030\002 " - + "\001(\tB\004\342A\001\001\022:\n\nparameters\030\003 \001(\0132 .google.c" - + "loud.vertexai.v1.SchemaB\004\342A\001\001\"O\n\014Functio" - + "nCall\022\022\n\004name\030\001 \001(\tB\004\342A\001\002\022+\n\004args\030\002 \001(\0132" - + "\027.google.protobuf.StructB\004\342A\001\001\"W\n\020Functi" - + "onResponse\022\022\n\004name\030\001 \001(\tB\004\342A\001\002\022/\n\010respon" - + "se\030\002 \001(\0132\027.google.protobuf.StructB\004\342A\001\002B" - + "\306\001\n\035com.google.cloud.vertexai.apiB\tToolP" - + "rotoP\001Z>cloud.google.com/go/aiplatform/a" - + "piv1/aiplatformpb;aiplatformpb\252\002\032Google." - + "Cloud.AIPlatform.V1\312\002\032Google\\Cloud\\AIPla" - + "tform\\V1\352\002\035Google::Cloud::AIPlatform::V1" - + "b\006proto3" + + "nDeclarationB\003\340A\001\"}\n\023FunctionDeclaration" + + "\022\021\n\004name\030\001 \001(\tB\003\340A\002\022\030\n\013description\030\002 \001(\t" + + "B\003\340A\001\0229\n\nparameters\030\003 \001(\0132 .google.cloud" + + ".vertexai.v1.SchemaB\003\340A\001\"M\n\014FunctionCall" + + "\022\021\n\004name\030\001 \001(\tB\003\340A\002\022*\n\004args\030\002 \001(\0132\027.goog" + + "le.protobuf.StructB\003\340A\001\"U\n\020FunctionRespo" + + "nse\022\021\n\004name\030\001 \001(\tB\003\340A\002\022.\n\010response\030\002 \001(\013" + + "2\027.google.protobuf.StructB\003\340A\002B\306\001\n\035com.g" + + "oogle.cloud.vertexai.apiB\tToolProtoP\001Z>c" + + "loud.google.com/go/aiplatform/apiv1/aipl" + + "atformpb;aiplatformpb\252\002\032Google.Cloud.AIP" + + "latform.V1\312\002\032Google\\Cloud\\AIPlatform\\V1\352" + + "\002\035Google::Cloud::AIPlatform::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Type.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Type.java index 80d49c9769bf..9b9b7581d7da 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Type.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/Type.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/openapi.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/TypesProto.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/TypesProto.java index 142b93bdcbb4..6d040bc3ae7f 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/TypesProto.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/TypesProto.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/types.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public final class TypesProto { diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UndeployModelOperationMetadata.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UndeployModelOperationMetadata.java index 87ff937ae7e2..aed04fddeb40 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UndeployModelOperationMetadata.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UndeployModelOperationMetadata.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/endpoint_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** @@ -62,6 +63,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.vertexai.api.UndeployModelOperationMetadata.Builder.class); } + private int bitField0_; public static final int GENERIC_METADATA_FIELD_NUMBER = 1; private com.google.cloud.vertexai.api.GenericOperationMetadata genericMetadata_; /** @@ -77,7 +79,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { */ @java.lang.Override public boolean hasGenericMetadata() { - return genericMetadata_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** * @@ -127,7 +129,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (genericMetadata_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(1, getGenericMetadata()); } getUnknownFields().writeTo(output); @@ -139,7 +141,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (genericMetadata_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getGenericMetadata()); } size += getUnknownFields().getSerializedSize(); @@ -308,10 +310,19 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.vertexai.api.UndeployModelOperationMetadata.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getGenericMetadataFieldBuilder(); + } } @java.lang.Override @@ -361,10 +372,13 @@ public com.google.cloud.vertexai.api.UndeployModelOperationMetadata buildPartial private void buildPartial0( com.google.cloud.vertexai.api.UndeployModelOperationMetadata result) { int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.genericMetadata_ = genericMetadataBuilder_ == null ? genericMetadata_ : genericMetadataBuilder_.build(); + to_bitField0_ |= 0x00000001; } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -574,8 +588,10 @@ public Builder mergeGenericMetadata( } else { genericMetadataBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000001; - onChanged(); + if (genericMetadata_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } return this; } /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UndeployModelOperationMetadataOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UndeployModelOperationMetadataOrBuilder.java index 943fb3db34a2..601ee96eb62f 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UndeployModelOperationMetadataOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UndeployModelOperationMetadataOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/endpoint_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface UndeployModelOperationMetadataOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UndeployModelRequest.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UndeployModelRequest.java index d44fb767e615..1a80fbe76a56 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UndeployModelRequest.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UndeployModelRequest.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/endpoint_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** @@ -56,7 +57,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @SuppressWarnings({"rawtypes"}) @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { switch (number) { case 3: return internalGetTrafficSplit(); @@ -515,7 +517,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { switch (number) { case 3: return internalGetTrafficSplit(); @@ -525,7 +528,8 @@ protected com.google.protobuf.MapField internalGetMapField(int number) { } @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { switch (number) { case 3: return internalGetMutableTrafficSplit(); diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UndeployModelRequestOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UndeployModelRequestOrBuilder.java index 443c1cbf69ea..495c3b484018 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UndeployModelRequestOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UndeployModelRequestOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/endpoint_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface UndeployModelRequestOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UndeployModelResponse.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UndeployModelResponse.java index 023ec7b9b5ca..8e3357915c52 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UndeployModelResponse.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UndeployModelResponse.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/endpoint_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UndeployModelResponseOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UndeployModelResponseOrBuilder.java index 6afe91b1df5b..56a53f7023e0 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UndeployModelResponseOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UndeployModelResponseOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/endpoint_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface UndeployModelResponseOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UpdateEndpointRequest.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UpdateEndpointRequest.java index beb73beac70d..9a1ca32088be 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UpdateEndpointRequest.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UpdateEndpointRequest.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/endpoint_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** @@ -61,6 +62,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.vertexai.api.UpdateEndpointRequest.Builder.class); } + private int bitField0_; public static final int ENDPOINT_FIELD_NUMBER = 1; private com.google.cloud.vertexai.api.Endpoint endpoint_; /** @@ -78,7 +80,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { */ @java.lang.Override public boolean hasEndpoint() { - return endpoint_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** * @@ -134,7 +136,7 @@ public com.google.cloud.vertexai.api.EndpointOrBuilder getEndpointOrBuilder() { */ @java.lang.Override public boolean hasUpdateMask() { - return updateMask_ != null; + return ((bitField0_ & 0x00000002) != 0); } /** * @@ -183,10 +185,10 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (endpoint_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(1, getEndpoint()); } - if (updateMask_ != null) { + if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(2, getUpdateMask()); } getUnknownFields().writeTo(output); @@ -198,10 +200,10 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (endpoint_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEndpoint()); } - if (updateMask_ != null) { + if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); } size += getUnknownFields().getSerializedSize(); @@ -377,10 +379,20 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.vertexai.api.UpdateEndpointRequest.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getEndpointFieldBuilder(); + getUpdateMaskFieldBuilder(); + } } @java.lang.Override @@ -433,12 +445,16 @@ public com.google.cloud.vertexai.api.UpdateEndpointRequest buildPartial() { private void buildPartial0(com.google.cloud.vertexai.api.UpdateEndpointRequest result) { int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.endpoint_ = endpointBuilder_ == null ? endpoint_ : endpointBuilder_.build(); + to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000002) != 0)) { result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000002; } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -662,8 +678,10 @@ public Builder mergeEndpoint(com.google.cloud.vertexai.api.Endpoint value) { } else { endpointBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000001; - onChanged(); + if (endpoint_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } return this; } /** @@ -863,8 +881,10 @@ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { } else { updateMaskBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000002; - onChanged(); + if (updateMask_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } return this; } /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UpdateEndpointRequestOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UpdateEndpointRequestOrBuilder.java index 0d34507f6b3a..969754f4c4ed 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UpdateEndpointRequestOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/UpdateEndpointRequestOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/endpoint_service.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface UpdateEndpointRequestOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/VideoMetadata.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/VideoMetadata.java index 668bdf1768a6..0bc3f305ae18 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/VideoMetadata.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/VideoMetadata.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/content.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** @@ -60,6 +61,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.vertexai.api.VideoMetadata.Builder.class); } + private int bitField0_; public static final int START_OFFSET_FIELD_NUMBER = 1; private com.google.protobuf.Duration startOffset_; /** @@ -76,7 +78,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { */ @java.lang.Override public boolean hasStartOffset() { - return startOffset_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** * @@ -125,7 +127,7 @@ public com.google.protobuf.DurationOrBuilder getStartOffsetOrBuilder() { */ @java.lang.Override public boolean hasEndOffset() { - return endOffset_ != null; + return ((bitField0_ & 0x00000002) != 0); } /** * @@ -172,10 +174,10 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (startOffset_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(1, getStartOffset()); } - if (endOffset_ != null) { + if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(2, getEndOffset()); } getUnknownFields().writeTo(output); @@ -187,10 +189,10 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (startOffset_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getStartOffset()); } - if (endOffset_ != null) { + if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndOffset()); } size += getUnknownFields().getSerializedSize(); @@ -365,10 +367,20 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.vertexai.api.VideoMetadata.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getStartOffsetFieldBuilder(); + getEndOffsetFieldBuilder(); + } } @java.lang.Override @@ -421,13 +433,17 @@ public com.google.cloud.vertexai.api.VideoMetadata buildPartial() { private void buildPartial0(com.google.cloud.vertexai.api.VideoMetadata result) { int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.startOffset_ = startOffsetBuilder_ == null ? startOffset_ : startOffsetBuilder_.build(); + to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000002) != 0)) { result.endOffset_ = endOffsetBuilder_ == null ? endOffset_ : endOffsetBuilder_.build(); + to_bitField0_ |= 0x00000002; } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -645,8 +661,10 @@ public Builder mergeStartOffset(com.google.protobuf.Duration value) { } else { startOffsetBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000001; - onChanged(); + if (startOffset_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } return this; } /** @@ -835,8 +853,10 @@ public Builder mergeEndOffset(com.google.protobuf.Duration value) { } else { endOffsetBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000002; - onChanged(); + if (endOffset_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } return this; } /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/VideoMetadataOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/VideoMetadataOrBuilder.java index cc85e940c5bf..5019ab7c507c 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/VideoMetadataOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/VideoMetadataOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/content.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface VideoMetadataOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/XraiAttribution.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/XraiAttribution.java index 46d65f354297..fc38b81a4890 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/XraiAttribution.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/XraiAttribution.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/explanation.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; /** @@ -65,6 +66,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.vertexai.api.XraiAttribution.Builder.class); } + private int bitField0_; public static final int STEP_COUNT_FIELD_NUMBER = 1; private int stepCount_ = 0; /** @@ -107,7 +109,7 @@ public int getStepCount() { */ @java.lang.Override public boolean hasSmoothGradConfig() { - return smoothGradConfig_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** * @@ -172,7 +174,7 @@ public com.google.cloud.vertexai.api.SmoothGradConfigOrBuilder getSmoothGradConf */ @java.lang.Override public boolean hasBlurBaselineConfig() { - return blurBaselineConfig_ != null; + return ((bitField0_ & 0x00000002) != 0); } /** * @@ -235,10 +237,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (stepCount_ != 0) { output.writeInt32(1, stepCount_); } - if (smoothGradConfig_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getSmoothGradConfig()); } - if (blurBaselineConfig_ != null) { + if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(3, getBlurBaselineConfig()); } getUnknownFields().writeTo(output); @@ -253,10 +255,10 @@ public int getSerializedSize() { if (stepCount_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, stepCount_); } - if (smoothGradConfig_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSmoothGradConfig()); } - if (blurBaselineConfig_ != null) { + if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getBlurBaselineConfig()); } size += getUnknownFields().getSerializedSize(); @@ -439,10 +441,20 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.vertexai.api.XraiAttribution.newBuilder() - private Builder() {} + private Builder() { + maybeForceBuilderInitialization(); + } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getSmoothGradConfigFieldBuilder(); + getBlurBaselineConfigFieldBuilder(); + } } @java.lang.Override @@ -499,16 +511,20 @@ private void buildPartial0(com.google.cloud.vertexai.api.XraiAttribution result) if (((from_bitField0_ & 0x00000001) != 0)) { result.stepCount_ = stepCount_; } + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000002) != 0)) { result.smoothGradConfig_ = smoothGradConfigBuilder_ == null ? smoothGradConfig_ : smoothGradConfigBuilder_.build(); + to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000004) != 0)) { result.blurBaselineConfig_ = blurBaselineConfigBuilder_ == null ? blurBaselineConfig_ : blurBaselineConfigBuilder_.build(); + to_bitField0_ |= 0x00000002; } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -824,8 +840,10 @@ public Builder mergeSmoothGradConfig(com.google.cloud.vertexai.api.SmoothGradCon } else { smoothGradConfigBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000002; - onChanged(); + if (smoothGradConfig_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } return this; } /** @@ -1054,8 +1072,10 @@ public Builder mergeBlurBaselineConfig(com.google.cloud.vertexai.api.BlurBaselin } else { blurBaselineConfigBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000004; - onChanged(); + if (blurBaselineConfig_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } return this; } /** diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/XraiAttributionOrBuilder.java b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/XraiAttributionOrBuilder.java index ecaaabb11dd1..1e4f3175207b 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/XraiAttributionOrBuilder.java +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/java/com/google/cloud/vertexai/api/XraiAttributionOrBuilder.java @@ -16,6 +16,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/vertexai/v1/explanation.proto +// Protobuf Java Version: 3.25.2 package com.google.cloud.vertexai.api; public interface XraiAttributionOrBuilder diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/explanation.proto b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/explanation.proto index de47ade39d95..fc648393cf7a 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/explanation.proto +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/explanation.proto @@ -44,6 +44,14 @@ message Explanation { // [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index] // can be used to identify which output this attribution is explaining. // + // By default, we provide Shapley values for the predicted class. However, + // you can configure the explanation request to generate Shapley values for + // any other classes too. For example, if a model predicts a probability of + // `0.4` for approving a loan application, the model's decision is to reject + // the application since `p(reject) = 0.6 > p(approve) = 0.4`, and the default + // Shapley values would be computed for rejection decision and not approval, + // even though the latter might be the positive class. + // // If users set // [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k], // the attributions are sorted by diff --git a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/prediction_service.proto b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/prediction_service.proto index 842265e351bd..c3ff2b8c39f8 100644 --- a/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/prediction_service.proto +++ b/java-vertexai/proto-google-cloud-vertexai-v1/src/main/proto/google/cloud/vertexai/v1/prediction_service.proto @@ -77,8 +77,22 @@ service PredictionService { option (google.api.method_signature) = "endpoint,http_body"; } - // Perform an unary online prediction request for Vertex first-party products - // and frameworks. + // Perform a streaming online prediction with an arbitrary HTTP payload. + rpc StreamRawPredict(StreamRawPredictRequest) + returns (stream google.api.HttpBody) { + option (google.api.http) = { + post: "/v1/{endpoint=projects/*/locations/*/endpoints/*}:streamRawPredict" + body: "*" + additional_bindings { + post: "/v1/{endpoint=projects/*/locations/*/publishers/*/models/*}:streamRawPredict" + body: "*" + } + }; + option (google.api.method_signature) = "endpoint,http_body"; + } + + // Perform an unary online prediction request to a gRPC model server for + // Vertex first-party products and frameworks. rpc DirectPredict(DirectPredictRequest) returns (DirectPredictResponse) { option (google.api.http) = { post: "/v1/{endpoint=projects/*/locations/*/endpoints/*}:directPredict" @@ -86,7 +100,8 @@ service PredictionService { }; } - // Perform an online prediction request through gRPC. + // Perform an unary online prediction request to a gRPC model server for + // custom containers. rpc DirectRawPredict(DirectRawPredictRequest) returns (DirectRawPredictResponse) { option (google.api.http) = { @@ -95,6 +110,16 @@ service PredictionService { }; } + // Perform a streaming online prediction request to a gRPC model server for + // Vertex first-party products and frameworks. + rpc StreamDirectPredict(stream StreamDirectPredictRequest) + returns (stream StreamDirectPredictResponse) {} + + // Perform a streaming online prediction request to a gRPC model server for + // custom containers. + rpc StreamDirectRawPredict(stream StreamDirectRawPredictRequest) + returns (stream StreamDirectRawPredictResponse) {} + // Perform a streaming online prediction request for Vertex first-party // products and frameworks. rpc StreamingPredict(stream StreamingPredictRequest) @@ -138,6 +163,20 @@ service PredictionService { "endpoint,instances,parameters,deployed_model_id"; } + // Generate content with multimodal inputs. + rpc GenerateContent(GenerateContentRequest) + returns (GenerateContentResponse) { + option (google.api.http) = { + post: "/v1/{model=projects/*/locations/*/endpoints/*}:generateContent" + body: "*" + additional_bindings { + post: "/v1/{model=projects/*/locations/*/publishers/*/models/*}:generateContent" + body: "*" + } + }; + option (google.api.method_signature) = "model,contents"; + } + // Generate content with multimodal inputs with streaming support. rpc StreamGenerateContent(GenerateContentRequest) returns (stream GenerateContentResponse) { @@ -254,6 +293,23 @@ message RawPredictRequest { google.api.HttpBody http_body = 2; } +// Request message for +// [PredictionService.StreamRawPredict][google.cloud.aiplatform.v1.PredictionService.StreamRawPredict]. +message StreamRawPredictRequest { + // 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) = { + type: "aiplatform.googleapis.com/Endpoint" + } + ]; + + // The prediction input. Supports HTTP headers and arbitrary data payload. + google.api.HttpBody http_body = 2; +} + // Request message for // [PredictionService.DirectPredict][google.cloud.aiplatform.v1.PredictionService.DirectPredict]. message DirectPredictRequest { @@ -317,6 +373,85 @@ message DirectRawPredictResponse { bytes output = 1; } +// 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][]. +message StreamDirectPredictRequest { + // 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) = { + type: "aiplatform.googleapis.com/Endpoint" + } + ]; + + // Optional. The prediction input. + repeated Tensor inputs = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The parameters that govern the prediction. + Tensor parameters = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [PredictionService.StreamDirectPredict][google.cloud.aiplatform.v1.PredictionService.StreamDirectPredict]. +message StreamDirectPredictResponse { + // The prediction output. + repeated Tensor outputs = 1; + + // The parameters that govern the prediction. + Tensor parameters = 2; +} + +// 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. +message StreamDirectRawPredictRequest { + // 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) = { + type: "aiplatform.googleapis.com/Endpoint" + } + ]; + + // 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]; + + // Optional. The prediction input. + bytes input = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [PredictionService.StreamDirectRawPredict][google.cloud.aiplatform.v1.PredictionService.StreamDirectRawPredict]. +message StreamDirectRawPredictResponse { + // The prediction output. + bytes output = 1; +} + // Request message for // [PredictionService.StreamingPredict][google.cloud.aiplatform.v1.PredictionService.StreamingPredict]. // @@ -518,8 +653,7 @@ message GenerateContentRequest { // // A `Tool` is a piece of code that enables the system to interact with // external systems to perform an action, or set of actions, outside of - // knowledge and scope of the model. The only supported tool is currently - // `Function` + // knowledge and scope of the model. repeated Tool tools = 6 [(google.api.field_behavior) = OPTIONAL]; // Optional. Per request settings for blocking unsafe content.