Skip to content

Commit

Permalink
feat: [vertexai] Update Gapic client. (#10574)
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 617258114

Co-authored-by: Zhenyi Qi <zhenyiqi@google.com>
  • Loading branch information
copybara-service[bot] and Zhenyi Qi authored Mar 21, 2024
1 parent 99427af commit bedcddf
Show file tree
Hide file tree
Showing 40 changed files with 1,355 additions and 518 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,6 @@ public static Builder newBuilder() {
}

/** Returns a new REST builder for this class. */
@BetaApi
public static Builder newHttpJsonBuilder() {
return Builder.createHttpJsonDefault();
}
Expand Down Expand Up @@ -284,7 +283,6 @@ private static Builder createDefault() {
return new Builder(EndpointServiceStubSettings.newBuilder());
}

@BetaApi
private static Builder createHttpJsonDefault() {
return new Builder(EndpointServiceStubSettings.newHttpJsonBuilder());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ public static Builder newBuilder() {
}

/** Returns a new REST builder for this class. */
@BetaApi
public static Builder newHttpJsonBuilder() {
return Builder.createHttpJsonDefault();
}
Expand Down Expand Up @@ -214,7 +213,6 @@ private static Builder createDefault() {
return new Builder(LlmUtilityServiceStubSettings.newBuilder());
}

@BetaApi
private static Builder createHttpJsonDefault() {
return new Builder(LlmUtilityServiceStubSettings.newHttpJsonBuilder());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,6 @@ public static Builder newBuilder() {
}

/** Returns a new REST builder for this class. */
@BetaApi
public static Builder newHttpJsonBuilder() {
return Builder.createHttpJsonDefault();
}
Expand Down Expand Up @@ -280,7 +279,6 @@ private static Builder createDefault() {
return new Builder(PredictionServiceStubSettings.newBuilder());
}

@BetaApi
private static Builder createHttpJsonDefault() {
return new Builder(PredictionServiceStubSettings.newHttpJsonBuilder());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -897,8 +897,6 @@ public UnaryCallSettings.Builder<CreateEndpointRequest, Operation> createEndpoin
}

/** Returns the builder for the settings used for calls to createEndpoint. */
@BetaApi(
"The surface for use by generated code is not stable yet and may change in the future.")
public OperationCallSettings.Builder<
CreateEndpointRequest, Endpoint, CreateEndpointOperationMetadata>
createEndpointOperationSettings() {
Expand Down Expand Up @@ -928,8 +926,6 @@ public UnaryCallSettings.Builder<DeleteEndpointRequest, Operation> deleteEndpoin
}

/** Returns the builder for the settings used for calls to deleteEndpoint. */
@BetaApi(
"The surface for use by generated code is not stable yet and may change in the future.")
public OperationCallSettings.Builder<DeleteEndpointRequest, Empty, DeleteOperationMetadata>
deleteEndpointOperationSettings() {
return deleteEndpointOperationSettings;
Expand All @@ -941,8 +937,6 @@ public UnaryCallSettings.Builder<DeployModelRequest, Operation> deployModelSetti
}

/** Returns the builder for the settings used for calls to deployModel. */
@BetaApi(
"The surface for use by generated code is not stable yet and may change in the future.")
public OperationCallSettings.Builder<
DeployModelRequest, DeployModelResponse, DeployModelOperationMetadata>
deployModelOperationSettings() {
Expand All @@ -955,8 +949,6 @@ public UnaryCallSettings.Builder<UndeployModelRequest, Operation> undeployModelS
}

/** Returns the builder for the settings used for calls to undeployModel. */
@BetaApi(
"The surface for use by generated code is not stable yet and may change in the future.")
public OperationCallSettings.Builder<
UndeployModelRequest, UndeployModelResponse, UndeployModelOperationMetadata>
undeployModelOperationSettings() {
Expand All @@ -970,8 +962,6 @@ public UnaryCallSettings.Builder<UndeployModelRequest, Operation> undeployModelS
}

/** Returns the builder for the settings used for calls to mutateDeployedModel. */
@BetaApi(
"The surface for use by generated code is not stable yet and may change in the future.")
public OperationCallSettings.Builder<
MutateDeployedModelRequest,
MutateDeployedModelResponse,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package com.google.cloud.vertexai.api.stub;

import com.google.api.core.BetaApi;
import com.google.api.gax.httpjson.HttpJsonCallSettings;
import com.google.api.gax.httpjson.HttpJsonCallableFactory;
import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable;
Expand All @@ -41,7 +40,6 @@
* <p>This class is for advanced usage.
*/
@Generated("by gapic-generator-java")
@BetaApi
public class HttpJsonEndpointServiceCallableFactory
implements HttpJsonStubCallableFactory<Operation, OperationsStub> {

Expand Down Expand Up @@ -73,8 +71,6 @@ public <RequestT, ResponseT> UnaryCallable<RequestT, ResponseT> createBatchingCa
httpJsonCallSettings, callSettings, clientContext);
}

@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
@Override
public <RequestT, ResponseT, MetadataT>
OperationCallable<RequestT, ResponseT, MetadataT> createOperationCallable(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import static com.google.cloud.vertexai.api.EndpointServiceClient.ListLocationsPagedResponse;

import com.google.api.HttpRule;
import com.google.api.core.BetaApi;
import com.google.api.core.InternalApi;
import com.google.api.gax.core.BackgroundResource;
import com.google.api.gax.core.BackgroundResourceAggregation;
Expand Down Expand Up @@ -82,7 +81,6 @@
* <p>This class is for advanced usage and reflects the underlying API directly.
*/
@Generated("by gapic-generator-java")
@BetaApi
public class HttpJsonEndpointServiceStub extends EndpointServiceStub {
private static final TypeRegistry typeRegistry =
TypeRegistry.newBuilder()
Expand Down Expand Up @@ -493,7 +491,9 @@ public class HttpJsonEndpointServiceStub extends EndpointServiceStub {
"/ui/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:setIamPolicy",
"/ui/{resource=projects/*/locations/*/models/*}:setIamPolicy",
"/ui/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy",
"/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy")
"/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy",
"/ui/{resource=projects/*/locations/*/featureOnlineStores/*}:setIamPolicy",
"/ui/{resource=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:setIamPolicy")
.setQueryParamsExtractor(
request -> {
Map<String, List<String>> fields = new HashMap<>();
Expand Down Expand Up @@ -539,7 +539,9 @@ public class HttpJsonEndpointServiceStub extends EndpointServiceStub {
"/ui/{resource=projects/*/locations/*/models/*}:getIamPolicy",
"/ui/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy",
"/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy",
"/ui/{resource=projects/*/locations/*/publishers/*/models/*}:getIamPolicy")
"/ui/{resource=projects/*/locations/*/publishers/*/models/*}:getIamPolicy",
"/ui/{resource=projects/*/locations/*/featureOnlineStores/*}:getIamPolicy",
"/ui/{resource=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:getIamPolicy")
.setQueryParamsExtractor(
request -> {
Map<String, List<String>> fields = new HashMap<>();
Expand Down Expand Up @@ -581,7 +583,9 @@ public class HttpJsonEndpointServiceStub extends EndpointServiceStub {
"/ui/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:testIamPermissions",
"/ui/{resource=projects/*/locations/*/models/*}:testIamPermissions",
"/ui/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions",
"/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions")
"/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions",
"/ui/{resource=projects/*/locations/*/featureOnlineStores/*}:testIamPermissions",
"/ui/{resource=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:testIamPermissions")
.setQueryParamsExtractor(
request -> {
Map<String, List<String>> fields = new HashMap<>();
Expand Down Expand Up @@ -764,6 +768,11 @@ protected HttpJsonEndpointServiceStub(
.setPost(
"/ui/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}:cancel")
.build())
.addAdditionalBindings(
HttpRule.newBuilder()
.setPost(
"/ui/{name=projects/*/locations/*/tuningJobs/*/operations/*}:cancel")
.build())
.addAdditionalBindings(
HttpRule.newBuilder()
.setPost(
Expand Down Expand Up @@ -938,6 +947,11 @@ protected HttpJsonEndpointServiceStub(
.setPost(
"/v1/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}:cancel")
.build())
.addAdditionalBindings(
HttpRule.newBuilder()
.setPost(
"/v1/{name=projects/*/locations/*/tuningJobs/*/operations/*}:cancel")
.build())
.addAdditionalBindings(
HttpRule.newBuilder()
.setPost(
Expand Down Expand Up @@ -1526,6 +1540,11 @@ protected HttpJsonEndpointServiceStub(
.setGet(
"/ui/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}")
.build())
.addAdditionalBindings(
HttpRule.newBuilder()
.setGet(
"/ui/{name=projects/*/locations/*/tuningJobs/*/operations/*}")
.build())
.addAdditionalBindings(
HttpRule.newBuilder()
.setGet("/ui/{name=projects/*/locations/*/indexes/*/operations/*}")
Expand Down Expand Up @@ -1716,6 +1735,11 @@ protected HttpJsonEndpointServiceStub(
.setGet(
"/v1/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}")
.build())
.addAdditionalBindings(
HttpRule.newBuilder()
.setGet(
"/v1/{name=projects/*/locations/*/tuningJobs/*/operations/*}")
.build())
.addAdditionalBindings(
HttpRule.newBuilder()
.setGet("/v1/{name=projects/*/locations/*/indexes/*/operations/*}")
Expand Down Expand Up @@ -1914,6 +1938,10 @@ protected HttpJsonEndpointServiceStub(
.setGet(
"/ui/{name=projects/*/locations/*/hyperparameterTuningJobs/*}/operations")
.build())
.addAdditionalBindings(
HttpRule.newBuilder()
.setGet("/ui/{name=projects/*/locations/*/tuningJobs/*}/operations")
.build())
.addAdditionalBindings(
HttpRule.newBuilder()
.setGet("/ui/{name=projects/*/locations/*/indexes/*}/operations")
Expand Down Expand Up @@ -2101,6 +2129,10 @@ protected HttpJsonEndpointServiceStub(
.setGet(
"/v1/{name=projects/*/locations/*/hyperparameterTuningJobs/*}/operations")
.build())
.addAdditionalBindings(
HttpRule.newBuilder()
.setGet("/ui/{name=projects/*/locations/*/tuningJobs/*}/operations")
.build())
.addAdditionalBindings(
HttpRule.newBuilder()
.setGet("/v1/{name=projects/*/locations/*/indexes/*}/operations")
Expand Down Expand Up @@ -2302,6 +2334,11 @@ protected HttpJsonEndpointServiceStub(
.setPost(
"/ui/{name=projects/*/locations/*/hyperparameterTuningJobs/*/operations/*}:wait")
.build())
.addAdditionalBindings(
HttpRule.newBuilder()
.setPost(
"/ui/{name=projects/*/locations/*/tuningJobs/*/operations/*}:wait")
.build())
.addAdditionalBindings(
HttpRule.newBuilder()
.setPost(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package com.google.cloud.vertexai.api.stub;

import com.google.api.core.BetaApi;
import com.google.api.gax.httpjson.HttpJsonCallSettings;
import com.google.api.gax.httpjson.HttpJsonCallableFactory;
import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable;
Expand All @@ -41,7 +40,6 @@
* <p>This class is for advanced usage.
*/
@Generated("by gapic-generator-java")
@BetaApi
public class HttpJsonLlmUtilityServiceCallableFactory
implements HttpJsonStubCallableFactory<Operation, OperationsStub> {

Expand Down Expand Up @@ -73,8 +71,6 @@ public <RequestT, ResponseT> UnaryCallable<RequestT, ResponseT> createBatchingCa
httpJsonCallSettings, callSettings, clientContext);
}

@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
@Override
public <RequestT, ResponseT, MetadataT>
OperationCallable<RequestT, ResponseT, MetadataT> createOperationCallable(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import static com.google.cloud.vertexai.api.LlmUtilityServiceClient.ListLocationsPagedResponse;

import com.google.api.core.BetaApi;
import com.google.api.core.InternalApi;
import com.google.api.gax.core.BackgroundResource;
import com.google.api.gax.core.BackgroundResourceAggregation;
Expand Down Expand Up @@ -60,7 +59,6 @@
* <p>This class is for advanced usage and reflects the underlying API directly.
*/
@Generated("by gapic-generator-java")
@BetaApi
public class HttpJsonLlmUtilityServiceStub extends LlmUtilityServiceStub {
private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build();

Expand Down Expand Up @@ -234,7 +232,9 @@ public class HttpJsonLlmUtilityServiceStub extends LlmUtilityServiceStub {
"/ui/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:setIamPolicy",
"/ui/{resource=projects/*/locations/*/models/*}:setIamPolicy",
"/ui/{resource=projects/*/locations/*/endpoints/*}:setIamPolicy",
"/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy")
"/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:setIamPolicy",
"/ui/{resource=projects/*/locations/*/featureOnlineStores/*}:setIamPolicy",
"/ui/{resource=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:setIamPolicy")
.setQueryParamsExtractor(
request -> {
Map<String, List<String>> fields = new HashMap<>();
Expand Down Expand Up @@ -280,7 +280,9 @@ public class HttpJsonLlmUtilityServiceStub extends LlmUtilityServiceStub {
"/ui/{resource=projects/*/locations/*/models/*}:getIamPolicy",
"/ui/{resource=projects/*/locations/*/endpoints/*}:getIamPolicy",
"/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:getIamPolicy",
"/ui/{resource=projects/*/locations/*/publishers/*/models/*}:getIamPolicy")
"/ui/{resource=projects/*/locations/*/publishers/*/models/*}:getIamPolicy",
"/ui/{resource=projects/*/locations/*/featureOnlineStores/*}:getIamPolicy",
"/ui/{resource=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:getIamPolicy")
.setQueryParamsExtractor(
request -> {
Map<String, List<String>> fields = new HashMap<>();
Expand Down Expand Up @@ -322,7 +324,9 @@ public class HttpJsonLlmUtilityServiceStub extends LlmUtilityServiceStub {
"/ui/{resource=projects/*/locations/*/featurestores/*/entityTypes/*}:testIamPermissions",
"/ui/{resource=projects/*/locations/*/models/*}:testIamPermissions",
"/ui/{resource=projects/*/locations/*/endpoints/*}:testIamPermissions",
"/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions")
"/ui/{resource=projects/*/locations/*/notebookRuntimeTemplates/*}:testIamPermissions",
"/ui/{resource=projects/*/locations/*/featureOnlineStores/*}:testIamPermissions",
"/ui/{resource=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:testIamPermissions")
.setQueryParamsExtractor(
request -> {
Map<String, List<String>> fields = new HashMap<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package com.google.cloud.vertexai.api.stub;

import com.google.api.core.BetaApi;
import com.google.api.gax.httpjson.HttpJsonCallSettings;
import com.google.api.gax.httpjson.HttpJsonCallableFactory;
import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable;
Expand All @@ -41,7 +40,6 @@
* <p>This class is for advanced usage.
*/
@Generated("by gapic-generator-java")
@BetaApi
public class HttpJsonPredictionServiceCallableFactory
implements HttpJsonStubCallableFactory<Operation, OperationsStub> {

Expand Down Expand Up @@ -73,8 +71,6 @@ public <RequestT, ResponseT> UnaryCallable<RequestT, ResponseT> createBatchingCa
httpJsonCallSettings, callSettings, clientContext);
}

@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
@Override
public <RequestT, ResponseT, MetadataT>
OperationCallable<RequestT, ResponseT, MetadataT> createOperationCallable(
Expand Down
Loading

0 comments on commit bedcddf

Please sign in to comment.