Note: The VertexAI instance will start a service client when the first API call is - * made. Please close the VertexAI instance after making any API calls so that clients get closed as - * well. - * - *
{@code
- * try (VertexAI vertexAi = new VertexAI("my-project", "us-central1"); ) {
- * GenerativeModel model = new GenerativeModel("gemini-pro", vertexAi)
- * // Do something with the model.
- * }
- * }
- */
-public class VertexAI implements AutoCloseable {
-
- private final String projectId;
- private final String location;
- private final String apiEndpoint;
- private final Transport transport;
- private final HeaderProvider headerProvider;
- private final CredentialsProvider credentialsProvider;
-
- private final transient SupplierNote: SDK infers location from runtime environment first. If there is no location - * inferred from runtime environment, SDK will default location to `us-central1`. - * - *
SDK will infer projectId from runtime environment and GoogleCredentials.
- *
- * @throws java.lang.IllegalArgumentException If there is not projectId inferred from either
- * runtime environment or GoogleCredentials
- */
- public VertexAI() {
- this(
- null,
- null,
- Transport.GRPC,
- ImmutableList.of(),
- /* customHeaders= */ ImmutableMap.of(),
- /* credentials= */ Optional.empty(),
- /* apiEndpoint= */ Optional.empty(),
- /* predictionClientSupplierOpt= */ Optional.empty(),
- /* llmClientSupplierOpt= */ Optional.empty());
- }
-
- private VertexAI(
- String projectId,
- String location,
- Transport transport,
- List This class provides the ability to make remote calls to the backing service through method
- * calls that map to API methods. Sample code to get started:
- *
- * Note: close() needs to be called on the EndpointServiceClient object to clean up resources
- * such as threads. In the example above, try-with-resources is used, which automatically calls
- * close().
- *
- * 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()
- * UpdateEndpointLongRunning Updates an Endpoint with a long running operation. Request object method variants only take one parameter, a request object, which must be constructed before the call. updateEndpointLongRunningAsync(UpdateEndpointLongRunningRequest request)
- * Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. updateEndpointLongRunningAsync(Endpoint endpoint)
- * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. updateEndpointLongRunningOperationCallable()
- * updateEndpointLongRunningCallable()
- * 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`, `required_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.
- *
- * Many parameters require resource names to be formatted in a particular way. To assist with
- * these names, this class includes a format method for each type of name, and additionally a parse
- * method to extract the individual identifiers contained within names that are returned.
- *
- * This class can be customized by passing in a custom instance of EndpointServiceSettings to
- * create(). For example:
- *
- * To customize credentials:
- *
- * To customize the endpoint:
- *
- * To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over
- * the wire:
- *
- * Please refer to the GitHub repository's samples for more quickstart code snippets.
- */
-@Generated("by gapic-generator-java")
-public class EndpointServiceClient implements BackgroundResource {
- private final EndpointServiceSettings settings;
- private final EndpointServiceStub stub;
- private final OperationsClient httpJsonOperationsClient;
- private final com.google.longrunning.OperationsClient operationsClient;
-
- /** Constructs an instance of EndpointServiceClient with default settings. */
- public static final EndpointServiceClient create() throws IOException {
- return create(EndpointServiceSettings.newBuilder().build());
- }
-
- /**
- * Constructs an instance of EndpointServiceClient, using the given settings. The channels are
- * created based on the settings passed in, or defaults for any settings that are not set.
- */
- public static final EndpointServiceClient create(EndpointServiceSettings settings)
- throws IOException {
- return new EndpointServiceClient(settings);
- }
-
- /**
- * Constructs an instance of EndpointServiceClient, using the given stub for making calls. This is
- * for advanced usage - prefer using create(EndpointServiceSettings).
- */
- public static final EndpointServiceClient create(EndpointServiceStub stub) {
- return new EndpointServiceClient(stub);
- }
-
- /**
- * Constructs an instance of EndpointServiceClient, using the given settings. This is protected so
- * that it is easy to make a subclass, but otherwise, the static factory methods should be
- * preferred.
- */
- protected EndpointServiceClient(EndpointServiceSettings settings) throws IOException {
- this.settings = settings;
- this.stub = ((EndpointServiceStubSettings) settings.getStubSettings()).createStub();
- this.operationsClient =
- com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
- this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
- }
-
- protected EndpointServiceClient(EndpointServiceStub stub) {
- this.settings = null;
- this.stub = stub;
- this.operationsClient =
- com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
- this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
- }
-
- public final EndpointServiceSettings getSettings() {
- return settings;
- }
-
- public EndpointServiceStub getStub() {
- return stub;
- }
-
- /**
- * Returns the OperationsClient that can be used to query the status of a long-running operation
- * returned by another API method call.
- */
- public final com.google.longrunning.OperationsClient getOperationsClient() {
- return operationsClient;
- }
-
- /**
- * Returns the OperationsClient that can be used to query the status of a long-running operation
- * returned by another API method call.
- */
- @BetaApi
- public final OperationsClient getHttpJsonOperationsClient() {
- return httpJsonOperationsClient;
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Creates an Endpoint.
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * If the first character is a letter, this value may be up to 63 characters, and valid
- * characters are `[a-z0-9-]`. The last character must be a letter or number.
- * If the first character is a number, this value may be up to 9 characters, and valid
- * characters are `[0-9]` with no leading zeros.
- * When using HTTP/JSON, this field is populated based on a query string argument, such as
- * `?endpoint_id=12345`. This is the fallback for fields that are not included in either the
- * URI or the body.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture Sample code:
- *
- * If the first character is a letter, this value may be up to 63 characters, and valid
- * characters are `[a-z0-9-]`. The last character must be a letter or number.
- * If the first character is a number, this value may be up to 9 characters, and valid
- * characters are `[0-9]` with no leading zeros.
- * When using HTTP/JSON, this field is populated based on a query string argument, such as
- * `?endpoint_id=12345`. This is the fallback for fields that are not included in either the
- * URI or the body.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * If this field is non-empty, then the Endpoint's
- * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with
- * it. To refer to the ID of the just being deployed Model, a "0" should be used, and the
- * actual ID of the new DeployedModel will be filled in its place by this method. The traffic
- * percentage values must add up to 100.
- * If this field is empty, then the Endpoint's
- * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] is not updated.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture Sample code:
- *
- * If this field is non-empty, then the Endpoint's
- * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with
- * it. To refer to the ID of the just being deployed Model, a "0" should be used, and the
- * actual ID of the new DeployedModel will be filled in its place by this method. The traffic
- * percentage values must add up to 100.
- * If this field is empty, then the Endpoint's
- * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] is not updated.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.
- *
- * Sample code:
- *
- * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Note: This operation is designed to be used for buildingpermission-aware UIs and
- * command-line tools, not for authorizationchecking. This operation may "fail open" without
- * warning.
- *
- * Sample code:
- *
- * Note: This operation is designed to be used for buildingpermission-aware UIs and
- * command-line tools, not for authorizationchecking. This operation may "fail open" without
- * warning.
- *
- * Sample code:
- *
- * The default instance has everything set to sensible defaults:
- *
- * The builder of this class is recursive, so contained classes are themselves builders. When
- * build() is called, the tree of builders is called to create the complete settings object.
- *
- * For example, to set the
- * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings)
- * of getEndpoint:
- *
- * To configure the RetrySettings of a Long Running Operation method, create an
- * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to
- * configure the RetrySettings for createEndpoint:
- *
- * Note: This method does not support applying settings to streaming methods.
- */
- public Builder applyToAllUnaryMethods(
- ApiFunction This class provides the ability to make remote calls to the backing service through method
- * calls that map to API methods. Sample code to get started:
- *
- * Note: close() needs to be called on the LlmUtilityServiceClient object to clean up resources
- * such as threads. In the example above, try-with-resources is used, which automatically calls
- * close().
- *
- * 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.
- *
- * Many parameters require resource names to be formatted in a particular way. To assist with
- * these names, this class includes a format method for each type of name, and additionally a parse
- * method to extract the individual identifiers contained within names that are returned.
- *
- * This class can be customized by passing in a custom instance of LlmUtilityServiceSettings to
- * create(). For example:
- *
- * To customize credentials:
- *
- * To customize the endpoint:
- *
- * To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over
- * the wire:
- *
- * Please refer to the GitHub repository's samples for more quickstart code snippets.
- */
-@Generated("by gapic-generator-java")
-public class LlmUtilityServiceClient implements BackgroundResource {
- private final LlmUtilityServiceSettings settings;
- private final LlmUtilityServiceStub stub;
-
- /** Constructs an instance of LlmUtilityServiceClient with default settings. */
- public static final LlmUtilityServiceClient create() throws IOException {
- return create(LlmUtilityServiceSettings.newBuilder().build());
- }
-
- /**
- * Constructs an instance of LlmUtilityServiceClient, using the given settings. The channels are
- * created based on the settings passed in, or defaults for any settings that are not set.
- */
- public static final LlmUtilityServiceClient create(LlmUtilityServiceSettings settings)
- throws IOException {
- return new LlmUtilityServiceClient(settings);
- }
-
- /**
- * Constructs an instance of LlmUtilityServiceClient, using the given stub for making calls. This
- * is for advanced usage - prefer using create(LlmUtilityServiceSettings).
- */
- public static final LlmUtilityServiceClient create(LlmUtilityServiceStub stub) {
- return new LlmUtilityServiceClient(stub);
- }
-
- /**
- * Constructs an instance of LlmUtilityServiceClient, using the given settings. This is protected
- * so that it is easy to make a subclass, but otherwise, the static factory methods should be
- * preferred.
- */
- protected LlmUtilityServiceClient(LlmUtilityServiceSettings settings) throws IOException {
- this.settings = settings;
- this.stub = ((LlmUtilityServiceStubSettings) settings.getStubSettings()).createStub();
- }
-
- protected LlmUtilityServiceClient(LlmUtilityServiceStub stub) {
- this.settings = null;
- this.stub = stub;
- }
-
- public final LlmUtilityServiceSettings getSettings() {
- return settings;
- }
-
- public LlmUtilityServiceStub getStub() {
- return stub;
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Perform a token counting.
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.
- *
- * Sample code:
- *
- * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Note: This operation is designed to be used for buildingpermission-aware UIs and
- * command-line tools, not for authorizationchecking. This operation may "fail open" without
- * warning.
- *
- * Sample code:
- *
- * Note: This operation is designed to be used for buildingpermission-aware UIs and
- * command-line tools, not for authorizationchecking. This operation may "fail open" without
- * warning.
- *
- * Sample code:
- *
- * The default instance has everything set to sensible defaults:
- *
- * The builder of this class is recursive, so contained classes are themselves builders. When
- * build() is called, the tree of builders is called to create the complete settings object.
- *
- * For example, to set the
- * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings)
- * of countTokens:
- *
- * Note: This method does not support applying settings to streaming methods.
- */
- public Builder applyToAllUnaryMethods(
- ApiFunction This class provides the ability to make remote calls to the backing service through method
- * calls that map to API methods. Sample code to get started:
- *
- * Note: close() needs to be called on the PredictionServiceClient object to clean up resources
- * such as threads. In the example above, try-with-resources is used, which automatically calls
- * close().
- *
- * 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:
- * 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()
- * EmbedContent Embed content with multimodal inputs. Request object method variants only take one parameter, a request object, which must be constructed before the call. embedContent(EmbedContentRequest request)
- * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. embedContent(EndpointName model, Content content)
- * embedContent(String model, Content content)
- * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. embedContentCallable()
- * ListLocations Lists information about the supported locations for this service. Request object method variants only take one parameter, a request object, which must be constructed before the call. listLocations(ListLocationsRequest request)
- * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. listLocationsPagedCallable()
- * listLocationsCallable()
- * GetLocation Gets information about a location. Request object method variants only take one parameter, a request object, which must be constructed before the call. getLocation(GetLocationRequest request)
- * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getLocationCallable()
- * SetIamPolicy Sets the access control policy on the specified resource. Replacesany existing policy.
- * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. Request object method variants only take one parameter, a request object, which must be constructed before the call. setIamPolicy(SetIamPolicyRequest request)
- * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. setIamPolicyCallable()
- * GetIamPolicy Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set. Request object method variants only take one parameter, a request object, which must be constructed before the call. getIamPolicy(GetIamPolicyRequest request)
- * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getIamPolicyCallable()
- * TestIamPermissions Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error.
- * Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning. Request object method variants only take one parameter, a request object, which must be constructed before the call. testIamPermissions(TestIamPermissionsRequest request)
- * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. testIamPermissionsCallable()
- * See the individual methods for example code.
- *
- * Many parameters require resource names to be formatted in a particular way. To assist with
- * these names, this class includes a format method for each type of name, and additionally a parse
- * method to extract the individual identifiers contained within names that are returned.
- *
- * This class can be customized by passing in a custom instance of PredictionServiceSettings to
- * create(). For example:
- *
- * To customize credentials:
- *
- * To customize the endpoint:
- *
- * To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over
- * the wire:
- *
- * Please refer to the GitHub repository's samples for more quickstart code snippets.
- */
-@Generated("by gapic-generator-java")
-public class PredictionServiceClient implements BackgroundResource {
- private final PredictionServiceSettings settings;
- private final PredictionServiceStub stub;
-
- /** Constructs an instance of PredictionServiceClient with default settings. */
- public static final PredictionServiceClient create() throws IOException {
- return create(PredictionServiceSettings.newBuilder().build());
- }
-
- /**
- * Constructs an instance of PredictionServiceClient, using the given settings. The channels are
- * created based on the settings passed in, or defaults for any settings that are not set.
- */
- public static final PredictionServiceClient create(PredictionServiceSettings settings)
- throws IOException {
- return new PredictionServiceClient(settings);
- }
-
- /**
- * Constructs an instance of PredictionServiceClient, using the given stub for making calls. This
- * is for advanced usage - prefer using create(PredictionServiceSettings).
- */
- public static final PredictionServiceClient create(PredictionServiceStub stub) {
- return new PredictionServiceClient(stub);
- }
-
- /**
- * Constructs an instance of PredictionServiceClient, using the given settings. This is protected
- * so that it is easy to make a subclass, but otherwise, the static factory methods should be
- * preferred.
- */
- protected PredictionServiceClient(PredictionServiceSettings settings) throws IOException {
- this.settings = settings;
- this.stub = ((PredictionServiceStubSettings) settings.getStubSettings()).createStub();
- }
-
- protected PredictionServiceClient(PredictionServiceStub stub) {
- this.settings = null;
- this.stub = stub;
- }
-
- public final PredictionServiceSettings getSettings() {
- return settings;
- }
-
- public PredictionServiceStub getStub() {
- return stub;
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Perform an online prediction.
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * The response includes the following HTTP headers:
- *
- * Sample code:
- *
- * A [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] may have an upper limit on
- * the number of instances it supports per request. When this limit it is exceeded for an
- * AutoML model, the [RawPredict][google.cloud.aiplatform.v1.PredictionService.RawPredict]
- * method returns an error. When this limit is exceeded for a custom-trained model, the
- * behavior varies depending on the model.
- * You can specify the schema for each instance in the
- * [predict_schemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
- * field when you create a [Model][google.cloud.aiplatform.v1.Model]. This schema applies when
- * you deploy the `Model` as a `DeployedModel` to an
- * [Endpoint][google.cloud.aiplatform.v1.Endpoint] and use the `RawPredict` method.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final HttpBody rawPredict(EndpointName endpoint, HttpBody httpBody) {
- RawPredictRequest request =
- RawPredictRequest.newBuilder()
- .setEndpoint(endpoint == null ? null : endpoint.toString())
- .setHttpBody(httpBody)
- .build();
- return rawPredict(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Perform an online prediction with an arbitrary HTTP payload.
- *
- * The response includes the following HTTP headers:
- *
- * Sample code:
- *
- * A [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] may have an upper limit on
- * the number of instances it supports per request. When this limit it is exceeded for an
- * AutoML model, the [RawPredict][google.cloud.aiplatform.v1.PredictionService.RawPredict]
- * method returns an error. When this limit is exceeded for a custom-trained model, the
- * behavior varies depending on the model.
- * You can specify the schema for each instance in the
- * [predict_schemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]
- * field when you create a [Model][google.cloud.aiplatform.v1.Model]. This schema applies when
- * you deploy the `Model` as a `DeployedModel` to an
- * [Endpoint][google.cloud.aiplatform.v1.Endpoint] and use the `RawPredict` method.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final HttpBody rawPredict(String endpoint, HttpBody httpBody) {
- RawPredictRequest request =
- RawPredictRequest.newBuilder().setEndpoint(endpoint).setHttpBody(httpBody).build();
- return rawPredict(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Perform an online prediction with an arbitrary HTTP payload.
- *
- * The response includes the following HTTP headers:
- *
- * Sample code:
- *
- * The response includes the following HTTP headers:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * 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.
- *
- * Sample code:
- *
- * 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.
- *
- * Sample code:
- *
- * 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.
- *
- * Sample code:
- *
- * 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.
- *
- * Sample code:
- *
- * Sample code:
- *
- * Publisher model format:
- * `projects/{project}/locations/{location}/publishers/*/models/*`
- * Tuned model endpoint format:
- * `projects/{project}/locations/{location}/endpoints/{endpoint}`
- * @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 Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.
- *
- * Sample code:
- *
- * Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Note: This operation is designed to be used for buildingpermission-aware UIs and
- * command-line tools, not for authorizationchecking. This operation may "fail open" without
- * warning.
- *
- * Sample code:
- *
- * Note: This operation is designed to be used for buildingpermission-aware UIs and
- * command-line tools, not for authorizationchecking. This operation may "fail open" without
- * warning.
- *
- * Sample code:
- *
- * The default instance has everything set to sensible defaults:
- *
- * The builder of this class is recursive, so contained classes are themselves builders. When
- * build() is called, the tree of builders is called to create the complete settings object.
- *
- * For example, to set the
- * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings)
- * of predict:
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- * EndpointName name =
- * EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
- * Endpoint response = endpointServiceClient.getEndpoint(name);
- * }
- * }
- *
- *
- *
- *
- *
- *
- * Method
- * Description
- * Method Variants
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * EndpointServiceSettings endpointServiceSettings =
- * EndpointServiceSettings.newBuilder()
- * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- * .build();
- * EndpointServiceClient endpointServiceClient =
- * EndpointServiceClient.create(endpointServiceSettings);
- * }
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * EndpointServiceSettings endpointServiceSettings =
- * EndpointServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
- * EndpointServiceClient endpointServiceClient =
- * EndpointServiceClient.create(endpointServiceSettings);
- * }
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * EndpointServiceSettings endpointServiceSettings =
- * EndpointServiceSettings.newHttpJsonBuilder().build();
- * EndpointServiceClient endpointServiceClient =
- * EndpointServiceClient.create(endpointServiceSettings);
- * }
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- * Endpoint endpoint = Endpoint.newBuilder().build();
- * Endpoint response = endpointServiceClient.createEndpointAsync(parent, endpoint).get();
- * }
- * }
- *
- * @param parent Required. The resource name of the Location to create the Endpoint in. Format:
- * `projects/{project}/locations/{location}`
- * @param endpoint Required. The Endpoint to create.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
- * Endpoint endpoint = Endpoint.newBuilder().build();
- * Endpoint response = endpointServiceClient.createEndpointAsync(parent, endpoint).get();
- * }
- * }
- *
- * @param parent Required. The resource name of the Location to create the Endpoint in. Format:
- * `projects/{project}/locations/{location}`
- * @param endpoint Required. The Endpoint to create.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- * Endpoint endpoint = Endpoint.newBuilder().build();
- * String endpointId = "endpointId-1837754992";
- * Endpoint response =
- * endpointServiceClient.createEndpointAsync(parent, endpoint, endpointId).get();
- * }
- * }
- *
- * @param parent Required. The resource name of the Location to create the Endpoint in. Format:
- * `projects/{project}/locations/{location}`
- * @param endpoint Required. The Endpoint to create.
- * @param endpointId Immutable. The ID to use for endpoint, which will become the final component
- * of the endpoint resource name. If not provided, Vertex AI will generate a value for this
- * ID.
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
- * Endpoint endpoint = Endpoint.newBuilder().build();
- * String endpointId = "endpointId-1837754992";
- * Endpoint response =
- * endpointServiceClient.createEndpointAsync(parent, endpoint, endpointId).get();
- * }
- * }
- *
- * @param parent Required. The resource name of the Location to create the Endpoint in. Format:
- * `projects/{project}/locations/{location}`
- * @param endpoint Required. The Endpoint to create.
- * @param endpointId Immutable. The ID to use for endpoint, which will become the final component
- * of the endpoint resource name. If not provided, Vertex AI will generate a value for this
- * ID.
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- * CreateEndpointRequest request =
- * CreateEndpointRequest.newBuilder()
- * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
- * .setEndpoint(Endpoint.newBuilder().build())
- * .setEndpointId("endpointId-1837754992")
- * .build();
- * Endpoint response = endpointServiceClient.createEndpointAsync(request).get();
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- * CreateEndpointRequest request =
- * CreateEndpointRequest.newBuilder()
- * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
- * .setEndpoint(Endpoint.newBuilder().build())
- * .setEndpointId("endpointId-1837754992")
- * .build();
- * OperationFuture
- */
- public final OperationCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- * CreateEndpointRequest request =
- * CreateEndpointRequest.newBuilder()
- * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
- * .setEndpoint(Endpoint.newBuilder().build())
- * .setEndpointId("endpointId-1837754992")
- * .build();
- * ApiFuture
- */
- public final UnaryCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- * EndpointName name =
- * EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
- * Endpoint response = endpointServiceClient.getEndpoint(name);
- * }
- * }
- *
- * @param name Required. The name of the Endpoint resource. Format:
- * `projects/{project}/locations/{location}/endpoints/{endpoint}`
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final Endpoint getEndpoint(EndpointName name) {
- GetEndpointRequest request =
- GetEndpointRequest.newBuilder().setName(name == null ? null : name.toString()).build();
- return getEndpoint(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Gets an Endpoint.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- * String name =
- * EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString();
- * Endpoint response = endpointServiceClient.getEndpoint(name);
- * }
- * }
- *
- * @param name Required. The name of the Endpoint resource. Format:
- * `projects/{project}/locations/{location}/endpoints/{endpoint}`
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final Endpoint getEndpoint(String name) {
- GetEndpointRequest request = GetEndpointRequest.newBuilder().setName(name).build();
- return getEndpoint(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Gets an Endpoint.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- * GetEndpointRequest request =
- * GetEndpointRequest.newBuilder()
- * .setName(
- * EndpointName.ofProjectLocationEndpointName(
- * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString())
- * .build();
- * Endpoint response = endpointServiceClient.getEndpoint(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 Endpoint getEndpoint(GetEndpointRequest request) {
- return getEndpointCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Gets an Endpoint.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- * GetEndpointRequest request =
- * GetEndpointRequest.newBuilder()
- * .setName(
- * EndpointName.ofProjectLocationEndpointName(
- * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString())
- * .build();
- * ApiFuture
- */
- public final UnaryCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
- * for (Endpoint element : endpointServiceClient.listEndpoints(parent).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- * }
- *
- * @param parent Required. The resource name of the Location from which to list the Endpoints.
- * Format: `projects/{project}/locations/{location}`
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ListEndpointsPagedResponse listEndpoints(LocationName parent) {
- ListEndpointsRequest request =
- ListEndpointsRequest.newBuilder()
- .setParent(parent == null ? null : parent.toString())
- .build();
- return listEndpoints(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Lists Endpoints in a Location.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
- * for (Endpoint element : endpointServiceClient.listEndpoints(parent).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- * }
- *
- * @param parent Required. The resource name of the Location from which to list the Endpoints.
- * Format: `projects/{project}/locations/{location}`
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ListEndpointsPagedResponse listEndpoints(String parent) {
- ListEndpointsRequest request = ListEndpointsRequest.newBuilder().setParent(parent).build();
- return listEndpoints(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Lists Endpoints in a Location.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- * ListEndpointsRequest request =
- * ListEndpointsRequest.newBuilder()
- * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
- * .setFilter("filter-1274492040")
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .setReadMask(FieldMask.newBuilder().build())
- * .setOrderBy("orderBy-1207110587")
- * .build();
- * for (Endpoint element : endpointServiceClient.listEndpoints(request).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ListEndpointsPagedResponse listEndpoints(ListEndpointsRequest request) {
- return listEndpointsPagedCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Lists Endpoints in a Location.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- * ListEndpointsRequest request =
- * ListEndpointsRequest.newBuilder()
- * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
- * .setFilter("filter-1274492040")
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .setReadMask(FieldMask.newBuilder().build())
- * .setOrderBy("orderBy-1207110587")
- * .build();
- * ApiFuture
- */
- public final UnaryCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- * ListEndpointsRequest request =
- * ListEndpointsRequest.newBuilder()
- * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
- * .setFilter("filter-1274492040")
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .setReadMask(FieldMask.newBuilder().build())
- * .setOrderBy("orderBy-1207110587")
- * .build();
- * while (true) {
- * ListEndpointsResponse response =
- * endpointServiceClient.listEndpointsCallable().call(request);
- * for (Endpoint element : response.getEndpointsList()) {
- * // doThingsWith(element);
- * }
- * String nextPageToken = response.getNextPageToken();
- * if (!Strings.isNullOrEmpty(nextPageToken)) {
- * request = request.toBuilder().setPageToken(nextPageToken).build();
- * } else {
- * break;
- * }
- * }
- * }
- * }
- */
- public final UnaryCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- * Endpoint endpoint = Endpoint.newBuilder().build();
- * FieldMask updateMask = FieldMask.newBuilder().build();
- * Endpoint response = endpointServiceClient.updateEndpoint(endpoint, updateMask);
- * }
- * }
- *
- * @param endpoint Required. The Endpoint which replaces the resource on the server.
- * @param updateMask Required. The update mask applies to the resource. See
- * [google.protobuf.FieldMask][google.protobuf.FieldMask].
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final Endpoint updateEndpoint(Endpoint endpoint, FieldMask updateMask) {
- UpdateEndpointRequest request =
- UpdateEndpointRequest.newBuilder().setEndpoint(endpoint).setUpdateMask(updateMask).build();
- return updateEndpoint(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Updates an Endpoint.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- * UpdateEndpointRequest request =
- * UpdateEndpointRequest.newBuilder()
- * .setEndpoint(Endpoint.newBuilder().build())
- * .setUpdateMask(FieldMask.newBuilder().build())
- * .build();
- * Endpoint response = endpointServiceClient.updateEndpoint(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 Endpoint updateEndpoint(UpdateEndpointRequest request) {
- return updateEndpointCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Updates an Endpoint.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- * UpdateEndpointRequest request =
- * UpdateEndpointRequest.newBuilder()
- * .setEndpoint(Endpoint.newBuilder().build())
- * .setUpdateMask(FieldMask.newBuilder().build())
- * .build();
- * ApiFuture
- */
- public final UnaryCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- * Endpoint endpoint = Endpoint.newBuilder().build();
- * Endpoint response = endpointServiceClient.updateEndpointLongRunningAsync(endpoint).get();
- * }
- * }
- *
- * @param endpoint Required. The Endpoint which replaces the resource on the server. Currently we
- * only support updating the `client_connection_config` field, all the other fields' update
- * will be blocked.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- * UpdateEndpointLongRunningRequest request =
- * UpdateEndpointLongRunningRequest.newBuilder()
- * .setEndpoint(Endpoint.newBuilder().build())
- * .build();
- * Endpoint response = endpointServiceClient.updateEndpointLongRunningAsync(request).get();
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- * UpdateEndpointLongRunningRequest request =
- * UpdateEndpointLongRunningRequest.newBuilder()
- * .setEndpoint(Endpoint.newBuilder().build())
- * .build();
- * OperationFuture
- */
- public final OperationCallable<
- UpdateEndpointLongRunningRequest, Endpoint, UpdateEndpointOperationMetadata>
- updateEndpointLongRunningOperationCallable() {
- return stub.updateEndpointLongRunningOperationCallable();
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Updates an Endpoint with a long running operation.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- * UpdateEndpointLongRunningRequest request =
- * UpdateEndpointLongRunningRequest.newBuilder()
- * .setEndpoint(Endpoint.newBuilder().build())
- * .build();
- * ApiFuture
- */
- public final UnaryCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- * EndpointName name =
- * EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
- * endpointServiceClient.deleteEndpointAsync(name).get();
- * }
- * }
- *
- * @param name Required. The name of the Endpoint resource to be deleted. Format:
- * `projects/{project}/locations/{location}/endpoints/{endpoint}`
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- * String name =
- * EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString();
- * endpointServiceClient.deleteEndpointAsync(name).get();
- * }
- * }
- *
- * @param name Required. The name of the Endpoint resource to be deleted. Format:
- * `projects/{project}/locations/{location}/endpoints/{endpoint}`
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- * DeleteEndpointRequest request =
- * DeleteEndpointRequest.newBuilder()
- * .setName(
- * EndpointName.ofProjectLocationEndpointName(
- * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString())
- * .build();
- * endpointServiceClient.deleteEndpointAsync(request).get();
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- * DeleteEndpointRequest request =
- * DeleteEndpointRequest.newBuilder()
- * .setName(
- * EndpointName.ofProjectLocationEndpointName(
- * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString())
- * .build();
- * OperationFuture
- */
- public final OperationCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- * DeleteEndpointRequest request =
- * DeleteEndpointRequest.newBuilder()
- * .setName(
- * EndpointName.ofProjectLocationEndpointName(
- * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString())
- * .build();
- * ApiFuture
- */
- public final UnaryCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- * EndpointName endpoint =
- * EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
- * DeployedModel deployedModel = DeployedModel.newBuilder().build();
- * Map
- *
- * @param endpoint Required. The name of the Endpoint resource into which to deploy a Model.
- * Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`
- * @param deployedModel Required. The DeployedModel to be created within the Endpoint. Note that
- * [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] must be updated
- * for the DeployedModel to start receiving traffic, either as part of this call, or via
- * [EndpointService.UpdateEndpoint][google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint].
- * @param trafficSplit A map from a DeployedModel's ID to the percentage of this Endpoint's
- * traffic that should be forwarded to that DeployedModel.
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- * String endpoint =
- * EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString();
- * DeployedModel deployedModel = DeployedModel.newBuilder().build();
- * Map
- *
- * @param endpoint Required. The name of the Endpoint resource into which to deploy a Model.
- * Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`
- * @param deployedModel Required. The DeployedModel to be created within the Endpoint. Note that
- * [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] must be updated
- * for the DeployedModel to start receiving traffic, either as part of this call, or via
- * [EndpointService.UpdateEndpoint][google.cloud.aiplatform.v1.EndpointService.UpdateEndpoint].
- * @param trafficSplit A map from a DeployedModel's ID to the percentage of this Endpoint's
- * traffic that should be forwarded to that DeployedModel.
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- * DeployModelRequest request =
- * DeployModelRequest.newBuilder()
- * .setEndpoint(
- * EndpointName.ofProjectLocationEndpointName(
- * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString())
- * .setDeployedModel(DeployedModel.newBuilder().build())
- * .putAllTrafficSplit(new HashMap
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- * DeployModelRequest request =
- * DeployModelRequest.newBuilder()
- * .setEndpoint(
- * EndpointName.ofProjectLocationEndpointName(
- * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString())
- * .setDeployedModel(DeployedModel.newBuilder().build())
- * .putAllTrafficSplit(new HashMap
- */
- public final OperationCallable<
- DeployModelRequest, DeployModelResponse, DeployModelOperationMetadata>
- deployModelOperationCallable() {
- return stub.deployModelOperationCallable();
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Deploys a Model into this Endpoint, creating a DeployedModel within it.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- * DeployModelRequest request =
- * DeployModelRequest.newBuilder()
- * .setEndpoint(
- * EndpointName.ofProjectLocationEndpointName(
- * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString())
- * .setDeployedModel(DeployedModel.newBuilder().build())
- * .putAllTrafficSplit(new HashMap
- */
- public final UnaryCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- * EndpointName endpoint =
- * EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
- * String deployedModelId = "deployedModelId-1817547906";
- * Map
- *
- * @param endpoint Required. The name of the Endpoint resource from which to undeploy a Model.
- * Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`
- * @param deployedModelId Required. The ID of the DeployedModel to be undeployed from the
- * Endpoint.
- * @param trafficSplit If this field is provided, then the Endpoint's
- * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with
- * it. If last DeployedModel is being undeployed from the Endpoint, the
- * [Endpoint.traffic_split] will always end up empty when this call returns. A DeployedModel
- * will be successfully undeployed only if it doesn't have any traffic assigned to it when
- * this method executes, or if this field unassigns any traffic to it.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- * String endpoint =
- * EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString();
- * String deployedModelId = "deployedModelId-1817547906";
- * Map
- *
- * @param endpoint Required. The name of the Endpoint resource from which to undeploy a Model.
- * Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`
- * @param deployedModelId Required. The ID of the DeployedModel to be undeployed from the
- * Endpoint.
- * @param trafficSplit If this field is provided, then the Endpoint's
- * [traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split] will be overwritten with
- * it. If last DeployedModel is being undeployed from the Endpoint, the
- * [Endpoint.traffic_split] will always end up empty when this call returns. A DeployedModel
- * will be successfully undeployed only if it doesn't have any traffic assigned to it when
- * this method executes, or if this field unassigns any traffic to it.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- * UndeployModelRequest request =
- * UndeployModelRequest.newBuilder()
- * .setEndpoint(
- * EndpointName.ofProjectLocationEndpointName(
- * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString())
- * .setDeployedModelId("deployedModelId-1817547906")
- * .putAllTrafficSplit(new HashMap
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- * UndeployModelRequest request =
- * UndeployModelRequest.newBuilder()
- * .setEndpoint(
- * EndpointName.ofProjectLocationEndpointName(
- * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString())
- * .setDeployedModelId("deployedModelId-1817547906")
- * .putAllTrafficSplit(new HashMap
- */
- public final OperationCallable<
- UndeployModelRequest, UndeployModelResponse, UndeployModelOperationMetadata>
- undeployModelOperationCallable() {
- return stub.undeployModelOperationCallable();
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Undeploys a Model from an Endpoint, removing a DeployedModel from it, and freeing all resources
- * it's using.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- * UndeployModelRequest request =
- * UndeployModelRequest.newBuilder()
- * .setEndpoint(
- * EndpointName.ofProjectLocationEndpointName(
- * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString())
- * .setDeployedModelId("deployedModelId-1817547906")
- * .putAllTrafficSplit(new HashMap
- */
- public final UnaryCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- * EndpointName endpoint =
- * EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
- * DeployedModel deployedModel = DeployedModel.newBuilder().build();
- * FieldMask updateMask = FieldMask.newBuilder().build();
- * MutateDeployedModelResponse response =
- * endpointServiceClient.mutateDeployedModelAsync(endpoint, deployedModel, updateMask).get();
- * }
- * }
- *
- * @param endpoint Required. The name of the Endpoint resource into which to mutate a
- * DeployedModel. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`
- * @param deployedModel Required. The DeployedModel to be mutated within the Endpoint. Only the
- * following fields can be mutated:
- *
- *
- *
- * @param updateMask Required. The update mask applies to the resource. See
- * [google.protobuf.FieldMask][google.protobuf.FieldMask].
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- * String endpoint =
- * EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString();
- * DeployedModel deployedModel = DeployedModel.newBuilder().build();
- * FieldMask updateMask = FieldMask.newBuilder().build();
- * MutateDeployedModelResponse response =
- * endpointServiceClient.mutateDeployedModelAsync(endpoint, deployedModel, updateMask).get();
- * }
- * }
- *
- * @param endpoint Required. The name of the Endpoint resource into which to mutate a
- * DeployedModel. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`
- * @param deployedModel Required. The DeployedModel to be mutated within the Endpoint. Only the
- * following fields can be mutated:
- *
- *
- *
- * @param updateMask Required. The update mask applies to the resource. See
- * [google.protobuf.FieldMask][google.protobuf.FieldMask].
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- * MutateDeployedModelRequest request =
- * MutateDeployedModelRequest.newBuilder()
- * .setEndpoint(
- * EndpointName.ofProjectLocationEndpointName(
- * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString())
- * .setDeployedModel(DeployedModel.newBuilder().build())
- * .setUpdateMask(FieldMask.newBuilder().build())
- * .build();
- * MutateDeployedModelResponse response =
- * endpointServiceClient.mutateDeployedModelAsync(request).get();
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final OperationFuture{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- * MutateDeployedModelRequest request =
- * MutateDeployedModelRequest.newBuilder()
- * .setEndpoint(
- * EndpointName.ofProjectLocationEndpointName(
- * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString())
- * .setDeployedModel(DeployedModel.newBuilder().build())
- * .setUpdateMask(FieldMask.newBuilder().build())
- * .build();
- * OperationFuture
- */
- public final OperationCallable<
- MutateDeployedModelRequest,
- MutateDeployedModelResponse,
- MutateDeployedModelOperationMetadata>
- mutateDeployedModelOperationCallable() {
- return stub.mutateDeployedModelOperationCallable();
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Updates an existing deployed model. Updatable fields include `min_replica_count`,
- * `max_replica_count`, `required_replica_count`, `autoscaling_metric_specs`,
- * `disable_container_logging` (v1 only), and `enable_container_logging` (v1beta1 only).
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- * MutateDeployedModelRequest request =
- * MutateDeployedModelRequest.newBuilder()
- * .setEndpoint(
- * EndpointName.ofProjectLocationEndpointName(
- * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString())
- * .setDeployedModel(DeployedModel.newBuilder().build())
- * .setUpdateMask(FieldMask.newBuilder().build())
- * .build();
- * ApiFuture
- */
- public final UnaryCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- * ListLocationsRequest request =
- * ListLocationsRequest.newBuilder()
- * .setName("name3373707")
- * .setFilter("filter-1274492040")
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .build();
- * for (Location element : endpointServiceClient.listLocations(request).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) {
- return listLocationsPagedCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Lists information about the supported locations for this service.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- * ListLocationsRequest request =
- * ListLocationsRequest.newBuilder()
- * .setName("name3373707")
- * .setFilter("filter-1274492040")
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .build();
- * ApiFuture
- */
- public final UnaryCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- * ListLocationsRequest request =
- * ListLocationsRequest.newBuilder()
- * .setName("name3373707")
- * .setFilter("filter-1274492040")
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .build();
- * while (true) {
- * ListLocationsResponse response =
- * endpointServiceClient.listLocationsCallable().call(request);
- * for (Location element : response.getLocationsList()) {
- * // doThingsWith(element);
- * }
- * String nextPageToken = response.getNextPageToken();
- * if (!Strings.isNullOrEmpty(nextPageToken)) {
- * request = request.toBuilder().setPageToken(nextPageToken).build();
- * } else {
- * break;
- * }
- * }
- * }
- * }
- */
- public final UnaryCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
- * Location response = endpointServiceClient.getLocation(request);
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final Location getLocation(GetLocationRequest request) {
- return getLocationCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Gets information about a location.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
- * ApiFuture
- */
- public final UnaryCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- * SetIamPolicyRequest request =
- * SetIamPolicyRequest.newBuilder()
- * .setResource(
- * EndpointName.ofProjectLocationEndpointName(
- * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString())
- * .setPolicy(Policy.newBuilder().build())
- * .setUpdateMask(FieldMask.newBuilder().build())
- * .build();
- * Policy response = endpointServiceClient.setIamPolicy(request);
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final Policy setIamPolicy(SetIamPolicyRequest request) {
- return setIamPolicyCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Sets the access control policy on the specified resource. Replacesany existing policy.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- * SetIamPolicyRequest request =
- * SetIamPolicyRequest.newBuilder()
- * .setResource(
- * EndpointName.ofProjectLocationEndpointName(
- * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString())
- * .setPolicy(Policy.newBuilder().build())
- * .setUpdateMask(FieldMask.newBuilder().build())
- * .build();
- * ApiFuture
- */
- public final UnaryCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- * GetIamPolicyRequest request =
- * GetIamPolicyRequest.newBuilder()
- * .setResource(
- * EndpointName.ofProjectLocationEndpointName(
- * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString())
- * .setOptions(GetPolicyOptions.newBuilder().build())
- * .build();
- * Policy response = endpointServiceClient.getIamPolicy(request);
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final Policy getIamPolicy(GetIamPolicyRequest request) {
- return getIamPolicyCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Gets the access control policy for a resource. Returns an empty policyif the resource exists
- * and does not have a policy set.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- * GetIamPolicyRequest request =
- * GetIamPolicyRequest.newBuilder()
- * .setResource(
- * EndpointName.ofProjectLocationEndpointName(
- * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString())
- * .setOptions(GetPolicyOptions.newBuilder().build())
- * .build();
- * ApiFuture
- */
- public final UnaryCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- * TestIamPermissionsRequest request =
- * TestIamPermissionsRequest.newBuilder()
- * .setResource(
- * EndpointName.ofProjectLocationEndpointName(
- * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString())
- * .addAllPermissions(new ArrayList
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) {
- return testIamPermissionsCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Returns permissions that a caller has on the specified resource. If theresource does not exist,
- * this will return an empty set ofpermissions, not a `NOT_FOUND` error.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (EndpointServiceClient endpointServiceClient = EndpointServiceClient.create()) {
- * TestIamPermissionsRequest request =
- * TestIamPermissionsRequest.newBuilder()
- * .setResource(
- * EndpointName.ofProjectLocationEndpointName(
- * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString())
- * .addAllPermissions(new ArrayList
- */
- public final UnaryCallable
- *
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * EndpointServiceSettings.Builder endpointServiceSettingsBuilder =
- * EndpointServiceSettings.newBuilder();
- * endpointServiceSettingsBuilder
- * .getEndpointSettings()
- * .setRetrySettings(
- * endpointServiceSettingsBuilder
- * .getEndpointSettings()
- * .getRetrySettings()
- * .toBuilder()
- * .setInitialRetryDelayDuration(Duration.ofSeconds(1))
- * .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
- * .setMaxAttempts(5)
- * .setMaxRetryDelayDuration(Duration.ofSeconds(30))
- * .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
- * .setRetryDelayMultiplier(1.3)
- * .setRpcTimeoutMultiplier(1.5)
- * .setTotalTimeoutDuration(Duration.ofSeconds(300))
- * .build());
- * EndpointServiceSettings endpointServiceSettings = endpointServiceSettingsBuilder.build();
- * }
- *
- * Please refer to the [Client Side Retry
- * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting
- * retries.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * EndpointServiceSettings.Builder endpointServiceSettingsBuilder =
- * EndpointServiceSettings.newBuilder();
- * TimedRetryAlgorithm timedRetryAlgorithm =
- * OperationalTimedPollAlgorithm.create(
- * RetrySettings.newBuilder()
- * .setInitialRetryDelayDuration(Duration.ofMillis(500))
- * .setRetryDelayMultiplier(1.5)
- * .setMaxRetryDelayDuration(Duration.ofMillis(5000))
- * .setTotalTimeoutDuration(Duration.ofHours(24))
- * .build());
- * endpointServiceSettingsBuilder
- * .createClusterOperationSettings()
- * .setPollingAlgorithm(timedRetryAlgorithm)
- * .build();
- * }
- */
-@Generated("by gapic-generator-java")
-public class EndpointServiceSettings extends ClientSettings{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
- * EndpointName endpoint =
- * EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
- * List
- *
- *
- *
- *
- *
- *
- * Method
- * Description
- * Method Variants
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * LlmUtilityServiceSettings llmUtilityServiceSettings =
- * LlmUtilityServiceSettings.newBuilder()
- * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- * .build();
- * LlmUtilityServiceClient llmUtilityServiceClient =
- * LlmUtilityServiceClient.create(llmUtilityServiceSettings);
- * }
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * LlmUtilityServiceSettings llmUtilityServiceSettings =
- * LlmUtilityServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
- * LlmUtilityServiceClient llmUtilityServiceClient =
- * LlmUtilityServiceClient.create(llmUtilityServiceSettings);
- * }
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * LlmUtilityServiceSettings llmUtilityServiceSettings =
- * LlmUtilityServiceSettings.newHttpJsonBuilder().build();
- * LlmUtilityServiceClient llmUtilityServiceClient =
- * LlmUtilityServiceClient.create(llmUtilityServiceSettings);
- * }
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
- * EndpointName endpoint =
- * EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
- * List
- *
- * @param endpoint Required. The name of the Endpoint requested to perform token counting. Format:
- * `projects/{project}/locations/{location}/endpoints/{endpoint}`
- * @param instances Optional. The instances that are the input to token counting call. Schema is
- * identical to the prediction schema of the underlying model.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final CountTokensResponse countTokens(EndpointName endpoint, List{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
- * String endpoint =
- * EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString();
- * List
- *
- * @param endpoint Required. The name of the Endpoint requested to perform token counting. Format:
- * `projects/{project}/locations/{location}/endpoints/{endpoint}`
- * @param instances Optional. The instances that are the input to token counting call. Schema is
- * identical to the prediction schema of the underlying model.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final CountTokensResponse countTokens(String endpoint, List{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
- * CountTokensRequest request =
- * CountTokensRequest.newBuilder()
- * .setEndpoint(
- * EndpointName.ofProjectLocationEndpointName(
- * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString())
- * .setModel("model104069929")
- * .addAllInstances(new ArrayList
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final CountTokensResponse countTokens(CountTokensRequest request) {
- return countTokensCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Perform a token counting.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
- * CountTokensRequest request =
- * CountTokensRequest.newBuilder()
- * .setEndpoint(
- * EndpointName.ofProjectLocationEndpointName(
- * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString())
- * .setModel("model104069929")
- * .addAllInstances(new ArrayList
- */
- public final UnaryCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
- * EndpointName endpoint =
- * EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
- * List
- *
- * @param endpoint Required. The name of the Endpoint requested to get lists of tokens and token
- * ids.
- * @param instances Optional. The instances that are the input to token computing API call. Schema
- * is identical to the prediction schema of the text model, even for the non-text models, like
- * chat models, or Codey models.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ComputeTokensResponse computeTokens(EndpointName endpoint, List{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
- * String endpoint =
- * EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString();
- * List
- *
- * @param endpoint Required. The name of the Endpoint requested to get lists of tokens and token
- * ids.
- * @param instances Optional. The instances that are the input to token computing API call. Schema
- * is identical to the prediction schema of the text model, even for the non-text models, like
- * chat models, or Codey models.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ComputeTokensResponse computeTokens(String endpoint, List{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
- * ComputeTokensRequest request =
- * ComputeTokensRequest.newBuilder()
- * .setEndpoint(
- * EndpointName.ofProjectLocationEndpointName(
- * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString())
- * .addAllInstances(new ArrayList
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ComputeTokensResponse computeTokens(ComputeTokensRequest request) {
- return computeTokensCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Return a list of tokens based on the input text.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
- * ComputeTokensRequest request =
- * ComputeTokensRequest.newBuilder()
- * .setEndpoint(
- * EndpointName.ofProjectLocationEndpointName(
- * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString())
- * .addAllInstances(new ArrayList
- */
- public final UnaryCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
- * ListLocationsRequest request =
- * ListLocationsRequest.newBuilder()
- * .setName("name3373707")
- * .setFilter("filter-1274492040")
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .build();
- * for (Location element : llmUtilityServiceClient.listLocations(request).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) {
- return listLocationsPagedCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Lists information about the supported locations for this service.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
- * ListLocationsRequest request =
- * ListLocationsRequest.newBuilder()
- * .setName("name3373707")
- * .setFilter("filter-1274492040")
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .build();
- * ApiFuture
- */
- public final UnaryCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
- * ListLocationsRequest request =
- * ListLocationsRequest.newBuilder()
- * .setName("name3373707")
- * .setFilter("filter-1274492040")
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .build();
- * while (true) {
- * ListLocationsResponse response =
- * llmUtilityServiceClient.listLocationsCallable().call(request);
- * for (Location element : response.getLocationsList()) {
- * // doThingsWith(element);
- * }
- * String nextPageToken = response.getNextPageToken();
- * if (!Strings.isNullOrEmpty(nextPageToken)) {
- * request = request.toBuilder().setPageToken(nextPageToken).build();
- * } else {
- * break;
- * }
- * }
- * }
- * }
- */
- public final UnaryCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
- * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
- * Location response = llmUtilityServiceClient.getLocation(request);
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final Location getLocation(GetLocationRequest request) {
- return getLocationCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Gets information about a location.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
- * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
- * ApiFuture
- */
- public final UnaryCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
- * SetIamPolicyRequest request =
- * SetIamPolicyRequest.newBuilder()
- * .setResource(
- * EndpointName.ofProjectLocationEndpointName(
- * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString())
- * .setPolicy(Policy.newBuilder().build())
- * .setUpdateMask(FieldMask.newBuilder().build())
- * .build();
- * Policy response = llmUtilityServiceClient.setIamPolicy(request);
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final Policy setIamPolicy(SetIamPolicyRequest request) {
- return setIamPolicyCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Sets the access control policy on the specified resource. Replacesany existing policy.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
- * SetIamPolicyRequest request =
- * SetIamPolicyRequest.newBuilder()
- * .setResource(
- * EndpointName.ofProjectLocationEndpointName(
- * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString())
- * .setPolicy(Policy.newBuilder().build())
- * .setUpdateMask(FieldMask.newBuilder().build())
- * .build();
- * ApiFuture
- */
- public final UnaryCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
- * GetIamPolicyRequest request =
- * GetIamPolicyRequest.newBuilder()
- * .setResource(
- * EndpointName.ofProjectLocationEndpointName(
- * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString())
- * .setOptions(GetPolicyOptions.newBuilder().build())
- * .build();
- * Policy response = llmUtilityServiceClient.getIamPolicy(request);
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final Policy getIamPolicy(GetIamPolicyRequest request) {
- return getIamPolicyCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Gets the access control policy for a resource. Returns an empty policyif the resource exists
- * and does not have a policy set.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
- * GetIamPolicyRequest request =
- * GetIamPolicyRequest.newBuilder()
- * .setResource(
- * EndpointName.ofProjectLocationEndpointName(
- * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString())
- * .setOptions(GetPolicyOptions.newBuilder().build())
- * .build();
- * ApiFuture
- */
- public final UnaryCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
- * TestIamPermissionsRequest request =
- * TestIamPermissionsRequest.newBuilder()
- * .setResource(
- * EndpointName.ofProjectLocationEndpointName(
- * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString())
- * .addAllPermissions(new ArrayList
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) {
- return testIamPermissionsCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Returns permissions that a caller has on the specified resource. If theresource does not exist,
- * this will return an empty set ofpermissions, not a `NOT_FOUND` error.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (LlmUtilityServiceClient llmUtilityServiceClient = LlmUtilityServiceClient.create()) {
- * TestIamPermissionsRequest request =
- * TestIamPermissionsRequest.newBuilder()
- * .setResource(
- * EndpointName.ofProjectLocationEndpointName(
- * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString())
- * .addAllPermissions(new ArrayList
- */
- public final UnaryCallable
- *
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * LlmUtilityServiceSettings.Builder llmUtilityServiceSettingsBuilder =
- * LlmUtilityServiceSettings.newBuilder();
- * llmUtilityServiceSettingsBuilder
- * .countTokensSettings()
- * .setRetrySettings(
- * llmUtilityServiceSettingsBuilder
- * .countTokensSettings()
- * .getRetrySettings()
- * .toBuilder()
- * .setInitialRetryDelayDuration(Duration.ofSeconds(1))
- * .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
- * .setMaxAttempts(5)
- * .setMaxRetryDelayDuration(Duration.ofSeconds(30))
- * .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
- * .setRetryDelayMultiplier(1.3)
- * .setRpcTimeoutMultiplier(1.5)
- * .setTotalTimeoutDuration(Duration.ofSeconds(300))
- * .build());
- * LlmUtilityServiceSettings llmUtilityServiceSettings = llmUtilityServiceSettingsBuilder.build();
- * }
- *
- * Please refer to the [Client Side Retry
- * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting
- * retries.
- */
-@Generated("by gapic-generator-java")
-public class LlmUtilityServiceSettings extends ClientSettings{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying 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()) {
- * EndpointName endpoint =
- * EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
- * List
- *
- *
- *
- *
- *
- *
- * Method
- * Description
- * Method Variants
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * PredictionServiceSettings predictionServiceSettings =
- * PredictionServiceSettings.newBuilder()
- * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- * .build();
- * PredictionServiceClient predictionServiceClient =
- * PredictionServiceClient.create(predictionServiceSettings);
- * }
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * PredictionServiceSettings predictionServiceSettings =
- * PredictionServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
- * PredictionServiceClient predictionServiceClient =
- * PredictionServiceClient.create(predictionServiceSettings);
- * }
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * PredictionServiceSettings predictionServiceSettings =
- * PredictionServiceSettings.newHttpJsonBuilder().build();
- * PredictionServiceClient predictionServiceClient =
- * PredictionServiceClient.create(predictionServiceSettings);
- * }
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying 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()) {
- * EndpointName endpoint =
- * EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
- * List
- *
- * @param endpoint Required. The name of the Endpoint requested to serve the prediction. Format:
- * `projects/{project}/locations/{location}/endpoints/{endpoint}`
- * @param instances Required. The instances that are the input to the prediction call. A
- * DeployedModel may have an upper limit on the number of instances it supports per request,
- * and when it is exceeded the prediction call errors in case of AutoML Models, or, in case of
- * customer created Models, the behaviour is as documented by that Model. The schema of any
- * single instance may be specified via Endpoint's DeployedModels'
- * [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
- * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
- * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
- * @param parameters The parameters that govern the prediction. The schema of the parameters may
- * be specified via Endpoint's DeployedModels' [Model's
- * ][google.cloud.aiplatform.v1.DeployedModel.model]
- * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
- * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final PredictResponse predict(
- EndpointName endpoint, List{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying 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 endpoint =
- * EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString();
- * List
- *
- * @param endpoint Required. The name of the Endpoint requested to serve the prediction. Format:
- * `projects/{project}/locations/{location}/endpoints/{endpoint}`
- * @param instances Required. The instances that are the input to the prediction call. A
- * DeployedModel may have an upper limit on the number of instances it supports per request,
- * and when it is exceeded the prediction call errors in case of AutoML Models, or, in case of
- * customer created Models, the behaviour is as documented by that Model. The schema of any
- * single instance may be specified via Endpoint's DeployedModels'
- * [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
- * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
- * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
- * @param parameters The parameters that govern the prediction. The schema of the parameters may
- * be specified via Endpoint's DeployedModels' [Model's
- * ][google.cloud.aiplatform.v1.DeployedModel.model]
- * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
- * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final PredictResponse predict(String endpoint, List{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying 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()) {
- * PredictRequest request =
- * PredictRequest.newBuilder()
- * .setEndpoint(
- * EndpointName.ofProjectLocationEndpointName(
- * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString())
- * .addAllInstances(new ArrayList
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final PredictResponse predict(PredictRequest request) {
- return predictCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Perform an online prediction.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying 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()) {
- * PredictRequest request =
- * PredictRequest.newBuilder()
- * .setEndpoint(
- * EndpointName.ofProjectLocationEndpointName(
- * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString())
- * .addAllInstances(new ArrayList
- */
- public final UnaryCallable
- *
- *
- *
- *
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying 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()) {
- * EndpointName endpoint =
- * EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
- * HttpBody httpBody = HttpBody.newBuilder().build();
- * HttpBody response = predictionServiceClient.rawPredict(endpoint, httpBody);
- * }
- * }
- *
- * @param endpoint Required. The name of the Endpoint requested to serve the prediction. Format:
- * `projects/{project}/locations/{location}/endpoints/{endpoint}`
- * @param httpBody The prediction input. Supports HTTP headers and arbitrary data payload.
- *
- *
- *
- *
- *
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying 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 endpoint =
- * EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString();
- * HttpBody httpBody = HttpBody.newBuilder().build();
- * HttpBody response = predictionServiceClient.rawPredict(endpoint, httpBody);
- * }
- * }
- *
- * @param endpoint Required. The name of the Endpoint requested to serve the prediction. Format:
- * `projects/{project}/locations/{location}/endpoints/{endpoint}`
- * @param httpBody The prediction input. Supports HTTP headers and arbitrary data payload.
- *
- *
- *
- *
- *
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying 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()) {
- * RawPredictRequest request =
- * RawPredictRequest.newBuilder()
- * .setEndpoint(
- * EndpointName.ofProjectLocationEndpointName(
- * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString())
- * .setHttpBody(HttpBody.newBuilder().build())
- * .build();
- * HttpBody response = predictionServiceClient.rawPredict(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 HttpBody rawPredict(RawPredictRequest request) {
- return rawPredictCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Perform an online prediction with an arbitrary HTTP payload.
- *
- *
- *
- *
- *
- *
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying 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()) {
- * RawPredictRequest request =
- * RawPredictRequest.newBuilder()
- * .setEndpoint(
- * EndpointName.ofProjectLocationEndpointName(
- * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString())
- * .setHttpBody(HttpBody.newBuilder().build())
- * .build();
- * ApiFuture
- */
- public final UnaryCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
- * StreamRawPredictRequest request =
- * StreamRawPredictRequest.newBuilder()
- * .setEndpoint(
- * EndpointName.ofProjectLocationEndpointName(
- * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString())
- * .setHttpBody(HttpBody.newBuilder().build())
- * .build();
- * ServerStream
- */
- public final ServerStreamingCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying 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()) {
- * DirectPredictRequest request =
- * DirectPredictRequest.newBuilder()
- * .setEndpoint(
- * EndpointName.ofProjectLocationEndpointName(
- * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString())
- * .addAllInputs(new ArrayList
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final DirectPredictResponse directPredict(DirectPredictRequest request) {
- return directPredictCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Perform an unary online prediction request to a gRPC model server for Vertex first-party
- * products and frameworks.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying 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()) {
- * DirectPredictRequest request =
- * DirectPredictRequest.newBuilder()
- * .setEndpoint(
- * EndpointName.ofProjectLocationEndpointName(
- * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString())
- * .addAllInputs(new ArrayList
- */
- public final UnaryCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying 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()) {
- * DirectRawPredictRequest request =
- * DirectRawPredictRequest.newBuilder()
- * .setEndpoint(
- * EndpointName.ofProjectLocationEndpointName(
- * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString())
- * .setMethodName("methodName-723163380")
- * .setInput(ByteString.EMPTY)
- * .build();
- * DirectRawPredictResponse response = predictionServiceClient.directRawPredict(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 DirectRawPredictResponse directRawPredict(DirectRawPredictRequest request) {
- return directRawPredictCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Perform an unary online prediction request to a gRPC model server for custom containers.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying 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()) {
- * DirectRawPredictRequest request =
- * DirectRawPredictRequest.newBuilder()
- * .setEndpoint(
- * EndpointName.ofProjectLocationEndpointName(
- * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString())
- * .setMethodName("methodName-723163380")
- * .setInput(ByteString.EMPTY)
- * .build();
- * ApiFuture
- */
- public final UnaryCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
- * BidiStream
- */
- public final BidiStreamingCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
- * BidiStream
- */
- public final BidiStreamingCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
- * BidiStream
- */
- public final BidiStreamingCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
- * StreamingPredictRequest request =
- * StreamingPredictRequest.newBuilder()
- * .setEndpoint(
- * EndpointName.ofProjectLocationEndpointName(
- * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString())
- * .addAllInputs(new ArrayList
- */
- public final ServerStreamingCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
- * BidiStream
- */
- public final BidiStreamingCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
- * EndpointName endpoint =
- * EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]");
- * List
- *
- * @param endpoint Required. The name of the Endpoint requested to serve the explanation. Format:
- * `projects/{project}/locations/{location}/endpoints/{endpoint}`
- * @param instances Required. The instances that are the input to the explanation call. A
- * DeployedModel may have an upper limit on the number of instances it supports per request,
- * and when it is exceeded the explanation call errors in case of AutoML Models, or, in case
- * of customer created Models, the behaviour is as documented by that Model. The schema of any
- * single instance may be specified via Endpoint's DeployedModels'
- * [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
- * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
- * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
- * @param parameters The parameters that govern the prediction. The schema of the parameters may
- * be specified via Endpoint's DeployedModels' [Model's
- * ][google.cloud.aiplatform.v1.DeployedModel.model]
- * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
- * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
- * @param deployedModelId If specified, this ExplainRequest will be served by the chosen
- * DeployedModel, overriding
- * [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split].
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ExplainResponse explain(
- EndpointName endpoint, List{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying 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 endpoint =
- * EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString();
- * List
- *
- * @param endpoint Required. The name of the Endpoint requested to serve the explanation. Format:
- * `projects/{project}/locations/{location}/endpoints/{endpoint}`
- * @param instances Required. The instances that are the input to the explanation call. A
- * DeployedModel may have an upper limit on the number of instances it supports per request,
- * and when it is exceeded the explanation call errors in case of AutoML Models, or, in case
- * of customer created Models, the behaviour is as documented by that Model. The schema of any
- * single instance may be specified via Endpoint's DeployedModels'
- * [Model's][google.cloud.aiplatform.v1.DeployedModel.model]
- * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
- * [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri].
- * @param parameters The parameters that govern the prediction. The schema of the parameters may
- * be specified via Endpoint's DeployedModels' [Model's
- * ][google.cloud.aiplatform.v1.DeployedModel.model]
- * [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata]
- * [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri].
- * @param deployedModelId If specified, this ExplainRequest will be served by the chosen
- * DeployedModel, overriding
- * [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split].
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ExplainResponse explain(
- String endpoint, List{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying 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()) {
- * ExplainRequest request =
- * ExplainRequest.newBuilder()
- * .setEndpoint(
- * EndpointName.ofProjectLocationEndpointName(
- * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString())
- * .addAllInstances(new ArrayList
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ExplainResponse explain(ExplainRequest request) {
- return explainCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Perform an online explanation.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying 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()) {
- * ExplainRequest request =
- * ExplainRequest.newBuilder()
- * .setEndpoint(
- * EndpointName.ofProjectLocationEndpointName(
- * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString())
- * .addAllInstances(new ArrayList
- */
- public final UnaryCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
- * String model = "model104069929";
- * List
- *
- * @param model Required. The fully qualified name of the publisher model or tuned model endpoint
- * to use.
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
- * GenerateContentRequest request =
- * GenerateContentRequest.newBuilder()
- * .setModel("model104069929")
- * .addAllContents(new ArrayList
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final GenerateContentResponse generateContent(GenerateContentRequest request) {
- return generateContentCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Generate content with multimodal inputs.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
- * GenerateContentRequest request =
- * GenerateContentRequest.newBuilder()
- * .setModel("model104069929")
- * .addAllContents(new ArrayList
- */
- public final UnaryCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
- * GenerateContentRequest request =
- * GenerateContentRequest.newBuilder()
- * .setModel("model104069929")
- * .addAllContents(new ArrayList
- */
- public final ServerStreamingCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying 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()) {
- * EndpointName model =
- * EndpointName.ofProjectLocationPublisherModelName(
- * "[PROJECT]", "[LOCATION]", "[PUBLISHER]", "[MODEL]");
- * Content content = Content.newBuilder().build();
- * EmbedContentResponse response = predictionServiceClient.embedContent(model, content);
- * }
- * }
- *
- * @param model Required. The name of the publisher model requested to serve the prediction.
- * Format: `projects/{project}/locations/{location}/publishers/*/models/*`
- * @param content Required. Input content to be embedded. Required.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final EmbedContentResponse embedContent(EndpointName model, Content content) {
- EmbedContentRequest request =
- EmbedContentRequest.newBuilder()
- .setModel(model == null ? null : model.toString())
- .setContent(content)
- .build();
- return embedContent(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Embed content with multimodal inputs.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
- * String model =
- * EndpointName.ofProjectLocationEndpointName("[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString();
- * Content content = Content.newBuilder().build();
- * EmbedContentResponse response = predictionServiceClient.embedContent(model, content);
- * }
- * }
- *
- * @param model Required. The name of the publisher model requested to serve the prediction.
- * Format: `projects/{project}/locations/{location}/publishers/*/models/*`
- * @param content Required. Input content to be embedded. Required.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final EmbedContentResponse embedContent(String model, Content content) {
- EmbedContentRequest request =
- EmbedContentRequest.newBuilder().setModel(model).setContent(content).build();
- return embedContent(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Embed content with multimodal inputs.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
- * EmbedContentRequest request =
- * EmbedContentRequest.newBuilder()
- * .setModel(
- * EndpointName.ofProjectLocationPublisherModelName(
- * "[PROJECT]", "[LOCATION]", "[PUBLISHER]", "[MODEL]")
- * .toString())
- * .setContent(Content.newBuilder().build())
- * .setTitle("title110371416")
- * .setOutputDimensionality(-495931909)
- * .setAutoTruncate(true)
- * .build();
- * EmbedContentResponse response = predictionServiceClient.embedContent(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 EmbedContentResponse embedContent(EmbedContentRequest request) {
- return embedContentCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Embed content with multimodal inputs.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
- * EmbedContentRequest request =
- * EmbedContentRequest.newBuilder()
- * .setModel(
- * EndpointName.ofProjectLocationPublisherModelName(
- * "[PROJECT]", "[LOCATION]", "[PUBLISHER]", "[MODEL]")
- * .toString())
- * .setContent(Content.newBuilder().build())
- * .setTitle("title110371416")
- * .setOutputDimensionality(-495931909)
- * .setAutoTruncate(true)
- * .build();
- * ApiFuture
- */
- public final UnaryCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying 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()) {
- * ListLocationsRequest request =
- * ListLocationsRequest.newBuilder()
- * .setName("name3373707")
- * .setFilter("filter-1274492040")
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .build();
- * for (Location element : predictionServiceClient.listLocations(request).iterateAll()) {
- * // doThingsWith(element);
- * }
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) {
- return listLocationsPagedCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Lists information about the supported locations for this service.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying 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()) {
- * ListLocationsRequest request =
- * ListLocationsRequest.newBuilder()
- * .setName("name3373707")
- * .setFilter("filter-1274492040")
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .build();
- * ApiFuture
- */
- public final UnaryCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying 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()) {
- * ListLocationsRequest request =
- * ListLocationsRequest.newBuilder()
- * .setName("name3373707")
- * .setFilter("filter-1274492040")
- * .setPageSize(883849137)
- * .setPageToken("pageToken873572522")
- * .build();
- * while (true) {
- * ListLocationsResponse response =
- * predictionServiceClient.listLocationsCallable().call(request);
- * for (Location element : response.getLocationsList()) {
- * // doThingsWith(element);
- * }
- * String nextPageToken = response.getNextPageToken();
- * if (!Strings.isNullOrEmpty(nextPageToken)) {
- * request = request.toBuilder().setPageToken(nextPageToken).build();
- * } else {
- * break;
- * }
- * }
- * }
- * }
- */
- public final UnaryCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying 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()) {
- * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
- * Location response = predictionServiceClient.getLocation(request);
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final Location getLocation(GetLocationRequest request) {
- return getLocationCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Gets information about a location.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying 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()) {
- * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
- * ApiFuture
- */
- public final UnaryCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying 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()) {
- * SetIamPolicyRequest request =
- * SetIamPolicyRequest.newBuilder()
- * .setResource(
- * EndpointName.ofProjectLocationEndpointName(
- * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString())
- * .setPolicy(Policy.newBuilder().build())
- * .setUpdateMask(FieldMask.newBuilder().build())
- * .build();
- * Policy response = predictionServiceClient.setIamPolicy(request);
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final Policy setIamPolicy(SetIamPolicyRequest request) {
- return setIamPolicyCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Sets the access control policy on the specified resource. Replacesany existing policy.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying 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()) {
- * SetIamPolicyRequest request =
- * SetIamPolicyRequest.newBuilder()
- * .setResource(
- * EndpointName.ofProjectLocationEndpointName(
- * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString())
- * .setPolicy(Policy.newBuilder().build())
- * .setUpdateMask(FieldMask.newBuilder().build())
- * .build();
- * ApiFuture
- */
- public final UnaryCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying 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()) {
- * GetIamPolicyRequest request =
- * GetIamPolicyRequest.newBuilder()
- * .setResource(
- * EndpointName.ofProjectLocationEndpointName(
- * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString())
- * .setOptions(GetPolicyOptions.newBuilder().build())
- * .build();
- * Policy response = predictionServiceClient.getIamPolicy(request);
- * }
- * }
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final Policy getIamPolicy(GetIamPolicyRequest request) {
- return getIamPolicyCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Gets the access control policy for a resource. Returns an empty policyif the resource exists
- * and does not have a policy set.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying 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()) {
- * GetIamPolicyRequest request =
- * GetIamPolicyRequest.newBuilder()
- * .setResource(
- * EndpointName.ofProjectLocationEndpointName(
- * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString())
- * .setOptions(GetPolicyOptions.newBuilder().build())
- * .build();
- * ApiFuture
- */
- public final UnaryCallable{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying 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()) {
- * TestIamPermissionsRequest request =
- * TestIamPermissionsRequest.newBuilder()
- * .setResource(
- * EndpointName.ofProjectLocationEndpointName(
- * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString())
- * .addAllPermissions(new ArrayList
- *
- * @param request The request object containing all of the parameters for the API call.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) {
- return testIamPermissionsCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD.
- /**
- * Returns permissions that a caller has on the specified resource. If theresource does not exist,
- * this will return an empty set ofpermissions, not a `NOT_FOUND` error.
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying 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()) {
- * TestIamPermissionsRequest request =
- * TestIamPermissionsRequest.newBuilder()
- * .setResource(
- * EndpointName.ofProjectLocationEndpointName(
- * "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
- * .toString())
- * .addAllPermissions(new ArrayList
- */
- public final UnaryCallable
- *
- *
- * {@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * PredictionServiceSettings.Builder predictionServiceSettingsBuilder =
- * PredictionServiceSettings.newBuilder();
- * predictionServiceSettingsBuilder
- * .predictSettings()
- * .setRetrySettings(
- * predictionServiceSettingsBuilder
- * .predictSettings()
- * .getRetrySettings()
- * .toBuilder()
- * .setInitialRetryDelayDuration(Duration.ofSeconds(1))
- * .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
- * .setMaxAttempts(5)
- * .setMaxRetryDelayDuration(Duration.ofSeconds(30))
- * .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
- * .setRetryDelayMultiplier(1.3)
- * .setRpcTimeoutMultiplier(1.5)
- * .setTotalTimeoutDuration(Duration.ofSeconds(300))
- * .build());
- * PredictionServiceSettings predictionServiceSettings = predictionServiceSettingsBuilder.build();
- * }
- *
- * Please refer to the [Client Side Retry
- * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting
- * retries.
- */
-@Generated("by gapic-generator-java")
-public class PredictionServiceSettings extends ClientSettings