Skip to content

Commit

Permalink
chore: generate libraries at Thu May 2 02:17:16 UTC 2024
Browse files Browse the repository at this point in the history
  • Loading branch information
cloud-java-bot committed May 2, 2024
1 parent 11f064a commit 73bf25e
Show file tree
Hide file tree
Showing 242 changed files with 13,793 additions and 4,664 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,24 @@
* </td>
* </tr>
* <tr>
* <td><p> UpdateDatasetVersion</td>
* <td><p> Updates a DatasetVersion.</td>
* <td>
* <p>Request object method variants only take one parameter, a request object, which must be constructed before the call.</p>
* <ul>
* <li><p> updateDatasetVersion(UpdateDatasetVersionRequest request)
* </ul>
* <p>"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.</p>
* <ul>
* <li><p> updateDatasetVersion(DatasetVersion datasetVersion, FieldMask updateMask)
* </ul>
* <p>Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.</p>
* <ul>
* <li><p> updateDatasetVersionCallable()
* </ul>
* </td>
* </tr>
* <tr>
* <td><p> DeleteDatasetVersion</td>
* <td><p> Deletes a Dataset version.</td>
* <td>
Expand Down Expand Up @@ -1743,6 +1761,101 @@ public final UnaryCallable<ExportDataRequest, Operation> exportDataCallable() {
return stub.createDatasetVersionCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates a DatasetVersion.
*
* <p>Sample code:
*
* <pre>{@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 (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
* DatasetVersion datasetVersion = DatasetVersion.newBuilder().build();
* FieldMask updateMask = FieldMask.newBuilder().build();
* DatasetVersion response =
* datasetServiceClient.updateDatasetVersion(datasetVersion, updateMask);
* }
* }</pre>
*
* @param datasetVersion Required. The DatasetVersion which replaces the resource on the server.
* @param updateMask Required. The update mask applies to the resource. For the `FieldMask`
* definition, see [google.protobuf.FieldMask][google.protobuf.FieldMask]. Updatable fields:
* <p>&#42; `display_name`
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final DatasetVersion updateDatasetVersion(
DatasetVersion datasetVersion, FieldMask updateMask) {
UpdateDatasetVersionRequest request =
UpdateDatasetVersionRequest.newBuilder()
.setDatasetVersion(datasetVersion)
.setUpdateMask(updateMask)
.build();
return updateDatasetVersion(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates a DatasetVersion.
*
* <p>Sample code:
*
* <pre>{@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 (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
* UpdateDatasetVersionRequest request =
* UpdateDatasetVersionRequest.newBuilder()
* .setDatasetVersion(DatasetVersion.newBuilder().build())
* .setUpdateMask(FieldMask.newBuilder().build())
* .build();
* DatasetVersion response = datasetServiceClient.updateDatasetVersion(request);
* }
* }</pre>
*
* @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 DatasetVersion updateDatasetVersion(UpdateDatasetVersionRequest request) {
return updateDatasetVersionCallable().call(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates a DatasetVersion.
*
* <p>Sample code:
*
* <pre>{@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 (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
* UpdateDatasetVersionRequest request =
* UpdateDatasetVersionRequest.newBuilder()
* .setDatasetVersion(DatasetVersion.newBuilder().build())
* .setUpdateMask(FieldMask.newBuilder().build())
* .build();
* ApiFuture<DatasetVersion> future =
* datasetServiceClient.updateDatasetVersionCallable().futureCall(request);
* // Do something.
* DatasetVersion response = future.get();
* }
* }</pre>
*/
public final UnaryCallable<UpdateDatasetVersionRequest, DatasetVersion>
updateDatasetVersionCallable() {
return stub.updateDatasetVersionCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes a Dataset version.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,12 @@ public UnaryCallSettings<CreateDatasetVersionRequest, Operation> createDatasetVe
return ((DatasetServiceStubSettings) getStubSettings()).createDatasetVersionOperationSettings();
}

/** Returns the object with the settings used for calls to updateDatasetVersion. */
public UnaryCallSettings<UpdateDatasetVersionRequest, DatasetVersion>
updateDatasetVersionSettings() {
return ((DatasetServiceStubSettings) getStubSettings()).updateDatasetVersionSettings();
}

/** Returns the object with the settings used for calls to deleteDatasetVersion. */
public UnaryCallSettings<DeleteDatasetVersionRequest, Operation> deleteDatasetVersionSettings() {
return ((DatasetServiceStubSettings) getStubSettings()).deleteDatasetVersionSettings();
Expand Down Expand Up @@ -445,6 +451,12 @@ public UnaryCallSettings.Builder<ExportDataRequest, Operation> exportDataSetting
return getStubSettingsBuilder().createDatasetVersionOperationSettings();
}

/** Returns the builder for the settings used for calls to updateDatasetVersion. */
public UnaryCallSettings.Builder<UpdateDatasetVersionRequest, DatasetVersion>
updateDatasetVersionSettings() {
return getStubSettingsBuilder().updateDatasetVersionSettings();
}

/** Returns the builder for the settings used for calls to deleteDatasetVersion. */
public UnaryCallSettings.Builder<DeleteDatasetVersionRequest, Operation>
deleteDatasetVersionSettings() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ public final OperationsClient getOperationsClient() {
* }</pre>
*
* @param parent Required. The resource name of the Location to create FeatureGroups. Format:
* `projects/{project}/locations/{location}'`
* `projects/{project}/locations/{location}`
* @param featureGroup Required. The FeatureGroup to create.
* @param featureGroupId Required. The ID to use for this FeatureGroup, which will become the
* final component of the FeatureGroup's resource name.
Expand Down Expand Up @@ -527,7 +527,7 @@ public final OperationsClient getOperationsClient() {
* }</pre>
*
* @param parent Required. The resource name of the Location to create FeatureGroups. Format:
* `projects/{project}/locations/{location}'`
* `projects/{project}/locations/{location}`
* @param featureGroup Required. The FeatureGroup to create.
* @param featureGroupId Required. The ID to use for this FeatureGroup, which will become the
* final component of the FeatureGroup's resource name.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,16 +270,6 @@
* </td>
* </tr>
* <tr>
* <td><p> ChatCompletions</td>
* <td><p> Exposes an OpenAI-compatible endpoint for chat completions.</td>
* <td>
* <p>Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.</p>
* <ul>
* <li><p> chatCompletionsCallable()
* </ul>
* </td>
* </tr>
* <tr>
* <td><p> ListLocations</td>
* <td><p> Lists information about the supported locations for this service.</td>
* <td>
Expand Down Expand Up @@ -1614,39 +1604,6 @@ public final GenerateContentResponse generateContent(GenerateContentRequest requ
return stub.streamGenerateContentCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Exposes an OpenAI-compatible endpoint for chat completions.
*
* <p>Sample code:
*
* <pre>{@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()) {
* ChatCompletionsRequest request =
* ChatCompletionsRequest.newBuilder()
* .setEndpoint(
* EndpointName.ofProjectLocationEndpointName(
* "[PROJECT]", "[LOCATION]", "[ENDPOINT]")
* .toString())
* .setHttpBody(HttpBody.newBuilder().build())
* .build();
* ServerStream<HttpBody> stream =
* predictionServiceClient.chatCompletionsCallable().call(request);
* for (HttpBody response : stream) {
* // Do something when a response is received.
* }
* }
* }</pre>
*/
public final ServerStreamingCallable<ChatCompletionsRequest, HttpBody> chatCompletionsCallable() {
return stub.chatCompletionsCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists information about the supported locations for this service.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,6 @@ public UnaryCallSettings<CountTokensRequest, CountTokensResponse> countTokensSet
return ((PredictionServiceStubSettings) getStubSettings()).streamGenerateContentSettings();
}

/** Returns the object with the settings used for calls to chatCompletions. */
public ServerStreamingCallSettings<ChatCompletionsRequest, HttpBody> chatCompletionsSettings() {
return ((PredictionServiceStubSettings) getStubSettings()).chatCompletionsSettings();
}

/** Returns the object with the settings used for calls to listLocations. */
public PagedCallSettings<ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
listLocationsSettings() {
Expand Down Expand Up @@ -364,12 +359,6 @@ public UnaryCallSettings.Builder<ExplainRequest, ExplainResponse> explainSetting
return getStubSettingsBuilder().streamGenerateContentSettings();
}

/** Returns the builder for the settings used for calls to chatCompletions. */
public ServerStreamingCallSettings.Builder<ChatCompletionsRequest, HttpBody>
chatCompletionsSettings() {
return getStubSettingsBuilder().chatCompletionsSettings();
}

/** Returns the builder for the settings used for calls to listLocations. */
public PagedCallSettings.Builder<
ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@
},
"UpdateDataset": {
"methods": ["updateDataset", "updateDataset", "updateDatasetCallable"]
},
"UpdateDatasetVersion": {
"methods": ["updateDatasetVersion", "updateDatasetVersion", "updateDatasetVersionCallable"]
}
}
}
Expand Down Expand Up @@ -1300,9 +1303,6 @@
"grpc": {
"libraryClient": "PredictionServiceClient",
"rpcs": {
"ChatCompletions": {
"methods": ["chatCompletionsCallable"]
},
"CountTokens": {
"methods": ["countTokens", "countTokens", "countTokens", "countTokensCallable"]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
import com.google.cloud.aiplatform.v1beta1.SearchDataItemsRequest;
import com.google.cloud.aiplatform.v1beta1.SearchDataItemsResponse;
import com.google.cloud.aiplatform.v1beta1.UpdateDatasetRequest;
import com.google.cloud.aiplatform.v1beta1.UpdateDatasetVersionRequest;
import com.google.cloud.location.GetLocationRequest;
import com.google.cloud.location.ListLocationsRequest;
import com.google.cloud.location.ListLocationsResponse;
Expand Down Expand Up @@ -154,6 +155,10 @@ public UnaryCallable<CreateDatasetVersionRequest, Operation> createDatasetVersio
throw new UnsupportedOperationException("Not implemented: createDatasetVersionCallable()");
}

public UnaryCallable<UpdateDatasetVersionRequest, DatasetVersion> updateDatasetVersionCallable() {
throw new UnsupportedOperationException("Not implemented: updateDatasetVersionCallable()");
}

public OperationCallable<DeleteDatasetVersionRequest, Empty, DeleteOperationMetadata>
deleteDatasetVersionOperationCallable() {
throw new UnsupportedOperationException(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
import com.google.cloud.aiplatform.v1beta1.SearchDataItemsRequest;
import com.google.cloud.aiplatform.v1beta1.SearchDataItemsResponse;
import com.google.cloud.aiplatform.v1beta1.UpdateDatasetRequest;
import com.google.cloud.aiplatform.v1beta1.UpdateDatasetVersionRequest;
import com.google.cloud.location.GetLocationRequest;
import com.google.cloud.location.ListLocationsRequest;
import com.google.cloud.location.ListLocationsResponse;
Expand Down Expand Up @@ -177,6 +178,8 @@ public class DatasetServiceStubSettings extends StubSettings<DatasetServiceStubS
private final OperationCallSettings<
CreateDatasetVersionRequest, DatasetVersion, CreateDatasetVersionOperationMetadata>
createDatasetVersionOperationSettings;
private final UnaryCallSettings<UpdateDatasetVersionRequest, DatasetVersion>
updateDatasetVersionSettings;
private final UnaryCallSettings<DeleteDatasetVersionRequest, Operation>
deleteDatasetVersionSettings;
private final OperationCallSettings<DeleteDatasetVersionRequest, Empty, DeleteOperationMetadata>
Expand Down Expand Up @@ -681,6 +684,12 @@ public UnaryCallSettings<CreateDatasetVersionRequest, Operation> createDatasetVe
return createDatasetVersionOperationSettings;
}

/** Returns the object with the settings used for calls to updateDatasetVersion. */
public UnaryCallSettings<UpdateDatasetVersionRequest, DatasetVersion>
updateDatasetVersionSettings() {
return updateDatasetVersionSettings;
}

/** Returns the object with the settings used for calls to deleteDatasetVersion. */
public UnaryCallSettings<DeleteDatasetVersionRequest, Operation> deleteDatasetVersionSettings() {
return deleteDatasetVersionSettings;
Expand Down Expand Up @@ -881,6 +890,7 @@ protected DatasetServiceStubSettings(Builder settingsBuilder) throws IOException
createDatasetVersionSettings = settingsBuilder.createDatasetVersionSettings().build();
createDatasetVersionOperationSettings =
settingsBuilder.createDatasetVersionOperationSettings().build();
updateDatasetVersionSettings = settingsBuilder.updateDatasetVersionSettings().build();
deleteDatasetVersionSettings = settingsBuilder.deleteDatasetVersionSettings().build();
deleteDatasetVersionOperationSettings =
settingsBuilder.deleteDatasetVersionOperationSettings().build();
Expand Down Expand Up @@ -932,6 +942,8 @@ public static class Builder extends StubSettings.Builder<DatasetServiceStubSetti
private final OperationCallSettings.Builder<
CreateDatasetVersionRequest, DatasetVersion, CreateDatasetVersionOperationMetadata>
createDatasetVersionOperationSettings;
private final UnaryCallSettings.Builder<UpdateDatasetVersionRequest, DatasetVersion>
updateDatasetVersionSettings;
private final UnaryCallSettings.Builder<DeleteDatasetVersionRequest, Operation>
deleteDatasetVersionSettings;
private final OperationCallSettings.Builder<
Expand Down Expand Up @@ -1026,6 +1038,7 @@ protected Builder(ClientContext clientContext) {
exportDataOperationSettings = OperationCallSettings.newBuilder();
createDatasetVersionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
createDatasetVersionOperationSettings = OperationCallSettings.newBuilder();
updateDatasetVersionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
deleteDatasetVersionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
deleteDatasetVersionOperationSettings = OperationCallSettings.newBuilder();
getDatasetVersionSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
Expand Down Expand Up @@ -1056,6 +1069,7 @@ protected Builder(ClientContext clientContext) {
importDataSettings,
exportDataSettings,
createDatasetVersionSettings,
updateDatasetVersionSettings,
deleteDatasetVersionSettings,
getDatasetVersionSettings,
listDatasetVersionsSettings,
Expand Down Expand Up @@ -1091,6 +1105,7 @@ protected Builder(DatasetServiceStubSettings settings) {
createDatasetVersionSettings = settings.createDatasetVersionSettings.toBuilder();
createDatasetVersionOperationSettings =
settings.createDatasetVersionOperationSettings.toBuilder();
updateDatasetVersionSettings = settings.updateDatasetVersionSettings.toBuilder();
deleteDatasetVersionSettings = settings.deleteDatasetVersionSettings.toBuilder();
deleteDatasetVersionOperationSettings =
settings.deleteDatasetVersionOperationSettings.toBuilder();
Expand Down Expand Up @@ -1122,6 +1137,7 @@ protected Builder(DatasetServiceStubSettings settings) {
importDataSettings,
exportDataSettings,
createDatasetVersionSettings,
updateDatasetVersionSettings,
deleteDatasetVersionSettings,
getDatasetVersionSettings,
listDatasetVersionsSettings,
Expand Down Expand Up @@ -1192,6 +1208,11 @@ private static Builder initDefaults(Builder builder) {
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));

builder
.updateDatasetVersionSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));

builder
.deleteDatasetVersionSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
Expand Down Expand Up @@ -1557,6 +1578,12 @@ public UnaryCallSettings.Builder<ExportDataRequest, Operation> exportDataSetting
return createDatasetVersionOperationSettings;
}

/** Returns the builder for the settings used for calls to updateDatasetVersion. */
public UnaryCallSettings.Builder<UpdateDatasetVersionRequest, DatasetVersion>
updateDatasetVersionSettings() {
return updateDatasetVersionSettings;
}

/** Returns the builder for the settings used for calls to deleteDatasetVersion. */
public UnaryCallSettings.Builder<DeleteDatasetVersionRequest, Operation>
deleteDatasetVersionSettings() {
Expand Down
Loading

0 comments on commit 73bf25e

Please sign in to comment.