Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update googleapis SHA circa 2024-09-24 #14726

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ the APIs in these libraries are stable, and are ready for production use.

- [Gemini API](/google/cloud/generativelanguage/README.md)

### [KMS](/google/cloud/kms/README.md)

- `AutokeyClient::ListKeyHandles(...)` signature has changed to return an
iterable type. Our telemetry indicates that there are no C++ applications
using this API, and therefore we do not consider this a breaking change.
([#14726](https://github.com/googleapis/google-cloud-cpp/pull/14726))

## v2.29.0 - 2024-09

### New Libraries
Expand Down
6 changes: 3 additions & 3 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ python.toolchain(
bazel_dep(name = "googleapis", version = "0.0.0", repo_name = "com_google_googleapis")
archive_override(
module_name = "googleapis",
integrity = "sha256-IC7W47gHoHnWAOBKMANd0P5+Cn0iNzaXBgGuFbuwBtw=",
integrity = "sha256-mba+X1CiSqJjLinSWVYbrjmeRCWRHF/a+6o1kJbhdTo=",
patch_strip = 1,
patches = ["//bazel:googleapis.modules.patch"],
strip_prefix = "googleapis-38d33ad1da5ece4874e4b7b7921df7299835b253",
strip_prefix = "googleapis-67e2cff0ed3293fe8d7533783f7696440126e16f",
urls = [
"https://github.com/googleapis/googleapis/archive/38d33ad1da5ece4874e4b7b7921df7299835b253.tar.gz",
"https://github.com/googleapis/googleapis/archive/67e2cff0ed3293fe8d7533783f7696440126e16f.tar.gz",
],
)

Expand Down
6 changes: 3 additions & 3 deletions bazel/workspace0.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ def gl_cpp_workspace0(name = None):
http_archive,
name = "com_google_googleapis",
urls = [
"https://github.com/googleapis/googleapis/archive/38d33ad1da5ece4874e4b7b7921df7299835b253.tar.gz",
"https://github.com/googleapis/googleapis/archive/67e2cff0ed3293fe8d7533783f7696440126e16f.tar.gz",
],
sha256 = "202ed6e3b807a079d600e04a30035dd0fe7e0a7d223736970601ae15bbb006dc",
strip_prefix = "googleapis-38d33ad1da5ece4874e4b7b7921df7299835b253",
sha256 = "99b6be5f50a24aa2632e29d259561bae399e4425911c5fdafbaa359096e1753a",
strip_prefix = "googleapis-67e2cff0ed3293fe8d7533783f7696440126e16f",
build_file = Label("//bazel:googleapis.BUILD"),
# Scaffolding for patching googleapis after download. For example:
# patches = ["googleapis.patch"]
Expand Down
Binary file modified ci/abi-dumps/google_cloud_cpp_kms.expected.abi.dump.gz
Binary file not shown.
4 changes: 2 additions & 2 deletions cmake/GoogleapisConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ set(GOOGLE_CLOUD_CPP_GOOGLEAPIS_SHA256
mark_as_advanced(GOOGLE_CLOUD_CPP_GOOGLEAPIS_SHA256)

set(_GOOGLE_CLOUD_CPP_GOOGLEAPIS_COMMIT_SHA
"38d33ad1da5ece4874e4b7b7921df7299835b253")
"67e2cff0ed3293fe8d7533783f7696440126e16f")
set(_GOOGLE_CLOUD_CPP_GOOGLEAPIS_SHA256
"202ed6e3b807a079d600e04a30035dd0fe7e0a7d223736970601ae15bbb006dc")
"99b6be5f50a24aa2632e29d259561bae399e4425911c5fdafbaa359096e1753a")

set(DOXYGEN_ALIASES
"googleapis_link{2}=\"[\\1](https://github.com/googleapis/googleapis/blob/${_GOOGLE_CLOUD_CPP_GOOGLEAPIS_COMMIT_SHA}/\\2)\""
Expand Down
48 changes: 48 additions & 0 deletions google/cloud/aiplatform/v1/gen_ai_tuning_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,54 @@ Status GenAiTuningServiceClient::CancelTuningJob(
return connection_->CancelTuningJob(request);
}

future<StatusOr<google::cloud::aiplatform::v1::TuningJob>>
GenAiTuningServiceClient::RebaseTunedModel(
std::string const& parent,
google::cloud::aiplatform::v1::TunedModelRef const& tuned_model_ref,
Options opts) {
internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
google::cloud::aiplatform::v1::RebaseTunedModelRequest request;
request.set_parent(parent);
*request.mutable_tuned_model_ref() = tuned_model_ref;
return connection_->RebaseTunedModel(request);
}

StatusOr<google::longrunning::Operation>
GenAiTuningServiceClient::RebaseTunedModel(
NoAwaitTag, std::string const& parent,
google::cloud::aiplatform::v1::TunedModelRef const& tuned_model_ref,
Options opts) {
internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
google::cloud::aiplatform::v1::RebaseTunedModelRequest request;
request.set_parent(parent);
*request.mutable_tuned_model_ref() = tuned_model_ref;
return connection_->RebaseTunedModel(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::aiplatform::v1::TuningJob>>
GenAiTuningServiceClient::RebaseTunedModel(
google::cloud::aiplatform::v1::RebaseTunedModelRequest const& request,
Options opts) {
internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
return connection_->RebaseTunedModel(request);
}

StatusOr<google::longrunning::Operation>
GenAiTuningServiceClient::RebaseTunedModel(
NoAwaitTag,
google::cloud::aiplatform::v1::RebaseTunedModelRequest const& request,
Options opts) {
internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
return connection_->RebaseTunedModel(NoAwaitTag{}, request);
}

future<StatusOr<google::cloud::aiplatform::v1::TuningJob>>
GenAiTuningServiceClient::RebaseTunedModel(
google::longrunning::Operation const& operation, Options opts) {
internal::OptionsSpan span(internal::MergeOptions(std::move(opts), options_));
return connection_->RebaseTunedModel(operation);
}

GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
} // namespace aiplatform_v1
} // namespace cloud
Expand Down
144 changes: 134 additions & 10 deletions google/cloud/aiplatform/v1/gen_ai_tuning_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@

#include "google/cloud/aiplatform/v1/gen_ai_tuning_connection.h"
#include "google/cloud/future.h"
#include "google/cloud/no_await_tag.h"
#include "google/cloud/options.h"
#include "google/cloud/polling_policy.h"
#include "google/cloud/status_or.h"
#include "google/cloud/version.h"
#include <google/longrunning/operations.grpc.pb.h>
#include <map>
#include <memory>
#include <string>
Expand Down Expand Up @@ -109,7 +111,7 @@ class GenAiTuningServiceClient {
/// [`future`]: @ref google::cloud::future
/// [`StatusOr`]: @ref google::cloud::StatusOr
/// [`Status`]: @ref google::cloud::Status
/// [google.cloud.aiplatform.v1.CreateTuningJobRequest]: @googleapis_reference_link{google/cloud/aiplatform/v1/genai_tuning_service.proto#L89}
/// [google.cloud.aiplatform.v1.CreateTuningJobRequest]: @googleapis_reference_link{google/cloud/aiplatform/v1/genai_tuning_service.proto#L108}
/// [google.cloud.aiplatform.v1.TuningJob]: @googleapis_reference_link{google/cloud/aiplatform/v1/tuning_job.proto#L36}
///
// clang-format on
Expand Down Expand Up @@ -142,7 +144,7 @@ class GenAiTuningServiceClient {
/// [`future`]: @ref google::cloud::future
/// [`StatusOr`]: @ref google::cloud::StatusOr
/// [`Status`]: @ref google::cloud::Status
/// [google.cloud.aiplatform.v1.CreateTuningJobRequest]: @googleapis_reference_link{google/cloud/aiplatform/v1/genai_tuning_service.proto#L89}
/// [google.cloud.aiplatform.v1.CreateTuningJobRequest]: @googleapis_reference_link{google/cloud/aiplatform/v1/genai_tuning_service.proto#L108}
/// [google.cloud.aiplatform.v1.TuningJob]: @googleapis_reference_link{google/cloud/aiplatform/v1/tuning_job.proto#L36}
///
// clang-format on
Expand All @@ -169,7 +171,7 @@ class GenAiTuningServiceClient {
/// [`future`]: @ref google::cloud::future
/// [`StatusOr`]: @ref google::cloud::StatusOr
/// [`Status`]: @ref google::cloud::Status
/// [google.cloud.aiplatform.v1.GetTuningJobRequest]: @googleapis_reference_link{google/cloud/aiplatform/v1/genai_tuning_service.proto#L105}
/// [google.cloud.aiplatform.v1.GetTuningJobRequest]: @googleapis_reference_link{google/cloud/aiplatform/v1/genai_tuning_service.proto#L124}
/// [google.cloud.aiplatform.v1.TuningJob]: @googleapis_reference_link{google/cloud/aiplatform/v1/tuning_job.proto#L36}
///
// clang-format on
Expand Down Expand Up @@ -199,7 +201,7 @@ class GenAiTuningServiceClient {
/// [`future`]: @ref google::cloud::future
/// [`StatusOr`]: @ref google::cloud::StatusOr
/// [`Status`]: @ref google::cloud::Status
/// [google.cloud.aiplatform.v1.GetTuningJobRequest]: @googleapis_reference_link{google/cloud/aiplatform/v1/genai_tuning_service.proto#L105}
/// [google.cloud.aiplatform.v1.GetTuningJobRequest]: @googleapis_reference_link{google/cloud/aiplatform/v1/genai_tuning_service.proto#L124}
/// [google.cloud.aiplatform.v1.TuningJob]: @googleapis_reference_link{google/cloud/aiplatform/v1/tuning_job.proto#L36}
///
// clang-format on
Expand Down Expand Up @@ -235,7 +237,7 @@ class GenAiTuningServiceClient {
/// [`future`]: @ref google::cloud::future
/// [`StatusOr`]: @ref google::cloud::StatusOr
/// [`Status`]: @ref google::cloud::Status
/// [google.cloud.aiplatform.v1.ListTuningJobsRequest]: @googleapis_reference_link{google/cloud/aiplatform/v1/genai_tuning_service.proto#L118}
/// [google.cloud.aiplatform.v1.ListTuningJobsRequest]: @googleapis_reference_link{google/cloud/aiplatform/v1/genai_tuning_service.proto#L137}
/// [google.cloud.aiplatform.v1.TuningJob]: @googleapis_reference_link{google/cloud/aiplatform/v1/tuning_job.proto#L36}
///
// clang-format on
Expand Down Expand Up @@ -274,7 +276,7 @@ class GenAiTuningServiceClient {
/// [`future`]: @ref google::cloud::future
/// [`StatusOr`]: @ref google::cloud::StatusOr
/// [`Status`]: @ref google::cloud::Status
/// [google.cloud.aiplatform.v1.ListTuningJobsRequest]: @googleapis_reference_link{google/cloud/aiplatform/v1/genai_tuning_service.proto#L118}
/// [google.cloud.aiplatform.v1.ListTuningJobsRequest]: @googleapis_reference_link{google/cloud/aiplatform/v1/genai_tuning_service.proto#L137}
/// [google.cloud.aiplatform.v1.TuningJob]: @googleapis_reference_link{google/cloud/aiplatform/v1/tuning_job.proto#L36}
///
// clang-format on
Expand Down Expand Up @@ -310,8 +312,8 @@ class GenAiTuningServiceClient {
/// [`future`]: @ref google::cloud::future
/// [`StatusOr`]: @ref google::cloud::StatusOr
/// [`Status`]: @ref google::cloud::Status
/// [google.cloud.aiplatform.v1.CancelTuningJobRequest]: @googleapis_reference_link{google/cloud/aiplatform/v1/genai_tuning_service.proto#L155}
/// [google.cloud.aiplatform.v1.GenAiTuningService.GetTuningJob]: @googleapis_reference_link{google/cloud/aiplatform/v1/genai_tuning_service.proto#L51}
/// [google.cloud.aiplatform.v1.CancelTuningJobRequest]: @googleapis_reference_link{google/cloud/aiplatform/v1/genai_tuning_service.proto#L174}
/// [google.cloud.aiplatform.v1.GenAiTuningService.GetTuningJob]: @googleapis_reference_link{google/cloud/aiplatform/v1/genai_tuning_service.proto#L54}
/// [google.cloud.aiplatform.v1.TuningJob.error]: @googleapis_reference_link{google/cloud/aiplatform/v1/tuning_job.proto#L98}
/// [google.cloud.aiplatform.v1.TuningJob.state]: @googleapis_reference_link{google/cloud/aiplatform/v1/tuning_job.proto#L71}
/// [google.rpc.Status.code]: @googleapis_reference_link{google/rpc/status.proto#L38}
Expand Down Expand Up @@ -351,8 +353,8 @@ class GenAiTuningServiceClient {
/// [`future`]: @ref google::cloud::future
/// [`StatusOr`]: @ref google::cloud::StatusOr
/// [`Status`]: @ref google::cloud::Status
/// [google.cloud.aiplatform.v1.CancelTuningJobRequest]: @googleapis_reference_link{google/cloud/aiplatform/v1/genai_tuning_service.proto#L155}
/// [google.cloud.aiplatform.v1.GenAiTuningService.GetTuningJob]: @googleapis_reference_link{google/cloud/aiplatform/v1/genai_tuning_service.proto#L51}
/// [google.cloud.aiplatform.v1.CancelTuningJobRequest]: @googleapis_reference_link{google/cloud/aiplatform/v1/genai_tuning_service.proto#L174}
/// [google.cloud.aiplatform.v1.GenAiTuningService.GetTuningJob]: @googleapis_reference_link{google/cloud/aiplatform/v1/genai_tuning_service.proto#L54}
/// [google.cloud.aiplatform.v1.TuningJob.error]: @googleapis_reference_link{google/cloud/aiplatform/v1/tuning_job.proto#L98}
/// [google.cloud.aiplatform.v1.TuningJob.state]: @googleapis_reference_link{google/cloud/aiplatform/v1/tuning_job.proto#L71}
/// [google.rpc.Status.code]: @googleapis_reference_link{google/rpc/status.proto#L38}
Expand All @@ -362,6 +364,128 @@ class GenAiTuningServiceClient {
google::cloud::aiplatform::v1::CancelTuningJobRequest const& request,
Options opts = {});

// clang-format off
///
/// Rebase a TunedModel.
/// Creates a LongRunningOperation that takes a legacy Tuned GenAI model
/// Reference and creates a TuningJob based on newly available model.
///
/// @param parent Required. The resource name of the Location into which to rebase the Model.
/// Format: `projects/{project}/locations/{location}`
/// @param tuned_model_ref Required. TunedModel reference to retrieve the legacy model information.
/// @param opts Optional. Override the class-level options, such as retry and
/// backoff policies.
/// @return A [`future`] that becomes satisfied when the LRO
/// ([Long Running Operation]) completes or the polling policy in effect
/// for this call is exhausted. The future is satisfied with an error if
/// the LRO completes with an error or the polling policy is exhausted.
/// In this case the [`StatusOr`] returned by the future contains the
/// error. If the LRO completes successfully the value of the future
/// contains the LRO's result. For this RPC the result is a
/// [google.cloud.aiplatform.v1.TuningJob] proto message.
/// The C++ class representing this message is created by Protobuf, using
/// the [Protobuf mapping rules].
///
/// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
/// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
/// [Long Running Operation]: https://google.aip.dev/151
/// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
/// [`future`]: @ref google::cloud::future
/// [`StatusOr`]: @ref google::cloud::StatusOr
/// [`Status`]: @ref google::cloud::Status
/// [google.cloud.aiplatform.v1.RebaseTunedModelRequest]: @googleapis_reference_link{google/cloud/aiplatform/v1/genai_tuning_service.proto#L187}
/// [google.cloud.aiplatform.v1.TuningJob]: @googleapis_reference_link{google/cloud/aiplatform/v1/tuning_job.proto#L36}
///
// clang-format on
future<StatusOr<google::cloud::aiplatform::v1::TuningJob>> RebaseTunedModel(
std::string const& parent,
google::cloud::aiplatform::v1::TunedModelRef const& tuned_model_ref,
Options opts = {});

// clang-format off
///
/// @copybrief RebaseTunedModel
///
/// Specifying the [`NoAwaitTag`] immediately returns the
/// [`google::longrunning::Operation`] that corresponds to the Long Running
/// Operation that has been started. No polling for operation status occurs.
///
/// [`NoAwaitTag`]: @ref google::cloud::NoAwaitTag
///
// clang-format on
StatusOr<google::longrunning::Operation> RebaseTunedModel(
NoAwaitTag, std::string const& parent,
google::cloud::aiplatform::v1::TunedModelRef const& tuned_model_ref,
Options opts = {});

// clang-format off
///
/// Rebase a TunedModel.
/// Creates a LongRunningOperation that takes a legacy Tuned GenAI model
/// Reference and creates a TuningJob based on newly available model.
///
/// @param request Unary RPCs, such as the one wrapped by this
/// function, receive a single `request` proto message which includes all
/// the inputs for the RPC. In this case, the proto message is a
/// [google.cloud.aiplatform.v1.RebaseTunedModelRequest].
/// Proto messages are converted to C++ classes by Protobuf, using the
/// [Protobuf mapping rules].
/// @param opts Optional. Override the class-level options, such as retry and
/// backoff policies.
/// @return A [`future`] that becomes satisfied when the LRO
/// ([Long Running Operation]) completes or the polling policy in effect
/// for this call is exhausted. The future is satisfied with an error if
/// the LRO completes with an error or the polling policy is exhausted.
/// In this case the [`StatusOr`] returned by the future contains the
/// error. If the LRO completes successfully the value of the future
/// contains the LRO's result. For this RPC the result is a
/// [google.cloud.aiplatform.v1.TuningJob] proto message.
/// The C++ class representing this message is created by Protobuf, using
/// the [Protobuf mapping rules].
///
/// [Protobuf mapping rules]: https://protobuf.dev/reference/cpp/cpp-generated/
/// [input iterator requirements]: https://en.cppreference.com/w/cpp/named_req/InputIterator
/// [Long Running Operation]: https://google.aip.dev/151
/// [`std::string`]: https://en.cppreference.com/w/cpp/string/basic_string
/// [`future`]: @ref google::cloud::future
/// [`StatusOr`]: @ref google::cloud::StatusOr
/// [`Status`]: @ref google::cloud::Status
/// [google.cloud.aiplatform.v1.RebaseTunedModelRequest]: @googleapis_reference_link{google/cloud/aiplatform/v1/genai_tuning_service.proto#L187}
/// [google.cloud.aiplatform.v1.TuningJob]: @googleapis_reference_link{google/cloud/aiplatform/v1/tuning_job.proto#L36}
///
// clang-format on
future<StatusOr<google::cloud::aiplatform::v1::TuningJob>> RebaseTunedModel(
google::cloud::aiplatform::v1::RebaseTunedModelRequest const& request,
Options opts = {});

// clang-format off
///
/// @copybrief RebaseTunedModel
///
/// Specifying the [`NoAwaitTag`] immediately returns the
/// [`google::longrunning::Operation`] that corresponds to the Long Running
/// Operation that has been started. No polling for operation status occurs.
///
/// [`NoAwaitTag`]: @ref google::cloud::NoAwaitTag
///
// clang-format on
StatusOr<google::longrunning::Operation> RebaseTunedModel(
NoAwaitTag,
google::cloud::aiplatform::v1::RebaseTunedModelRequest const& request,
Options opts = {});

// clang-format off
///
/// @copybrief RebaseTunedModel
///
/// This method accepts a `google::longrunning::Operation` that corresponds
/// to a previously started Long Running Operation (LRO) and polls the status
/// of the LRO in the background.
///
// clang-format on
future<StatusOr<google::cloud::aiplatform::v1::TuningJob>> RebaseTunedModel(
google::longrunning::Operation const& operation, Options opts = {});

private:
std::shared_ptr<GenAiTuningServiceConnection> connection_;
Options options_;
Expand Down
23 changes: 23 additions & 0 deletions google/cloud/aiplatform/v1/gen_ai_tuning_connection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,29 @@ Status GenAiTuningServiceConnection::CancelTuningJob(
return Status(StatusCode::kUnimplemented, "not implemented");
}

future<StatusOr<google::cloud::aiplatform::v1::TuningJob>>
GenAiTuningServiceConnection::RebaseTunedModel(
google::cloud::aiplatform::v1::RebaseTunedModelRequest const&) {
return google::cloud::make_ready_future<
StatusOr<google::cloud::aiplatform::v1::TuningJob>>(
Status(StatusCode::kUnimplemented, "not implemented"));
}

StatusOr<google::longrunning::Operation>
GenAiTuningServiceConnection::RebaseTunedModel(
NoAwaitTag, google::cloud::aiplatform::v1::RebaseTunedModelRequest const&) {
return StatusOr<google::longrunning::Operation>(
Status(StatusCode::kUnimplemented, "not implemented"));
}

future<StatusOr<google::cloud::aiplatform::v1::TuningJob>>
GenAiTuningServiceConnection::RebaseTunedModel(
google::longrunning::Operation const&) {
return google::cloud::make_ready_future<
StatusOr<google::cloud::aiplatform::v1::TuningJob>>(
Status(StatusCode::kUnimplemented, "not implemented"));
}

std::shared_ptr<GenAiTuningServiceConnection> MakeGenAiTuningServiceConnection(
std::string const& location, Options options) {
internal::CheckExpectedOptions<CommonOptionList, GrpcOptionList,
Expand Down
Loading
Loading